Index: DamClients/DamUI/trunk/src/Dam/Forms/LocationPropertyControl.cs
===================================================================
diff -u -r2088 -r2135
--- DamClients/DamUI/trunk/src/Dam/Forms/LocationPropertyControl.cs (.../LocationPropertyControl.cs) (revision 2088)
+++ DamClients/DamUI/trunk/src/Dam/Forms/LocationPropertyControl.cs (.../LocationPropertyControl.cs) (revision 2135)
@@ -89,12 +89,7 @@
else if (value is LocationJob)
{
location = ((LocationJob)value).Location;
- }
- else if (value is RWScenarioProfileResult)
- {
- location = ((RWScenarioProfileResult)value).Location;
- }
-
+ }
BindSupport.Assign(this, location);
}
}
Index: DamClients/DamUI/trunk/src/Dam/Forms/Deltares.Dam.Forms.csproj
===================================================================
diff -u -r1907 -r2135
--- DamClients/DamUI/trunk/src/Dam/Forms/Deltares.Dam.Forms.csproj (.../Deltares.Dam.Forms.csproj) (revision 1907)
+++ DamClients/DamUI/trunk/src/Dam/Forms/Deltares.Dam.Forms.csproj (.../Deltares.Dam.Forms.csproj) (revision 2135)
@@ -173,12 +173,6 @@
-
- UserControl
-
-
- AssessmentCalculationSpecificationPropertyControl.cs
-
@@ -212,18 +206,6 @@
SchematizationFactorPropertyControl.cs
-
- UserControl
-
-
- ScenarioCalculationPropertyControl.cs
-
-
- UserControl
-
-
- LocationScenarioChart.cs
-
UserControl
@@ -279,9 +261,6 @@
-
- AssessmentCalculationSpecificationPropertyControl.cs
-
DamProjectCalculationOptionsPropertyControl.cs
@@ -330,12 +309,6 @@
SchematizationFactorPropertyControl.cs
-
- ScenarioCalculationPropertyControl.cs
-
-
- LocationScenarioChart.cs
-
DamNewProjectDialog.cs
Designer
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamProjectData.cs
===================================================================
diff -u -r2089 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamProjectData.cs (.../DamProjectData.cs) (revision 2089)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamProjectData.cs (.../DamProjectData.cs) (revision 2135)
@@ -45,13 +45,10 @@
private DamProjectCalculationSpecification damProjectCalculationSpecification;
private WaterBoardJob waterBoardJob = null;
private DamProjectType damProjectType = DamProjectType.Calamity;
- private ProgramType programType = ProgramType.MStab;
private string damDataSourceFileName = "";
private List jobs = new List();
private SchematizationFactorData schematizationFactorData = new SchematizationFactorData();
- private List calculations = null; // will be created and initialized in property
private List designCalculations = null;
- private List schematizationFactors = null;
private List dataSources = new List();
private string dataSourceEsriProjection = null;
private SensorData sensorData;
@@ -208,22 +205,6 @@
}
}
- [ReadOnly(true)]
- [XmlIgnore]
- public List Calculations
- {
- get
- {
- if (calculations == null)
- {
- calculations = new List();
- this.UpdateCalculations();
- }
-
- return calculations;
- }
- }
-
///
/// Clear all results
///
@@ -243,30 +224,6 @@
}
}
- ///
- /// Updates the calculations.
- ///
- public void UpdateCalculations()
- {
- if (calculations != null)
- {
- calculations.Clear();
-
- foreach (LocationJob locationJob in this.LocationJobs)
- {
- if (locationJob.HasRWScenarioResults)
- {
- foreach (RWScenarioResult locationResult in locationJob.RWScenarioResults)
- {
- calculations.AddRange(locationResult.RWScenarioProfileResults);
- }
- }
- }
-
- DataEventPublisher.DataListModified(this.calculations);
- }
- }
-
private List CreateScenarioListForDeletion()
{
List scenarios = new List(); ;
@@ -345,45 +302,6 @@
}
}
- [ReadOnly(true)]
- [XmlIgnore]
- public List SchematizationFactors
- {
- get
- {
- if (schematizationFactors == null)
- {
- schematizationFactors = new List();
- this.UpdateSchematizationFactors();
- }
-
- return schematizationFactors;
- }
- }
-
- public void UpdateSchematizationFactors()
- {
- if (schematizationFactors != null)
- {
- schematizationFactors.Clear();
-
- foreach (LocationJob locationJob in this.LocationJobs)
- {
- if (locationJob.HasSchematizationFactorResults)
- {
- foreach (
- var rwSchematizationFactorResult in
- locationJob.LocationResult.SchematizationFactorsResult.SchematizationFactorResults)
- {
- schematizationFactors.Add(rwSchematizationFactorResult);
- }
- }
- }
-
- DataEventPublisher.DataListModified(this.schematizationFactors);
- }
- }
-
public SchematizationFactorData SchematizationFactorData
{
get { return schematizationFactorData; }
@@ -452,26 +370,14 @@
{
foreach (LocationJob locationJob in this.LocationJobs)
{
- if (locationJob.HasScenarioResults)
+ if (locationJob.HasDesignScenarioResults)
{
return locationJob;
}
}
return null;
}
- public LocationJob GetFirstLocationJobWithAssesmentResults()
- {
- foreach (LocationJob locationJob in this.LocationJobs)
- {
- if (locationJob.HasRWScenarioResults)
- {
- return locationJob;
- }
- }
- return null;
- }
-
public LocationJob GetFirstLocationJobWithCalamityResults()
{
foreach (LocationJob locationJob in this.LocationJobs)
@@ -546,12 +452,6 @@
set { this.dataSourceEsriProjection = value; }
}
- public ProgramType ProgramType
- {
- // For now, only MStab (= default value) allowed so ReadOnly. Add setter when needed.
- get { return programType; }
- }
-
///
/// Gets or sets the sensor data.
///
@@ -600,45 +500,6 @@
}
}
- public EvaluationJob GetEvaluationJob()
- {
- EvaluationJob evaluationJob = new EvaluationJob();
-
- evaluationJob.DikeName = this.WaterBoard.Dikes[0].Name;
- //evaluationJob.MapForSoilGeometries2D = this.WaterBoard.Dikes[0].MapForSoilGeometries2D;
- //evaluationJob.SoildatabaseName = this.WaterBoard.Dikes[0].SoilDatabaseName;
-
- foreach (LocationJob locationJob in this.LocationJobs)
- {
- if (locationJob.Run != null && locationJob.Run.Value)
- {
- foreach (Dike dike in this.WaterBoard.Dikes)
- {
- if (dike.Locations.Contains(locationJob.Location))
- {
- dike.UpdateLocation(locationJob.Location);
- break;
- }
- }
-
- evaluationJob.Locations.Add(locationJob.Location);
- }
- }
-
- return evaluationJob;
- }
-
- ///
- /// Ensures the proper zone safety factors are available for all locations.
- ///
- public void EnsureProperZoneSafetyFactors()
- {
- foreach (var location in Locations)
- {
- location.EnsureProperZoneSafetyFactors();
- }
- }
-
public void DeleteResults()
{
LogManager.Messages.Clear();
@@ -651,15 +512,7 @@
{
jobs.Clear();
}
- if (calculations != null)
- {
- calculations.Clear();
- }
- if (schematizationFactors != null)
- {
- schematizationFactors.Clear();
- }
-
+
// Delete calculationresults in scenarios
var scenarios = CreateScenarioListForDeletion();
foreach (Scenario scenario in scenarios)
@@ -674,15 +527,13 @@
}
}
- private EvaluationJob GetCalculatedEvaluationJob()
+ private int GetNumberOfCalculatedJobs()
{
- EvaluationJob evaluationJob = new EvaluationJob();
+ var numberOfCalculatedJobs = 0;
- evaluationJob.DikeName = this.WaterBoard.Dikes[0].Name;
-
foreach (LocationJob locationJob in this.LocationJobs)
{
- if ((locationJob.Result != JobResult.NoRun || (locationJob.HasRWScenarioResults)) && locationJob.Run != null && locationJob.Run.Value)
+ if ((locationJob.Result != JobResult.NoRun) && locationJob.Run != null && locationJob.Run.Value)
{
foreach (Dike dike in this.WaterBoard.Dikes)
{
@@ -692,21 +543,19 @@
break;
}
}
-
- evaluationJob.Locations.Add(locationJob.Location);
+ numberOfCalculatedJobs++;
}
}
- return evaluationJob;
+ return numberOfCalculatedJobs;
}
public bool HasResults()
{
bool hasResults = waterBoard.Dikes.Count > 0 && waterBoardJob != null && waterBoardJob.Jobs.Count > 0;
if (hasResults)
{
- EvaluationJob evaluationJob = GetCalculatedEvaluationJob();
- hasResults = evaluationJob.Locations != null && evaluationJob.Locations.Count > 0;
+ hasResults = GetNumberOfCalculatedJobs() > 0;
}
return hasResults;
}
@@ -748,7 +597,6 @@
case "SensorData": return damProjectType == DamProjectType.DamLiveConfiguration;
case "SchematizationFactors": return false;
//Bka: for now (release 1.4.1), do not show SchematizationFactors return this.HasResults() && this.DamProjectType == Data.DamProjectType.Assessment;
- case "Calculations": return this.HasResults() && this.DamProjectType == Data.DamProjectType.Assessment;
case "DesignCalculations": return this.HasResults() && this.DamProjectType == Data.DamProjectType.Design;
case "DamProjectCalculationSpecification":
return damProjectCalculationSpecification.DamCalculationSpecifications.Count > 0;
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DataPlugins/DataPluginImporter.cs
===================================================================
diff -u -r2109 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DataPlugins/DataPluginImporter.cs (.../DataPluginImporter.cs) (revision 2109)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DataPlugins/DataPluginImporter.cs (.../DataPluginImporter.cs) (revision 2135)
@@ -1302,58 +1302,11 @@
if (importMode == ImportMode.All)
{
- CorrectSegmentAssignments();
- if (damProjectType == DamProjectType.Assessment)
- {
- RemoveInvalidLocations();
- }
+ CorrectSegmentAssignments();
}
-
}
///
- /// Removes the invalid locations.
- ///
- private void RemoveInvalidLocations()
- {
- var removeLocations = new List();
- Location.DamProjectType = DamProjectType.Assessment;
- foreach (var location in waterBoard.Locations)
- {
- ValidationResult[] res;
- res = location.ValidateLocationHasSegment();
- if (res.Any())
- {
- removeLocations.Add(location);
- foreach (var validationResult in res)
- {
- var logmessage = new LogMessage(LogMessageType.Error, location, validationResult.Text);
- importLogMessages.Add(logmessage);
- }
- }
- var res2 = location.ValidateLocationHasValidEssentialAssessmentValues();
- if (res2.Any())
- {
- removeLocations.Add(location);
- foreach (var validationResult in res2)
- {
- var logmessage = new LogMessage(LogMessageType.Error, location, validationResult.Text);
- importLogMessages.Add(logmessage);
- }
- }
- }
- foreach (var removeLocation in removeLocations)
- {
- waterBoard.Locations.Remove(removeLocation);
- // Remove the locations from the dikes too as those are the ones that are used in (re-)filling the project (waterboard)
- foreach (var dike in waterBoard.Dikes)
- {
- dike.Locations.Remove(removeLocation);
- }
- }
- }
-
- ///
/// Adds the CSV data to dikes.
///
/// The CSV importer.
Fisheye: Tag 2135 refers to a dead (removed) revision in file `DamClients/DamUI/trunk/src/Dam/Forms/AssessmentCalculationSpecificationPropertyControl.Designer.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/LocationResult.cs
===================================================================
diff -u -r2089 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/LocationResult.cs (.../LocationResult.cs) (revision 2089)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/LocationResult.cs (.../LocationResult.cs) (revision 2135)
@@ -28,9 +28,7 @@
{
private TimeSerie stabilityTimeSerie = new TimeSerie();
private TimeSerie pipingTimeSerie = new TimeSerie();
- private RWScenariosResult rwScenariosResult = null;
- private RWSchematizationFactorsResult schematizationFactorsResult = null;
-
+
public LocationResult()
{
}
@@ -55,29 +53,6 @@
pipingTimeSerie = value;
DataEventPublisher.AfterChange(this, "PipingTimeSerie");
}
- }
-
- [XmlOldName("ScenariosResult")]
- public virtual RWScenariosResult RWScenariosResult
- {
- get { return rwScenariosResult; }
- set
- {
- DataEventPublisher.BeforeChange(this, "RWScenariosResult");
- rwScenariosResult = value;
- DataEventPublisher.AfterChange(this, "RWScenariosResult");
- }
- }
-
- public RWSchematizationFactorsResult SchematizationFactorsResult
- {
- get { return schematizationFactorsResult; }
- set
- {
- DataEventPublisher.BeforeChange(this, "SchematizationFactorResults");
- schematizationFactorsResult = value;
- DataEventPublisher.AfterChange(this, "SchematizationFactorResults");
- }
- }
+ }
}
}
Index: DamClients/DamUI/trunk/src/Dam/Tests/DamEngineIo/FillDamUiFromXmlOutputTests.cs
===================================================================
diff -u -r1572 -r2135
--- DamClients/DamUI/trunk/src/Dam/Tests/DamEngineIo/FillDamUiFromXmlOutputTests.cs (.../FillDamUiFromXmlOutputTests.cs) (revision 1572)
+++ DamClients/DamUI/trunk/src/Dam/Tests/DamEngineIo/FillDamUiFromXmlOutputTests.cs (.../FillDamUiFromXmlOutputTests.cs) (revision 2135)
@@ -314,7 +314,7 @@
var surfaceline = CreateSurfaceLine();
var upliftSituation = CreateUpliftSituation(i);
var pipingdesignResults = CreateDesignResultPiping(i, surfaceline, upliftSituation);
- output.Results.CalculationResults.DesignResults[i].PipingDesignResults = pipingdesignResults;
+ output.Results.CalculationResults[i].PipingDesignResults = pipingdesignResults;
}
return output;
}
@@ -327,16 +327,15 @@
var surfaceline = CreateSurfaceLine();
var upliftSituation = CreateUpliftSituation(i);
var stabilityResults = CreateDesignResultStability(i, surfaceline, upliftSituation);
- output.Results.CalculationResults.DesignResults[i].StabilityDesignResults = stabilityResults;
+ output.Results.CalculationResults[i].StabilityDesignResults = stabilityResults;
}
return output;
}
private Output CreateTestOutput()
{
var output = new Output();
output.Results = new OutputResults();
- output.Results.CalculationResults = new CalculationResults();
- output.Results.CalculationResults.DesignResults = new DesignResult[4];
+ output.Results.CalculationResults = new DesignResult[4];
for (int i = 0; i < 4; i++)
{
var desResult = new DesignResult
@@ -348,7 +347,7 @@
ProfileName = "Profile " + (i + 1).ToString(),
CalculationResult = 1 * i
};
- output.Results.CalculationResults.DesignResults[i] = desResult;
+ output.Results.CalculationResults[i] = desResult;
}
return output;
}
Index: DamClients/DamUI/trunk/src/Dam/Tests/LocationTest.cs
===================================================================
diff -u -r875 -r2135
--- DamClients/DamUI/trunk/src/Dam/Tests/LocationTest.cs (.../LocationTest.cs) (revision 875)
+++ DamClients/DamUI/trunk/src/Dam/Tests/LocationTest.cs (.../LocationTest.cs) (revision 2135)
@@ -19,10 +19,7 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
-using System.Collections.Generic;
using Deltares.Dam.Data;
-using Deltares.Geometry;
-using Deltares.Geometry.TestUtils;
using NUnit.Framework;
namespace Deltares.Dam.Tests
@@ -38,8 +35,8 @@
var expectedLocation = new Location
{
Name = "Sand",
- SheetPileLength = 10.1,
- RwBankProtectionBottomLevel = 11.11
+ PlLineOffsetBelowDikeTopAtPolder = 10.1,
+ DampingFactorPL3 = 11.11
})
using (var actualLocation = new Location())
{
@@ -48,8 +45,8 @@
{
actualLocation.SetParameterFromNameValuePair(soilDetail.Key, soilDetail.Value);
}
- Assert.AreEqual(expectedLocation.SheetPileLength, actualLocation.SheetPileLength, cTolerance);
- Assert.AreEqual(expectedLocation.RwBankProtectionBottomLevel, actualLocation.RwBankProtectionBottomLevel,
+ Assert.AreEqual(expectedLocation.PlLineOffsetBelowDikeTopAtPolder, actualLocation.PlLineOffsetBelowDikeTopAtPolder, cTolerance);
+ Assert.AreEqual(expectedLocation.DampingFactorPL3, actualLocation.DampingFactorPL3,
cTolerance);
}
}
@@ -58,8 +55,6 @@
public void Location_ConstructNewInstance_HasDefaultValuesSet()
{
// setup
- var geometryPointComparer = new GeometryPointComparer();
- var sheetPilePoint = new GeometryPoint();
const bool areLocalXzObjectsCreated = false;
const double penetrationLength = 0.0;
const double trafficLoad = 0.0;
@@ -68,10 +63,6 @@
const double plLineOffsetBelowDikeTopAtPolder = 1.5;
const double plLineOffsetBelowShoulderBaseInside = 0.1;
const double plLineOffsetBelowDikeToeAtPolder = 0.1;
- const double plLineOffsetDryBelowDikeTopAtRiver = 0.5;
- const double plLineOffsetDryBelowDikeTopAtPolder = 1.5;
- const double plLineOffsetDryBelowShoulderBaseInside = 0.1;
- const double plLineOffsetDryBelowDikeToeAtPolder = 0.1;
const double stabilityShoulderGrowSlope = 0.3333333333333;
const double stabilityShoulderGrowDeltaX = 2.0;
const double stabilitySlopeAdaptionDeltaX = 2.0;
@@ -80,7 +71,6 @@
var actualLocation = new Location();
// assert
- Assert.AreEqual(0, geometryPointComparer.Compare(sheetPilePoint, actualLocation.SheetPilePoint));
Assert.AreEqual(areLocalXzObjectsCreated, actualLocation.AreLocalXZObjectsCreated);
Assert.AreEqual(penetrationLength, actualLocation.PenetrationLength);
Assert.AreEqual(trafficLoad, actualLocation.TrafficLoad);
@@ -89,19 +79,10 @@
Assert.AreEqual(plLineOffsetBelowDikeTopAtPolder, actualLocation.PlLineOffsetBelowDikeTopAtPolder);
Assert.AreEqual(plLineOffsetBelowShoulderBaseInside, actualLocation.PlLineOffsetBelowShoulderBaseInside);
Assert.AreEqual(plLineOffsetBelowDikeToeAtPolder, actualLocation.PlLineOffsetBelowDikeToeAtPolder);
- Assert.AreEqual(plLineOffsetDryBelowDikeTopAtRiver, actualLocation.PLLineOffsetDryBelowDikeTopAtRiver);
- Assert.AreEqual(plLineOffsetDryBelowDikeTopAtPolder, actualLocation.PLLineOffsetDryBelowDikeTopAtPolder);
- Assert.AreEqual(plLineOffsetDryBelowShoulderBaseInside,
- actualLocation.PLLineOffsetDryBelowShoulderBaseInside);
- Assert.AreEqual(plLineOffsetDryBelowDikeToeAtPolder, actualLocation.PLLineOffsetDryBelowDikeToeAtPolder);
Assert.AreEqual(null, actualLocation.PlLineOffsetBelowDikeCrestMiddle);
Assert.AreEqual(null, actualLocation.PlLineOffsetFactorBelowShoulderCrest);
- Assert.AreEqual(null, actualLocation.PlLineOffsetDryBelowDikeCrestMiddle);
- Assert.AreEqual(null, actualLocation.PlLineOffsetDryFactorBelowShoulderCrest);
Assert.AreEqual(null, actualLocation.UsePlLineOffsetBelowDikeCrestMiddle);
Assert.AreEqual(null, actualLocation.UsePlLineOffsetFactorBelowShoulderCrest);
- Assert.AreEqual(null, actualLocation.UsePlLineOffsetDryBelowDikeCrestMiddle);
- Assert.AreEqual(null, actualLocation.UsePlLineOffsetDryFactorBelowShoulderCrest);
Assert.AreEqual(IntrusionVerticalWaterPressureType.Standard, actualLocation.IntrusionVerticalWaterPressure);
Assert.AreEqual(stabilityShoulderGrowSlope, actualLocation.StabilityShoulderGrowSlope, 1e-12);
Assert.AreEqual(stabilityShoulderGrowDeltaX, actualLocation.StabilityShoulderGrowDeltaX);
Index: DamClients/DamUI/trunk/src/Dam/Tests/UISupport/ConfigurationManagerTest.cs
===================================================================
diff -u -r1982 -r2135
--- DamClients/DamUI/trunk/src/Dam/Tests/UISupport/ConfigurationManagerTest.cs (.../ConfigurationManagerTest.cs) (revision 1982)
+++ DamClients/DamUI/trunk/src/Dam/Tests/UISupport/ConfigurationManagerTest.cs (.../ConfigurationManagerTest.cs) (revision 2135)
@@ -19,11 +19,7 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
-using System;
using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
using Deltares.Dam.Data;
using NUnit.Framework;
using Deltares.Dam.Data.UISupport;
@@ -37,7 +33,7 @@
public void ReturnsCorrectAvailableDamProjectTypes()
{
ICollection projectTypes = ConfigurationManager.Instance.GetAvailableDamProjectTypes();
- Assert.AreEqual(3, projectTypes.Count);
+ Assert.AreEqual(2, projectTypes.Count);
}
[Test]
@@ -46,9 +42,7 @@
ICollection probabilisticTypes = ConfigurationManager.Instance.GetAvailableProbabilisticTypes(DamProjectType.Design);
Assert.AreEqual(1, probabilisticTypes.Count);
probabilisticTypes = ConfigurationManager.Instance.GetAvailableProbabilisticTypes(DamProjectType.Calamity);
- Assert.AreEqual(1, probabilisticTypes.Count);
- probabilisticTypes = ConfigurationManager.Instance.GetAvailableProbabilisticTypes(DamProjectType.Assessment);
- Assert.AreEqual(1, probabilisticTypes.Count);
+ Assert.AreEqual(1, probabilisticTypes.Count);
}
[Test]
Index: DamClients/DamUI/trunk/src/Dam/Forms/DamNewProjectDialog.cs
===================================================================
diff -u -r2088 -r2135
--- DamClients/DamUI/trunk/src/Dam/Forms/DamNewProjectDialog.cs (.../DamNewProjectDialog.cs) (revision 2088)
+++ DamClients/DamUI/trunk/src/Dam/Forms/DamNewProjectDialog.cs (.../DamNewProjectDialog.cs) (revision 2135)
@@ -188,13 +188,6 @@
///
private void OkButtonClick(object sender, EventArgs e)
{
- if (IsPrimaryDikeRingAssessment())
- {
- LocalizedMessageBox.Show(this, "PrimaryAssessmentNotSupported");
- this.DialogResult = DialogResult.None;
- return;
- }
-
// Check if specified file exists
if ((damNewProjectData.DamDataSourceFileName == "") ||
(File.Exists(damNewProjectData.DamDataSourceFileName) != true))
@@ -238,18 +231,6 @@
}
///
- /// Determines whether primary dike ring assessment is selected.
- ///
- ///
- /// true if [is primary dike ring assessment]; otherwise, false.
- ///
- private bool IsPrimaryDikeRingAssessment()
- {
- return ((damNewProjectData.DamProjectType == DamProjectType.Assessment) &&
- (damNewProjectData.DamType == DamType.Primary));
- }
-
- ///
/// Handler for change of source datafile
///
///
Fisheye: Tag 2135 refers to a dead (removed) revision in file `DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/SchematizationFactor/RWSchematizationFactorsResult.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Importers/LocationShapeFileImporter.cs
===================================================================
diff -u -r2089 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Importers/LocationShapeFileImporter.cs (.../LocationShapeFileImporter.cs) (revision 2089)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Importers/LocationShapeFileImporter.cs (.../LocationShapeFileImporter.cs) (revision 2135)
@@ -130,7 +130,7 @@
if (location == null)
{
location = new Location();
- location.SetDefaultValues(damTypeValue, Location.DamProjectType);
+ location.SetDefaultValues();
this.locations.Add(location);
}
location.Name = locationIDValue;
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamProject.cs
===================================================================
diff -u -r2089 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamProject.cs (.../DamProject.cs) (revision 2089)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamProject.cs (.../DamProject.cs) (revision 2135)
@@ -196,7 +196,6 @@
this.damProjectData.DamProjectCalculationSpecification.DamCalculationSpecifications.
Add(new DamFailureMechanismeCalculationSpecification());
}
- damProjectData.EnsureProperZoneSafetyFactors();
return this.DamProjectData;
}
@@ -269,7 +268,6 @@
private void UpdateForOlderProjects()
{
UpdateMStabParametersSlipCircleDefinition();
- damProjectData.EnsureProperZoneSafetyFactors();
UpdateScenariosForLocations();
}
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/UISupport/ConfigurationManager.cs
===================================================================
diff -u -r2089 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/UISupport/ConfigurationManager.cs (.../ConfigurationManager.cs) (revision 2089)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/UISupport/ConfigurationManager.cs (.../ConfigurationManager.cs) (revision 2135)
@@ -80,7 +80,6 @@
return new[]
{
DamProjectType.Calamity,
- DamProjectType.Assessment,
DamProjectType.Design
};
}
@@ -105,11 +104,6 @@
{
ProbabilisticType.Deterministic
};
- case DamProjectType.Assessment:
- return new[]
- {
- ProbabilisticType.Deterministic
- };
default:
return new[]
{
@@ -214,11 +208,6 @@
}
}
// This is the place to enable new possible failure mechanisms and models
- this[StabilityKernelType.DamClassicStability, DamProjectType.Assessment, ProbabilisticType.Deterministic, FailureMechanismSystemType.Piping, (int) PipingModelType.Sellmeijer] = ConfigurationStatus.Available;
- this[StabilityKernelType.DamClassicStability, DamProjectType.Assessment, ProbabilisticType.Deterministic, FailureMechanismSystemType.Piping, (int) PipingModelType.Sellmeijer4Forces] = ConfigurationStatus.Available;
- this[StabilityKernelType.DamClassicStability, DamProjectType.Assessment, ProbabilisticType.Deterministic, FailureMechanismSystemType.Piping, (int) PipingModelType.Bligh] = ConfigurationStatus.Available;
- this[StabilityKernelType.DamClassicStability, DamProjectType.Assessment, ProbabilisticType.Deterministic, FailureMechanismSystemType.Piping, (int) PipingModelType.Wti2017] = ConfigurationStatus.Available;
-
this[StabilityKernelType.DamClassicStability, DamProjectType.Design, ProbabilisticType.Deterministic, FailureMechanismSystemType.StabilityInside, (int) MStabModelType.Bishop] = ConfigurationStatus.Available;
this[StabilityKernelType.DamClassicStability, DamProjectType.Design, ProbabilisticType.Deterministic, FailureMechanismSystemType.StabilityInside, (int) MStabModelType.UpliftVan] = ConfigurationStatus.Available;
this[StabilityKernelType.DamClassicStability, DamProjectType.Design, ProbabilisticType.Deterministic, FailureMechanismSystemType.StabilityInside, (int) MStabModelType.BishopUpliftVan] = ConfigurationStatus.Available;
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/IO/CombineImportedData.cs
===================================================================
diff -u -r2098 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/IO/CombineImportedData.cs (.../CombineImportedData.cs) (revision 2098)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/IO/CombineImportedData.cs (.../CombineImportedData.cs) (revision 2135)
@@ -664,7 +664,7 @@
var errorInrecord = false;
location = new Location();
- location.SetDefaultValues(locationRecord.DamType, Location.DamProjectType);
+ location.SetDefaultValues();
location.Name = locationRecord.LocationId;
location.SurfaceLineId = locationRecord.SurfaceLineId;
location.SegmentId = locationRecord.SegmentId;
@@ -675,10 +675,6 @@
{
location.DikeRingId = locationRecord.DikeRingId;
}
- if (!String.IsNullOrEmpty(locationRecord.Materiaaltypedijk))
- {
- location.DikeMaterialType = LocationImportHelper.ToSoilType(locationRecord.Materiaaltypedijk);
- }
if (location.DampingFactorPL3 < 0 || location.DampingFactorPL3 > 1)
{
AddErrorMessage("DampingFactorPl3BeyondLimits", locationRecord);
@@ -714,16 +710,11 @@
location.XRd = locationRecord.GeoX.GetValueOrDefault(location.XRd);
location.YRd = locationRecord.GeoY.GetValueOrDefault(location.YRd);
location.PolderLevel = locationRecord.Polderlevel.GetValueOrDefault(location.PolderLevel);
- location.PolderLevelLow = locationRecord.Polderlevellow.GetValueOrDefault(location.PolderLevelLow);
location.GrassQuality = locationRecord.GrassQuality.GetValueOrDefault(location.GrassQuality);
location.Direction = locationRecord.Direction.GetValueOrDefault(location.Direction);
location.XSoilGeometry2DOrigin = locationRecord.XSoilgeometry2DOrigin.GetValueOrDefault(location.XSoilGeometry2DOrigin);
location.DampingFactorPL3 = locationRecord.DempingsfactorPl3.GetValueOrDefault(location.DampingFactorPL3);
location.DampingFactorPL4 = locationRecord.DempingsfactorPl4.GetValueOrDefault(location.DampingFactorPL4);
- location.SheetPilePoint.X = locationRecord.SheetpileX.GetValueOrDefault(location.SheetPilePoint.X);
- location.SheetPilePoint.Y = locationRecord.SheetpileY.GetValueOrDefault(location.SheetPilePoint.Y);
- location.SheetPilePoint.Z = locationRecord.SheetpileZ.GetValueOrDefault(location.SheetPilePoint.Z);
- location.SheetPileLength = locationRecord.SheetpileLength.GetValueOrDefault(location.SheetPileLength);
location.IsUseOriginalPLLineAssignments = locationRecord.UseOriginalPllineAssignments.GetValueOrDefault(location.IsUseOriginalPLLineAssignments);
location.PenetrationLength = locationRecord.PenetrationLength.GetValueOrDefault(location.PenetrationLength);
location.TrafficLoad = locationRecord.TrafficLoad.GetValueOrDefault(location.TrafficLoad);
@@ -732,10 +723,6 @@
location.PlLineOffsetBelowDikeTopAtPolder = locationRecord.PLLineOffsetBelowDikeTopAtPolder.GetValueOrDefault(location.PlLineOffsetBelowDikeTopAtPolder);
location.PlLineOffsetBelowShoulderBaseInside = locationRecord.PLLineOffsetBelowShoulderBaseInside.GetValueOrDefault(location.PlLineOffsetBelowShoulderBaseInside);
location.PlLineOffsetBelowDikeToeAtPolder = locationRecord.PLLineOffsetBelowDikeToeAtPolder.GetValueOrDefault(location.PlLineOffsetBelowDikeToeAtPolder);
- location.PLLineOffsetDryBelowDikeTopAtRiver = locationRecord.PLLineOffsetDryBelowDikeTopAtRiver.GetValueOrDefault(location.PLLineOffsetDryBelowDikeTopAtRiver);
- location.PLLineOffsetDryBelowDikeTopAtPolder = locationRecord.PLLineOffsetDryBelowDikeTopAtPolder.GetValueOrDefault(location.PLLineOffsetDryBelowDikeTopAtPolder);
- location.PLLineOffsetDryBelowShoulderBaseInside = locationRecord.PLLineOffsetDryBelowShoulderBaseInside.GetValueOrDefault(location.PLLineOffsetDryBelowShoulderBaseInside);
- location.PLLineOffsetDryBelowDikeToeAtPolder = locationRecord.PLLineOffsetDryBelowDikeToeAtPolder.GetValueOrDefault(location.PLLineOffsetDryBelowDikeToeAtPolder);
if (locationRecord.PlLineOffsetBelowDikeCrestMiddle.HasValue)
{
location.PlLineOffsetBelowDikeCrestMiddle = locationRecord.PlLineOffsetBelowDikeCrestMiddle.Value;
@@ -745,14 +732,6 @@
{
location.PlLineOffsetFactorBelowShoulderCrest = locationRecord.PlLineOffsetFactorBelowShoulderCrest.Value;
}
- if (locationRecord.PlLineOffsetDryBelowDikeCrestMiddle.HasValue)
- {
- location.PlLineOffsetDryBelowDikeCrestMiddle = locationRecord.PlLineOffsetDryBelowDikeCrestMiddle.Value;
- }
- if (locationRecord.PlLineOffsetDryFactorBelowShoulderCrest.HasValue)
- {
- location.PlLineOffsetDryFactorBelowShoulderCrest = locationRecord.PlLineOffsetDryFactorBelowShoulderCrest.Value;
- }
if (locationRecord.UsePlLineOffsetBelowDikeCrestMiddle.HasValue)
{
location.UsePlLineOffsetBelowDikeCrestMiddle = locationRecord.UsePlLineOffsetBelowDikeCrestMiddle.Value;
@@ -762,32 +741,19 @@
{
location.UsePlLineOffsetFactorBelowShoulderCrest = locationRecord.UsePlLineOffsetFactorBelowShoulderCrest.Value;
}
- if (locationRecord.UsePlLineOffsetDryBelowDikeCrestMiddle.HasValue)
- {
- location.UsePlLineOffsetDryBelowDikeCrestMiddle = locationRecord.UsePlLineOffsetDryBelowDikeCrestMiddle.Value;
- }
- if (locationRecord.UsePlLineOffsetDryFactorBelowShoulderCrest.HasValue)
- {
- location.UsePlLineOffsetDryFactorBelowShoulderCrest = locationRecord.UsePlLineOffsetDryFactorBelowShoulderCrest.Value;
- }
if (locationRecord.IntrusionVerticalWaterPressure.HasValue)
{
location.IntrusionVerticalWaterPressure = locationRecord.IntrusionVerticalWaterPressure.Value;
}
location.StabilityShoulderGrowSlope = locationRecord.StabilityShoulderGrowSlope.GetValueOrDefault(location.StabilityShoulderGrowSlope);
location.StabilityShoulderGrowDeltaX = locationRecord.StabilityShoulderGrowDeltaX.GetValueOrDefault(location.StabilityShoulderGrowDeltaX);
location.StabilitySlopeAdaptionDeltaX = locationRecord.StabilitySlopeAdaptionDeltaX.GetValueOrDefault(location.StabilitySlopeAdaptionDeltaX);
- location.DredgingDepth = locationRecord.Baggerdiepte.GetValueOrDefault(location.DredgingDepth);
- location.BoezemLevelTp = locationRecord.bp_tp.GetValueOrDefault(location.BoezemLevelTp);
- location.BoezemLevelHbp = locationRecord.bp_hbp.GetValueOrDefault(location.BoezemLevelHbp);
- location.BoezemLevelLbp = locationRecord.bp_lbp.GetValueOrDefault(location.BoezemLevelLbp);
location.MinimalCircleDepth = locationRecord.MinimalCircleDepth.GetValueOrDefault(location.MinimalCircleDepth);
location.LevelReductionInside = locationRecord.LevelReductionInside.GetValueOrDefault(location.LevelReductionInside);
location.LevelReductionOutside = locationRecord.LevelReductionOutside.GetValueOrDefault(location.LevelReductionOutside);
location.LayerHeightDeviation = locationRecord.LayerHeightDeviation.GetValueOrDefault(location.LayerHeightDeviation);
location.LayerHeightDistribution = locationRecord.LayerHeightDistribution.GetValueOrDefault(location.LayerHeightDistribution);
location.DistanceToEntryPoint = locationRecord.DistanceToEntryPoint.GetValueOrDefault(location.DistanceToEntryPoint);
- location.DetrimentFactor = locationRecord.Detrimentfactor.GetValueOrDefault(location.DetrimentFactor);
location.DikeTableHeight = locationRecord.DikeTableHeight.GetValueOrDefault(location.DikeTableHeight);
location.SlopeDampingPiezometricHeightPolderSide = locationRecord.SlopeDampingPiezometricHeightPolderSide.GetValueOrDefault(location.SlopeDampingPiezometricHeightPolderSide);
location.StabilityDesignMethod = locationRecord.StabilityDesignMethod.GetValueOrDefault(location.StabilityDesignMethod);
@@ -801,7 +767,6 @@
location.NewDikeSlopeInside = locationRecord.NewDikeSlopeInside.GetValueOrDefault(location.NewDikeSlopeInside);
location.NewDikeSlopeOutside = locationRecord.NewDikeSlopeOutside.GetValueOrDefault(location.NewDikeSlopeOutside);
location.NewDikeTopWidth = locationRecord.NewDikeTopWidth.GetValueOrDefault(location.NewDikeTopWidth);
- location.RwBankProtectionBottomLevel = locationRecord.RwBankProtectionBottomLevel.GetValueOrDefault(location.RwBankProtectionBottomLevel);
location.NewMaxHeightShoulderAsFraction = locationRecord.NewMaxHeightShoulderAsFraction.GetValueOrDefault(location.NewMaxHeightShoulderAsFraction);
location.NewMinDistanceDikeToeStartDitch = locationRecord.NewMinDistanceDikeToeStartDitch.GetValueOrDefault(location.NewMinDistanceDikeToeStartDitch);
location.NewShoulderBaseSlope = locationRecord.NewShoulderBaseSlope.GetValueOrDefault(location.NewShoulderBaseSlope);
Index: DamClients/DamUI/trunk/src/Dam/Tests/CsvImporterTest.cs
===================================================================
diff -u -r875 -r2135
--- DamClients/DamUI/trunk/src/Dam/Tests/CsvImporterTest.cs (.../branches/CalcualtionIncluded/src/Dam/Tests/CsvImporterTest.cs) (revision 875)
+++ DamClients/DamUI/trunk/src/Dam/Tests/CsvImporterTest.cs (.../trunk/src/Dam/Tests/CsvImporterTest.cs) (revision 2135)
@@ -1,15 +1,25 @@
-//-----------------------------------------------------------------------
-//
-// Copyright (c) 2010 Deltares. All rights reserved.
-//
-// B.S.T.I.M. The
-// tom.the@deltares.nl
-// 18-05-2010
-// Test of csv importer
-//-----------------------------------------------------------------------
-using Deltares.Geotechnics;
+// Copyright (C) Stichting Deltares 2018. All rights reserved.
+//
+// This file is part of the application DAM - UI.
+//
+// DAM - UI is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
using Deltares.Geotechnics.SurfaceLines;
-using Deltares.Standard;
using Deltares.Standard.Logging;
namespace Deltares.Dam.Tests
@@ -234,10 +244,6 @@
Assert.AreEqual("ophoogmateriaalberm", dike.Locations[0].ShoulderEmbankmentMaterial);
Assert.AreEqual(0.31, dike.Locations[0].DampingFactorPL3);
Assert.AreEqual(0.41, dike.Locations[0].DampingFactorPL4);
- Assert.AreEqual(432.1, dike.Locations[0].SheetPilePoint.X);
- Assert.AreEqual(0.0, dike.Locations[0].SheetPilePoint.Y);
- Assert.AreEqual(654.3, dike.Locations[0].SheetPilePoint.Z);
- Assert.AreEqual(22.0, dike.Locations[0].SheetPileLength);
Assert.AreEqual(true, dike.Locations[0].IsUseOriginalPLLineAssignments, "dike.Locations[0].IsUseOriginalPLLineAssignments");
Assert.AreEqual(13, dike.SurfaceLines2[0].CharacteristicPoints.Count(cp => cp.CharacteristicPointType != CharacteristicPointType.None));
Assert.IsNotNull(dike.SurfaceLines2[0].CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.BottomDitchPolderSide));
@@ -277,7 +283,6 @@
public void SegmentsOfImportedDikeHaveCorrectMostProbabableSoilProfile()
{
var waterBoard = ImportDirector.Construct(importFolder, null);
- var dike = waterBoard.Dikes[0];
Assert.AreEqual("1DP1", waterBoard.Segments[0].GetMostProbableProfile(FailureMechanismSystemType.StabilityInside).Name);
Assert.AreEqual("1DP2", waterBoard.Segments[0].GetMostProbableProfile(FailureMechanismSystemType.Piping).Name);
}
@@ -305,30 +310,6 @@
Assert.IsNotNull(dike);
}
- [Test]
- public void CanImportDetrimentFactorForLocation()
- {
- File.Delete(importFolder + "\\locations.csv");
- using (var writer = File.CreateText(importFolder + "\\locations.csv"))
- {
- writer.WriteLine("location_id;surfaceline_id;segment_id;geo_x;geo_y;x_soilgeometry2D_origin;Pl1_id;polderlevel;head_pl2;head_pl3;grass_quality;direction;ophoogmateriaaldijk;ophoogmateriaalberm;dempingsfactor_pl3;dempingsfactor_pl4;Sheetpile_x;Sheetpile_y;Sheetpile_z;Sheetpile_length;use_original_plline_assignments;detrimentfactor");
- writer.WriteLine("LOC1;D1;1;414.950;91.850;14.0;PL1A;0.1;4.0;3.0;4.3;1.0;ophoogmateriaaldijk;ophoogmateriaalberm;0.31;0.41;432.1;0.0;654.3;22.0;true;1.275");
- }
-
- var dike = ImportDirector.Construct(importFolder, null);
-
- Assert.AreEqual(1.275, dike.Locations[0].DetrimentFactor,0.001);
- }
-
- [Test]
- public void TestDefaultValueDetrimentFactorForLocation()
- {
- var waterBoard = ImportDirector.Construct(importFolder, null);
- var dike = waterBoard.Dikes[0];
-
- Assert.AreEqual(0.95, dike.Locations[0].DetrimentFactor);
- }
-
[TestFixtureTearDown]
public void FixtureTearDown()
{
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Segment.cs
===================================================================
diff -u -r2089 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Segment.cs (.../Segment.cs) (revision 2089)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Segment.cs (.../Segment.cs) (revision 2135)
@@ -59,7 +59,7 @@
{
get
{
- if (SoilProfile != null)
+ if (SoilProfile2D == null && SoilProfile != null)
{
return SoilProfileType.SoilProfile1D;
}
@@ -82,11 +82,11 @@
{
get
{
- if (this.SoilProfile != null)
+ if (SoilProfile2D == null && SoilProfile != null)
{
return SoilProfile.Name;
}
- if (this.SoilProfile2D != null)
+ if (SoilProfile2D != null)
{
return SoilProfile2D.Name;
}
Index: DamClients/DamUI/trunk/src/Dam/Tests/DamEngineIo/FillXmlInputFromDamUiTests.cs
===================================================================
diff -u -r2109 -r2135
--- DamClients/DamUI/trunk/src/Dam/Tests/DamEngineIo/FillXmlInputFromDamUiTests.cs (.../FillXmlInputFromDamUiTests.cs) (revision 2109)
+++ DamClients/DamUI/trunk/src/Dam/Tests/DamEngineIo/FillXmlInputFromDamUiTests.cs (.../FillXmlInputFromDamUiTests.cs) (revision 2135)
@@ -43,8 +43,8 @@
[TestFixture]
public class FillXmlInputFromDamUiTests
{
- const AnalysisType expectedAnalysisType = AnalysisType.AdaptGeometry;
- const AnalysisType notExpectedAnalysisType = AnalysisType.NoAdaption;
+ const AnalysisType ExpectedAnalysisType = AnalysisType.AdaptGeometry;
+ const AnalysisType NotExpectedAnalysisType = AnalysisType.NoAdaption;
[Test]
public void CanWriteAndReadDamProjectDataToXmlFile()
@@ -58,7 +58,7 @@
DamXmlSerialization.SaveInputAsXmlFile(inputFilename, input);
// Init static that is to be loaded with not expected value
- DamProjectCalculationSpecification.SelectedAnalysisType = notExpectedAnalysisType;
+ DamProjectCalculationSpecification.SelectedAnalysisType = NotExpectedAnalysisType;
// Load input file
input = DamXmlSerialization.LoadInputFromXmlFile(inputFilename);
@@ -77,7 +77,7 @@
string inputXml = DamXmlSerialization.SaveInputAsXmlString(input);
// Init static that is to be loaded with not expected value
- DamProjectCalculationSpecification.SelectedAnalysisType = notExpectedAnalysisType;
+ DamProjectCalculationSpecification.SelectedAnalysisType = NotExpectedAnalysisType;
// Load input string
input = DamXmlSerialization.LoadInputFromXmlString(inputXml);
@@ -137,7 +137,7 @@
var sensorGroup1 = new Group()
{
ID = 1,
- SensorArray = new Data.Sensors.Sensor[] { sensor1, sensor2 }
+ SensorArray = new[] { sensor1, sensor2 }
};
sensorData.SensorGroups.Add(sensorGroup1);
var sensorLocation1 = new Data.Sensors.SensorLocation()
@@ -168,7 +168,7 @@
var sensorGroup2 = new Group()
{
ID = 2,
- SensorArray = new Data.Sensors.Sensor[] { sensor3 }
+ SensorArray = new[] { sensor3 }
};
sensorData.SensorGroups.Add(sensorGroup2);
var sensorLocation2 = new Data.Sensors.SensorLocation()
@@ -257,7 +257,7 @@
{
damProjectData.DamProjectType = DamProjectType.Design;
damProjectData.DamProjectCalculationSpecification = new DamProjectCalculationSpecification();
- DamProjectCalculationSpecification.SelectedAnalysisType = expectedAnalysisType;
+ DamProjectCalculationSpecification.SelectedAnalysisType = ExpectedAnalysisType;
var calculationSpecification = new DamFailureMechanismeCalculationSpecification();
calculationSpecification.FailureMechanismSystemType = FailureMechanismSystemType.Piping;
calculationSpecification.CalculationModel = PipingModelType.Bligh;
@@ -337,36 +337,21 @@
location.PLLineCreationMethod = (PLLineCreationMethod) i;
location.IntrusionVerticalWaterPressure = (IntrusionVerticalWaterPressureType) i;
location.PolderLevel = 1.0 * i + 0.11;
- location.PolderLevelLow = 1.0 * i + 0.09;
location.DampingFactorPL4 = 1.0 * i + 0.12;
location.DampingFactorPL3 = 1.0 * i + 0.13;
location.PenetrationLength = 1.0 * i + 0.14;
location.PlLineOffsetBelowDikeCrestMiddle = 1.0 * i + 0.15;
location.UsePlLineOffsetFactorBelowShoulderCrest = true;
location.PlLineOffsetFactorBelowShoulderCrest = 1.0 * i + 0.16;
- location.PlLineOffsetDryBelowDikeCrestMiddle = 1.0 * i + 0.17;
- location.UsePlLineOffsetDryFactorBelowShoulderCrest = true;
- location.PlLineOffsetDryFactorBelowShoulderCrest = 1.0 * i + 0.18;
location.SlopeDampingPiezometricHeightPolderSide = 1.0 * i + 0.19;
location.PlLineOffsetBelowDikeTopAtRiver = 1.0 * i + 0.20;
location.PlLineOffsetBelowDikeTopAtPolder = 1.0 * i + 0.21;
location.PlLineOffsetBelowShoulderBaseInside = 1.0 * i + 0.22;
location.PlLineOffsetBelowDikeToeAtPolder = 1.0 * i + 0.23;
- location.PLLineOffsetDryBelowDikeTopAtRiver = 1.0 * i + 0.24;
- location.PLLineOffsetDryBelowDikeTopAtPolder = 1.0 * i + 0.25;
- location.PLLineOffsetDryBelowShoulderBaseInside = 1.0 * i + 0.26;
- location.PLLineOffsetDryBelowDikeToeAtPolder = 1.0 * i + 0.27;
location.HeadPL2 = 1.0 * i + 0.28;
location.HeadPl3 = 1.0 * i + 0.29;
location.HeadPl4 = 1.0 * i + 0.30;
location.DikeTableHeight = 1.0 * i + 0.31;
- location.BoezemLevelHbp = 1.0 * i + 0.32;
- location.BoezemLevelLbp = 1.0 * i + 0.33;
- location.BoezemLevelTp = 1.0 * i + 0.34;
- location.RwBankProtectionBottomLevel = 1.0 * i + 0.35;
- location.DredgingDepth = 1.0 * i + 0.36;
- location.DetrimentFactor = 1.0 * i + 0.37;
- location.DikeMaterialType = SoilType.Loam;
location.LocalXZSurfaceLine2 = surfaceLines[i];
location.Segment = segments[i % 2]; // alternate between the 2 available segments
for (int j = 0; j < 3; j++)
@@ -385,7 +370,7 @@
location.RedesignDikeHeight = false;
location.RedesignDikeShoulder = false;
- location.ShoulderEmbankmentMaterial = "ShoulderMat" + (i + 1).ToString(); ;
+ location.ShoulderEmbankmentMaterial = "ShoulderMat" + (i + 1);
location.StabilityShoulderGrowSlope = 10.0 * i + 0.50;
location.StabilityShoulderGrowDeltaX = 10.0 * i + 0.51;
location.StabilitySlopeAdaptionDeltaX = 10.0 * i + 0.52;
@@ -490,7 +475,7 @@
private static void FillSoilProfiles1D(Dike dike)
{
- dike.SoilProfiles = new List();
+ dike.SoilProfiles = new List();
const int profilesCount = 2;
for (int i = 0; i < profilesCount; i++)
{
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/CsvImporters/CsvImporterLocations.cs
===================================================================
diff -u -r2089 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/CsvImporters/CsvImporterLocations.cs (.../CsvImporterLocations.cs) (revision 2089)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/CsvImporters/CsvImporterLocations.cs (.../CsvImporterLocations.cs) (revision 2135)
@@ -52,18 +52,13 @@
public double? XSoilgeometry2DOrigin { get; set; }
public string Pl1Id { get; set; }
public double? Polderlevel { get; set; }
- public double? Polderlevellow { get; set; }
public double? HeadPl2 { get; set; }
public double? HeadPl3 { get; set; }
public double? HeadPl4 { get; set; }
public double? GrassQuality { get; set; }
public double? Direction { get; set; }
public string Ophoogmateriaaldijk { get; set; }
public string Ophoogmateriaalberm { get; set; }
- public double? SheetpileX { get; set; }
- public double? SheetpileY { get; set; }
- public double? SheetpileZ { get; set; }
- public double? SheetpileLength { get; set; }
public bool? UseOriginalPllineAssignments { get; set; }
public double? PenetrationLength { get; set; }
public double? TrafficLoad { get; set; }
@@ -83,33 +78,20 @@
public double? ProbabilityOfFailurePiping { get; set; }
public double? UpliftCriterionPiping { get; set; }
public double? UpliftCriterionStability { get; set; }
- public string Materiaaltypedijk { get; set; }
- public double? bp_tp { get; set; }
- public double? bp_hbp { get; set; }
- public double? bp_lbp { get; set; }
- public double? Baggerdiepte { get; set; }
public double? DistanceToEntryPoint { get; set; }
public double? PLLineOffsetBelowDikeTopAtRiver { get; set; }
public double? PLLineOffsetBelowDikeTopAtPolder { get; set; }
public double? PLLineOffsetBelowShoulderBaseInside { get; set; }
public double? PLLineOffsetBelowDikeToeAtPolder { get; set; }
- public double? PLLineOffsetDryBelowDikeTopAtRiver { get; set; }
- public double? PLLineOffsetDryBelowDikeTopAtPolder { get; set; }
- public double? PLLineOffsetDryBelowShoulderBaseInside { get; set; }
- public double? PLLineOffsetDryBelowDikeToeAtPolder { get; set; }
public double? PlLineOffsetBelowDikeCrestMiddle { get; set; }
public double? PlLineOffsetFactorBelowShoulderCrest { get; set; }
- public double? PlLineOffsetDryBelowDikeCrestMiddle { get; set; }
- public double? PlLineOffsetDryFactorBelowShoulderCrest { get; set; }
public bool? UsePlLineOffsetBelowDikeCrestMiddle { get; set; }
public bool? UsePlLineOffsetFactorBelowShoulderCrest { get; set; }
- public bool? UsePlLineOffsetDryBelowDikeCrestMiddle { get; set; }
- public bool? UsePlLineOffsetDryFactorBelowShoulderCrest { get; set; }
+
public IntrusionVerticalWaterPressureType? IntrusionVerticalWaterPressure;
public double? StabilityShoulderGrowSlope { get; set; }
public double? StabilityShoulderGrowDeltaX { get; set; }
public double? StabilitySlopeAdaptionDeltaX { get; set; }
- public double? Detrimentfactor { get; set; }
public double? DikeTableHeight { get; set; }
public double? SlopeDampingPiezometricHeightPolderSide { get; set; }
public StabilityDesignMethod? StabilityDesignMethod { get; set; }
@@ -119,7 +101,6 @@
public double? SlopeAdaptionStartCotangent { get; set; }
public double? SlopeAdaptionEndCotangent { get; set; }
public double? SlopeAdaptionStepCotangent { get; set; }
- public double? RwBankProtectionBottomLevel { get; set; }
public double? NewDikeTopWidth { get; set; }
public bool? UseNewDikeTopWidth { get; set; }
public double? NewDikeSlopeInside { get; set; }
@@ -169,18 +150,13 @@
int colIndexXSoilgeometry2DOrigin = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.XSoilGeometry2DOriginColumnName);
int colIndexPl1Id = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.Pl1ColumnName);
int colIndexPolderlevel = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.PolderLevelColumnName);
- int colIndexPolderlevellow = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.PolderLevelLowColumnName);
int colIndexHeadPl2 = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.HeadPl2ColumnName);
int colIndexHeadPl3 = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.HeadPl3ColumnName);
int colIndexHeadPl4 = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.HeadPl4ColumnName);
int colIndexGrassQuality = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.GrassQualityColumnName);
int colIndexDirection = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.DirectionColumnName);
int colIndexOphoogmateriaaldijk = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.DikeEmbankmentMaterialColumnName);
int colIndexOphoogmateriaalberm = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.ShoulderEmbankmentMaterialColumnName);
- int colIndexSheetpileX = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.SheetPileXRdColumnName);
- int colIndexSheetpileY = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.SheetPileYRdColumnName);
- int colIndexSheetpileZ = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.SheetPileZRdColumnName);
- int colIndexSheetpileLength = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.SheetPileLengthColumnName);
int colIndexUseOriginalPllineAssignments = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.UseOriginalPlLineAssignmentsColumnName);
int colIndexPenetrationLength = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.PenetrationLengthColumnName);
int colIndexTrafficLoad = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.TrafficLoadColumnName);
@@ -200,36 +176,21 @@
int colIndexProbabilityOfFailurePiping = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.ProbabilityOfFailurePipingColumnName);
int colIndexUpliftCriterionPiping = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.UpliftCriterionPipingColumnName);
int colIndexUpliftCriterionStability = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.UpliftCriterionStabilityColumnName);
- int colIndexMateriaaltypedijk = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.DikeMaterialTypeColumnName);
- int colIndexBpTp = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.BoezemLevelTpColumnName);
- int colIndexBpHbp = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.BoezemLevelHbpColumnName);
- int colIndexBpLbp = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.BoezemLevelLbpColumnName);
- int colIndexBaggerdiepte = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.DredgingDepthColumnName);
int colIndexDistanceToEntryPoint = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.DistanceToEntryPointColumnName);
int colIndexPLLineOffsetBelowDikeTopAtRiver = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.PlLineOffsetBelowDikeTopAtRiverColumnName);
int colIndexPLLineOffsetBelowDikeTopAtPolder = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.PlLineOffsetBelowDikeTopAtPolderColumnName);
int colIndexPLLineOffsetBelowShoulderBaseInside = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.PlLineOffsetBelowShoulderBaseInsideColumnName);
int colIndexPLLineOffsetBelowDikeToeAtPolder = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.PlLineOffsetBelowDikeToeAtPolderColumnName);
- int colIndexPLLineOffsetDryBelowDikeTopAtRiver = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.PlLineOffsetDryBelowDikeTopAtRiverColumnName);
- int colIndexPLLineOffsetDryBelowDikeTopAtPolder = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.PlLineOffsetDryBelowDikeTopAtPolderColumnName);
- int colIndexPLLineOffsetDryBelowShoulderBaseInside = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.PlLineOffsetDryBelowShoulderBaseInsideColumnName);
- int colIndexPLLineOffsetDryBelowDikeToeAtPolder = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.PlLineOffsetDryBelowDikeToeAtPolderColumnName);
int colIndexPlLineOffsetBelowDikeCrestMiddle = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.PlLineOffsetBelowDikeCrestMiddle);
int colIndexPlLineOffsetFactorBelowShoulderCrest = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.PlLineOffsetFactorBelowShoulderCrest);
- int colIndexPlLineOffsetDryBelowDikeCrestMiddle = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.PlLineOffsetDryBelowDikeCrestMiddle);
- int colIndexPlLineOffsetDryFactorBelowShoulderCrest = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.PlLineOffsetDryFactorBelowShoulderCrest);
int colIndexUsePlLineOffsetBelowDikeCrestMiddle = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.UsePlLineOffsetBelowDikeCrestMiddle);
int colIndexUsePlLineOffsetFactorBelowShoulderCrest = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.UsePlLineOffsetFactorBelowShoulderCrest);
- int colIndexUsePlLineOffsetDryBelowDikeCrestMiddle = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.UsePlLineOffsetDryBelowDikeCrestMiddle);
- int colIndexUsePlLineOffsetDryFactorBelowShoulderCrest = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.UsePlLineOffsetDryFactorBelowShoulderCrest);
int colIndexIntrusionVerticalWaterPressure = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.IntrusionVerticalWaterPressure);
int colIndexStabilityShoulderGrowSlope = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.StabilityShoulderGrowSlopeColumnName);
int colIndexStabilityShoulderGrowDeltaX = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.StabilityShoulderGrowDeltaXColumnName);
int colIndexStabilitySlopeAdaptionDeltaX = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.StabilitySlopeAdaptionDeltaXColumnName);
- int colIndexDetrimentfactor = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.DetrimentFactorColumnName);
int colIndexDikeTableHeight = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.DikeTableHeightColumnName);
int colIndexSlopeDampingPiezometricHeightPolderSide = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.SlopeDampingPiezometricHeightPolderSideColumnName);
- int colIndexRwBankProtectionBottomLevel = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.RwBankProtectionBottomLevelColumnName);
int colIndexStabilityDesignMethod = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.StabilityDesignMethodColumnName);
int colIndexStabilityZoneType = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.ZoneTypeColumnName);
int colIndexForbiddenZoneFactor = CsvReaderUtilities.GetHeaderIndexByString(headers, LocationCsvColumnNames.ForbiddenZoneFactorColumnName);
@@ -305,11 +266,6 @@
colIndex = colIndexPolderlevel;
locationRecord.Polderlevel = Convert.ToDouble(csv[colIndexPolderlevel]);
}
- if (colIndexPolderlevellow > -1)
- {
- colIndex = colIndexPolderlevellow;
- locationRecord.Polderlevellow = Convert.ToDouble(csv[colIndexPolderlevellow]);
- }
if (colIndexHeadPl2 > -1)
{
colIndex = colIndexHeadPl2;
@@ -345,26 +301,6 @@
colIndex = colIndexOphoogmateriaalberm;
locationRecord.Ophoogmateriaalberm = csv[colIndexOphoogmateriaalberm];
}
- if (colIndexSheetpileX > -1)
- {
- colIndex = colIndexSheetpileX;
- locationRecord.SheetpileX = Convert.ToDouble(csv[colIndexSheetpileX]);
- }
- if (colIndexSheetpileY > -1)
- {
- colIndex = colIndexSheetpileY;
- locationRecord.SheetpileY = Convert.ToDouble(csv[colIndexSheetpileY]);
- }
- if (colIndexSheetpileZ > -1)
- {
- colIndex = colIndexSheetpileZ;
- locationRecord.SheetpileZ = Convert.ToDouble(csv[colIndexSheetpileZ]);
- }
- if (colIndexSheetpileLength > -1)
- {
- colIndex = colIndexSheetpileLength;
- locationRecord.SheetpileLength = Convert.ToDouble(csv[colIndexSheetpileLength]);
- }
if (colIndexUseOriginalPllineAssignments > -1)
{
colIndex = colIndexUseOriginalPllineAssignments;
@@ -460,31 +396,6 @@
colIndex = colIndexUpliftCriterionStability;
locationRecord.UpliftCriterionStability = Convert.ToDouble(csv[colIndexUpliftCriterionStability]);
}
- if (colIndexMateriaaltypedijk > -1)
- {
- colIndex = colIndexMateriaaltypedijk;
- locationRecord.Materiaaltypedijk = csv[colIndexMateriaaltypedijk];
- }
- if (colIndexBpTp > -1)
- {
- colIndex = colIndexBpTp;
- locationRecord.bp_tp = Convert.ToDouble(csv[colIndexBpTp]);
- }
- if (colIndexBpHbp > -1)
- {
- colIndex = colIndexBpHbp;
- locationRecord.bp_hbp = Convert.ToDouble(csv[colIndexBpHbp]);
- }
- if (colIndexBpLbp > -1)
- {
- colIndex = colIndexBpLbp;
- locationRecord.bp_lbp = Convert.ToDouble(csv[colIndexBpLbp]);
- }
- if (colIndexBaggerdiepte > -1)
- {
- colIndex = colIndexBaggerdiepte;
- locationRecord.Baggerdiepte = Convert.ToDouble(csv[colIndexBaggerdiepte]);
- }
if (colIndexDistanceToEntryPoint > -1)
{
colIndex = colIndexDistanceToEntryPoint;
@@ -510,26 +421,6 @@
colIndex = colIndexPLLineOffsetBelowDikeToeAtPolder;
locationRecord.PLLineOffsetBelowDikeToeAtPolder = Convert.ToDouble(csv[colIndexPLLineOffsetBelowDikeToeAtPolder]);
}
- if (colIndexPLLineOffsetDryBelowDikeTopAtRiver > -1)
- {
- colIndex = colIndexPLLineOffsetDryBelowDikeTopAtRiver;
- locationRecord.PLLineOffsetDryBelowDikeTopAtRiver = Convert.ToDouble(csv[colIndexPLLineOffsetDryBelowDikeTopAtRiver]);
- }
- if (colIndexPLLineOffsetDryBelowDikeTopAtPolder > -1)
- {
- colIndex = colIndexPLLineOffsetDryBelowDikeTopAtPolder;
- locationRecord.PLLineOffsetDryBelowDikeTopAtPolder = Convert.ToDouble(csv[colIndexPLLineOffsetDryBelowDikeTopAtPolder]);
- }
- if (colIndexPLLineOffsetDryBelowShoulderBaseInside > -1)
- {
- colIndex = colIndexPLLineOffsetDryBelowShoulderBaseInside;
- locationRecord.PLLineOffsetDryBelowShoulderBaseInside = Convert.ToDouble(csv[colIndexPLLineOffsetDryBelowShoulderBaseInside]);
- }
- if (colIndexPLLineOffsetDryBelowDikeToeAtPolder > -1)
- {
- colIndex = colIndexPLLineOffsetDryBelowDikeToeAtPolder;
- locationRecord.PLLineOffsetDryBelowDikeToeAtPolder = Convert.ToDouble(csv[colIndex]);
- }
if (colIndexPlLineOffsetBelowDikeCrestMiddle > -1)
{
colIndex = colIndexPlLineOffsetBelowDikeCrestMiddle;
@@ -540,16 +431,6 @@
colIndex = colIndexPlLineOffsetFactorBelowShoulderCrest;
locationRecord.PlLineOffsetFactorBelowShoulderCrest = Convert.ToDouble(csv[colIndex]);
}
- if (colIndexPlLineOffsetDryBelowDikeCrestMiddle > -1)
- {
- colIndex = colIndexPlLineOffsetDryBelowDikeCrestMiddle;
- locationRecord.PlLineOffsetDryBelowDikeCrestMiddle = Convert.ToDouble(csv[colIndex]);
- }
- if (colIndexPlLineOffsetDryFactorBelowShoulderCrest > -1)
- {
- colIndex = colIndexPlLineOffsetDryFactorBelowShoulderCrest;
- locationRecord.PlLineOffsetDryFactorBelowShoulderCrest = Convert.ToDouble(csv[colIndex]);
- }
if (colIndexUsePlLineOffsetBelowDikeCrestMiddle > -1)
{
colIndex = colIndexUsePlLineOffsetBelowDikeCrestMiddle;
@@ -560,16 +441,6 @@
colIndex = colIndexUsePlLineOffsetFactorBelowShoulderCrest;
locationRecord.UsePlLineOffsetFactorBelowShoulderCrest = Convert.ToBoolean(csv[colIndex]);
}
- if (colIndexUsePlLineOffsetDryBelowDikeCrestMiddle > -1)
- {
- colIndex = colIndexUsePlLineOffsetDryBelowDikeCrestMiddle;
- locationRecord.UsePlLineOffsetDryBelowDikeCrestMiddle = Convert.ToBoolean(csv[colIndex]);
- }
- if (colIndexUsePlLineOffsetDryFactorBelowShoulderCrest > -1)
- {
- colIndex = colIndexUsePlLineOffsetDryFactorBelowShoulderCrest;
- locationRecord.UsePlLineOffsetDryFactorBelowShoulderCrest = Convert.ToBoolean(csv[colIndex]);
- }
if (colIndexIntrusionVerticalWaterPressure > -1)
{
colIndex = colIndexIntrusionVerticalWaterPressure;
@@ -590,11 +461,6 @@
colIndex = colIndexStabilitySlopeAdaptionDeltaX;
locationRecord.StabilitySlopeAdaptionDeltaX = Convert.ToDouble(csv[colIndexStabilitySlopeAdaptionDeltaX]);
}
- if (colIndexDetrimentfactor > -1)
- {
- colIndex = colIndexDetrimentfactor;
- locationRecord.Detrimentfactor = Convert.ToDouble(csv[colIndexDetrimentfactor]);
- }
if (colIndexDikeTableHeight > -1)
{
colIndex = colIndexDikeTableHeight;
@@ -640,11 +506,6 @@
colIndex = colIndexSlopeDampingPiezometricHeightPolderSide;
locationRecord.SlopeDampingPiezometricHeightPolderSide = Convert.ToDouble(csv[colIndexSlopeDampingPiezometricHeightPolderSide]);
}
- if (colIndexRwBankProtectionBottomLevel > -1)
- {
- colIndex = colIndexRwBankProtectionBottomLevel;
- locationRecord.RwBankProtectionBottomLevel = Convert.ToDouble(csv[colIndexRwBankProtectionBottomLevel]);
- }
if (colIndexNewDikeTopWidth > -1)
{
colIndex = colIndexNewDikeTopWidth;
Index: DamClients/DamUI/trunk/src/Dam/Tests/CsvImporterTestsNew.cs
===================================================================
diff -u -r1467 -r2135
--- DamClients/DamUI/trunk/src/Dam/Tests/CsvImporterTestsNew.cs (.../CsvImporterTestsNew.cs) (revision 1467)
+++ DamClients/DamUI/trunk/src/Dam/Tests/CsvImporterTestsNew.cs (.../CsvImporterTestsNew.cs) (revision 2135)
@@ -27,10 +27,7 @@
using Deltares.Dam.Data.CsvImporters;
using Deltares.Dam.Data.Importers;
using Deltares.Dam.Data.IO;
-using Deltares.Geotechnics;
-using Deltares.Geotechnics.Soils;
using Deltares.Probabilistic;
-using Deltares.Standard;
using Deltares.Standard.EventPublisher;
using Deltares.Standard.Logging;
using Deltares.Standard.TestUtils;
@@ -697,18 +694,13 @@
Assert.AreEqual(2.0, locationRecords[1].XSoilgeometry2DOrigin, tolerance);
Assert.AreEqual("25-2-2-A-1-A", locationRecords[1].Pl1Id);
Assert.AreEqual(-0.25, locationRecords[1].Polderlevel, tolerance);
- Assert.AreEqual(0.2, locationRecords[0].Polderlevellow, tolerance);
Assert.AreEqual(0.8727, locationRecords[1].HeadPl2.Value, tolerance);
Assert.AreEqual(0.9, locationRecords[0].HeadPl3.Value, tolerance);
Assert.AreEqual(0.8, locationRecords[0].HeadPl4.Value, tolerance);
Assert.AreEqual(1.0, locationRecords[1].GrassQuality, tolerance);
Assert.AreEqual(1.0, locationRecords[1].Direction, tolerance);
Assert.AreEqual("klei", locationRecords[1].Ophoogmateriaaldijk);
Assert.AreEqual("klei2", locationRecords[1].Ophoogmateriaalberm);
- Assert.AreEqual(1.0, locationRecords[1].SheetpileX, tolerance);
- Assert.AreEqual(2.0, locationRecords[1].SheetpileY, tolerance);
- Assert.AreEqual(3.0, locationRecords[1].SheetpileZ, tolerance);
- Assert.AreEqual(12.0, locationRecords[1].SheetpileLength, tolerance);
Assert.AreEqual(true, locationRecords[0].UseOriginalPllineAssignments);
Assert.AreEqual(false, locationRecords[1].UseOriginalPllineAssignments);
Assert.AreEqual(1.3, locationRecords[1].PenetrationLength, tolerance);
@@ -729,24 +721,14 @@
Assert.AreEqual(0.03, locationRecords[1].ProbabilityOfFailurePiping, tolerance);
Assert.AreEqual(1.1, locationRecords[1].UpliftCriterionPiping, tolerance);
Assert.AreEqual(1.2, locationRecords[1].UpliftCriterionStability, tolerance);
- Assert.AreEqual("klei", locationRecords[1].Materiaaltypedijk);
- Assert.AreEqual(1.0, locationRecords[1].bp_tp, tolerance);
- Assert.AreEqual(1.1, locationRecords[1].bp_hbp, tolerance);
- Assert.AreEqual(1.2, locationRecords[1].bp_lbp, tolerance);
- Assert.AreEqual(2.0, locationRecords[1].Baggerdiepte, tolerance);
Assert.AreEqual(2.1, locationRecords[1].DistanceToEntryPoint, tolerance);
Assert.AreEqual(0.5, locationRecords[1].PLLineOffsetBelowDikeTopAtRiver, tolerance);
Assert.AreEqual(0.6, locationRecords[1].PLLineOffsetBelowDikeTopAtPolder, tolerance);
Assert.AreEqual(0.1, locationRecords[1].PLLineOffsetBelowShoulderBaseInside, tolerance);
Assert.AreEqual(0.2, locationRecords[1].PLLineOffsetBelowDikeToeAtPolder, tolerance);
- Assert.AreEqual(0.6, locationRecords[1].PLLineOffsetDryBelowDikeTopAtRiver, tolerance);
- Assert.AreEqual(1.6, locationRecords[1].PLLineOffsetDryBelowDikeTopAtPolder, tolerance);
- Assert.AreEqual(0.2, locationRecords[1].PLLineOffsetDryBelowShoulderBaseInside, tolerance);
- Assert.AreEqual(0.3, locationRecords[1].PLLineOffsetDryBelowDikeToeAtPolder, tolerance);
Assert.AreEqual(2.0, locationRecords[1].StabilityShoulderGrowSlope, tolerance);
Assert.AreEqual(0.2, locationRecords[1].StabilityShoulderGrowDeltaX, tolerance);
Assert.AreEqual(0.5, locationRecords[1].StabilitySlopeAdaptionDeltaX, tolerance);
- Assert.AreEqual(0.9, locationRecords[1].Detrimentfactor, tolerance);
Assert.AreEqual(3.5, locationRecords[1].DikeTableHeight, tolerance);
Assert.AreEqual(0.01, locationRecords[0].SlopeDampingPiezometricHeightPolderSide, tolerance);
Assert.AreEqual(0.2, locationRecords[1].SlopeDampingPiezometricHeightPolderSide, tolerance);
@@ -808,14 +790,6 @@
Assert.AreEqual(0.11, locationRecords[1].PlLineOffsetFactorBelowShoulderCrest, tolerance);
Assert.AreEqual(null, locationRecords[0].UsePlLineOffsetFactorBelowShoulderCrest);
Assert.AreEqual(null, locationRecords[1].UsePlLineOffsetFactorBelowShoulderCrest);
- Assert.AreEqual(1.1, locationRecords[0].PlLineOffsetDryBelowDikeCrestMiddle, tolerance);
- Assert.AreEqual(1.0, locationRecords[1].PlLineOffsetDryBelowDikeCrestMiddle, tolerance);
- Assert.AreEqual(true, locationRecords[0].UsePlLineOffsetDryBelowDikeCrestMiddle);
- Assert.AreEqual(false, locationRecords[1].UsePlLineOffsetDryBelowDikeCrestMiddle);
- Assert.AreEqual(0.11, locationRecords[0].PlLineOffsetDryFactorBelowShoulderCrest, tolerance);
- Assert.AreEqual(0.1, locationRecords[1].PlLineOffsetDryFactorBelowShoulderCrest, tolerance);
- Assert.AreEqual(false, locationRecords[0].UsePlLineOffsetDryFactorBelowShoulderCrest);
- Assert.AreEqual(true, locationRecords[1].UsePlLineOffsetDryFactorBelowShoulderCrest);
Assert.AreEqual(IntrusionVerticalWaterPressureType.Standard, locationRecords[0].IntrusionVerticalWaterPressure);
Assert.AreEqual(IntrusionVerticalWaterPressureType.SemiTimeDependent, locationRecords[1].IntrusionVerticalWaterPressure);
}
@@ -1005,7 +979,7 @@
{
DamEngine.Data.Standard.Calculation.ProgressDelegate progress = null;
var csvImporter = new CsvImporter();
- csvImporter.ImportCsvDataFromDirectory(testDataFolder, false, progress, DamType.Regional, DamProjectType.Assessment);
+ csvImporter.ImportCsvDataFromDirectory(testDataFolder, false, progress, DamType.Regional, DamProjectType.Design);
foreach (var errormessage in csvImporter.ErrorMessages)
{
LogManager.Messages.Add(errormessage);
@@ -1087,7 +1061,7 @@
const string testDataFolder = @"TestData\CsvData\Full1DProject\csvfiles";
DamEngine.Data.Standard.Calculation.ProgressDelegate progress = null;
var csvImporter = new CsvImporter();
- csvImporter.ImportCsvDataFromDirectory(testDataFolder, false, progress, DamType.Regional, DamProjectType.Assessment);
+ csvImporter.ImportCsvDataFromDirectory(testDataFolder, false, progress, DamType.Regional, DamProjectType.Design);
foreach (var errormessage in csvImporter.ErrorMessages)
{
LogManager.Messages.Add(errormessage);
@@ -1136,18 +1110,13 @@
Assert.AreEqual(2.0, location.XSoilGeometry2DOrigin, tolerance);
//Assert.AreEqual("25-2-2-A-1-A", location.PL1Line.Name);
Assert.AreEqual(-0.25, location.PolderLevel, tolerance);
- Assert.AreEqual(-0.25, location.PolderLevelLow, tolerance);
Assert.AreEqual(0.8727, location.HeadPL2.Value, tolerance);
Assert.AreEqual(-0.25, location.HeadPl3.Value, tolerance);
Assert.AreEqual(-0.25, location.HeadPl4.Value, tolerance);
Assert.AreEqual(1.0, location.GrassQuality, tolerance);
Assert.AreEqual(1.0, location.Direction, tolerance);
Assert.AreEqual("klei", location.DikeEmbankmentMaterial);
Assert.AreEqual("klei2", location.ShoulderEmbankmentMaterial);
- Assert.AreEqual(1.0, location.SheetPilePoint.X, tolerance);
- Assert.AreEqual(2.0, location.SheetPilePoint.Y, tolerance);
- Assert.AreEqual(3.0, location.SheetPilePoint.Z, tolerance);
- Assert.AreEqual(12.0, location.SheetPileLength, tolerance);
Assert.AreEqual(false, location.IsUseOriginalPLLineAssignments);
Assert.AreEqual(1.3, location.PenetrationLength, tolerance);
Assert.AreEqual(10, location.TrafficLoad, tolerance);
@@ -1167,24 +1136,14 @@
Assert.AreEqual(0.03, location.ModelFactors.RequiredProbabilityOfFailurePiping.Value, tolerance);
Assert.AreEqual(1.1, location.ModelFactors.UpliftCriterionPiping.Value, tolerance);
Assert.AreEqual(1.2, location.ModelFactors.UpliftCriterionStability.Value, tolerance);
- Assert.AreEqual(SoilType.Clay, location.DikeMaterialType);
- Assert.AreEqual(1.0, location.BoezemLevelTp, tolerance);
- Assert.AreEqual(1.1, location.BoezemLevelHbp, tolerance);
- Assert.AreEqual(1.2, location.BoezemLevelLbp, tolerance);
- Assert.AreEqual(2.0, location.DredgingDepth, tolerance);
Assert.AreEqual(2.1, location.DistanceToEntryPoint, tolerance);
Assert.AreEqual(0.5, location.PlLineOffsetBelowDikeTopAtRiver, tolerance);
Assert.AreEqual(0.6, location.PlLineOffsetBelowDikeTopAtPolder, tolerance);
Assert.AreEqual(0.1, location.PlLineOffsetBelowShoulderBaseInside, tolerance);
Assert.AreEqual(0.2, location.PlLineOffsetBelowDikeToeAtPolder, tolerance);
- Assert.AreEqual(0.6, location.PLLineOffsetDryBelowDikeTopAtRiver, tolerance);
- Assert.AreEqual(1.6, location.PLLineOffsetDryBelowDikeTopAtPolder, tolerance);
- Assert.AreEqual(0.2, location.PLLineOffsetDryBelowShoulderBaseInside, tolerance);
- Assert.AreEqual(0.3, location.PLLineOffsetDryBelowDikeToeAtPolder, tolerance);
Assert.AreEqual(2.0, location.StabilityShoulderGrowSlope, tolerance);
Assert.AreEqual(0.2, location.StabilityShoulderGrowDeltaX, tolerance);
Assert.AreEqual(0.5, location.StabilitySlopeAdaptionDeltaX, tolerance);
- Assert.AreEqual(0.9, location.DetrimentFactor, tolerance);
Assert.AreEqual(3.5, location.DikeTableHeight, tolerance);
}
}
Fisheye: Tag 2135 refers to a dead (removed) revision in file `DamClients/DamUI/trunk/src/Dam/Forms/LocationScenarioChart.resx'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 2135 refers to a dead (removed) revision in file `DamClients/DamUI/trunk/src/Dam/Forms/LocationScenarioChart.Designer.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: DamClients/DamUI/trunk/src/Dam/Tests/WaterBoardImporterTest.cs
===================================================================
diff -u -r875 -r2135
--- DamClients/DamUI/trunk/src/Dam/Tests/WaterBoardImporterTest.cs (.../branches/CalcualtionIncluded/src/Dam/Tests/WaterBoardImporterTest.cs) (revision 875)
+++ DamClients/DamUI/trunk/src/Dam/Tests/WaterBoardImporterTest.cs (.../trunk/src/Dam/Tests/WaterBoardImporterTest.cs) (revision 2135)
@@ -1,36 +1,35 @@
-//-----------------------------------------------------------------------
-//
-// Copyright (c) 2011 Deltares. All rights reserved.
-//
-// B.S.T. The
-// tom.the@deltares.nl
-// 20-12-2011
-// Test if data can be imported with definition file
-//-----------------------------------------------------------------------
+// Copyright (C) Stichting Deltares 2018. All rights reserved.
+//
+// This file is part of the application DAM - UI.
+//
+// DAM - UI is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
using System.IO;
using Deltares.Dam.Data.DataPlugins.Configuration;
-using Deltares.Geotechnics;
-using Deltares.Geotechnics.Soils;
-using Deltares.Standard;
-using Deltares.Standard.Logging;
namespace Deltares.Dam.Tests
{
- using System;
+
using System.Collections.Generic;
using System.Linq;
- using System.Text;
using Deltares.Dam.Data;
using NUnit.Framework;
- internal class DikeRingInfo
- {
- public string DefinitionFilename = "";
- public string ProjectFilename = "";
- public int LocationCount = 0;
- }
-
[TestFixture]
public class WaterBoardImporterTest
{
@@ -42,24 +41,6 @@
private const string dikeRingId_TPL_BALGZANDKANAAL = "TPL_BALGZANDKANAAL";
[Test]
- public void CanImportDikeRingsOfHHNK()
- {
- const string definitionFilename = @"..\..\..\data\Dam\Waterboards\HHNK\HHNK.defx";
- DataSourceContainer dataSourceContainer = DataSourceContainer.Deserialize(definitionFilename);
- string damProjectFolder = Path.GetDirectoryName(definitionFilename);
-
- List importLogMessages;
- List dikeRingIds = WaterBoardImporter.ImportDikeRingIds(damProjectFolder, dataSourceContainer, DamType.Regional, DamProjectType.Assessment, out importLogMessages).ToList();
- Assert.AreEqual(50, dikeRingIds.Count);
-
- //List selectedDikeIds = new List();
- //selectedDikeIds.Add(dikeRingIds[0]);
- //selectedDikeIds.Add(dikeRingIds[1]);
- //WaterBoard waterBoard = waterBoardImporter.ImportDataForDikeRings(damProjectFolder, dataSourceContainer,
- // selectedDikeIds, DamType.Primary, null);
- }
-
- [Test]
[Ignore("Under construction")]
public void CanImportDeltaDijkSmallIntoProject()
{
@@ -122,127 +103,6 @@
}
}
- [Test]
- [Ignore("For now only the dikering in the csv file will be read; so dikelist count will allways be 1")]
- public void CanImportHHNKDikeRingListWithWaterBoardImporter()
- {
- const string definitionFilenameHemPolder = @"..\..\..\data\Dam\Waterboards\HHNK All\TPL_Hempolder\HHNK.defx";
- const string definitionFilenameBalgzandKanaal = @"..\..\..\data\Dam\Waterboards\HHNK All\TPL_BALGZANDKANAAL\HHNK.defx";
- //const string definitionFilename = @"..\..\..\data\Dam\Waterboards\HHNK\HHNK.defx";
- const string projectFilename = @"..\..\..\data\Dam\Waterboards\HHNK\HHNK";
-
- using (var damProject = new DamProject
- {
- DamProjectData =
- {
- WaterBoard = new WaterBoard(),
- DamProjectType = DamProjectType.Assessment
- }
- })
- {
- //IList dikeList =
- // waterBoardImporter.ImportDikeRingIds(damProjectFolder, dataSourceContainer).ToList();
- // Assert.AreEqual(50, dikeList.Count);
- var selectedDikeIds = new List { dikeRingId_Hempolder };
- DataSourceContainer dataSourceContainer = DataSourceContainer.Deserialize(definitionFilenameHemPolder);
- string damImportFolder = Path.GetDirectoryName(definitionFilenameHemPolder);
- string damProjectFolder = Path.GetDirectoryName(damProject.ProjectFileName);
- using (WaterBoard waterBoard = WaterBoardImporter.ImportDataForDikeRings(damProjectFolder, damImportFolder,
- dataSourceContainer,
- selectedDikeIds, DamType.Primary, DamProjectType.Calamity, null))
- {
- damProject.DamProjectData.WaterBoard.Dikes.Add(waterBoard.Dikes[0]);
-
- selectedDikeIds = new List() { dikeRingId_TPL_BALGZANDKANAAL };
- dataSourceContainer = DataSourceContainer.Deserialize(definitionFilenameBalgzandKanaal);
- damImportFolder = Path.GetDirectoryName(definitionFilenameBalgzandKanaal);
- }
-
- using (WaterBoard waterBoard = WaterBoardImporter.ImportDataForDikeRings(damProjectFolder, damImportFolder,
- dataSourceContainer,
- selectedDikeIds, DamType.Primary, DamProjectType.Calamity, null))
- {
- damProject.DamProjectData.WaterBoard.Dikes.Add(waterBoard.Dikes[0]);
-
- damProject.SaveXMLProject(projectFilename, null);
-
-
- Assert.AreEqual(2, waterBoard.Dikes.Count);
- Assert.AreEqual(dikeRingId_Hempolder, waterBoard.Dikes[0].Name);
- Assert.AreEqual(dikeRingId_TPL_BALGZANDKANAAL, waterBoard.Dikes[1].Name);
- Assert.AreEqual(43, waterBoard.Dikes[0].Locations.Count);
- Assert.AreEqual(107, waterBoard.Dikes[1].Locations.Count);
-
- CheckWaterBoardData(waterBoard);
- }
- }
- }
-
- [Test]
- [Category("Integration")]
- [Ignore("Takes 36 minutes on buildserver")]
- public void CanImportHHNKDikeRingListWithDampingFactor()
- {
- const string definitionFilename = @"..\..\..\data\Dam\Waterboards\HHNK\dampingfactortest.defx";
-
- DataSourceContainer dataSourceContainer = DataSourceContainer.Deserialize(definitionFilename);
- string damImportFolder = Path.GetDirectoryName(definitionFilename);
- List importLogMessages;
- IList dikeList =
- WaterBoardImporter.ImportDikeRingIds(damImportFolder, dataSourceContainer, DamType.Regional, DamProjectType.Assessment, out importLogMessages).ToList();
- var selectedDikeIds = new List() {dikeRingId_Hempolder, dikeRingId_TPL_BALGZANDKANAAL};
- using (WaterBoard waterBoard = WaterBoardImporter.ImportDataForDikeRings("", damImportFolder, dataSourceContainer,
- selectedDikeIds, DamType.Regional, DamProjectType.Assessment, null))
- {
- Location location = waterBoard.Dikes[0].Locations.FirstOrDefault(t => t.Name == "TPL_Hempolder_0010");
- Assert.AreEqual(0, location.DampingFactorPL3, cToleranceCoordinates);
- }
- }
-
- [Test]
- [Category("Integration")]
- [Ignore("Takes 36 minutes on buildserver")]
- public void CanImportHHNKDikeRingListWithTrafficLoad()
- {
- const string definitionFilename = @"..\..\..\data\Dam\Waterboards\HHNK\trafficloadtest.defx";
-
- DataSourceContainer dataSourceContainer = DataSourceContainer.Deserialize(definitionFilename);
- string damImportFolder = Path.GetDirectoryName(definitionFilename);
- List importLogMessages;
- IList dikeList =
- WaterBoardImporter.ImportDikeRingIds(damImportFolder, dataSourceContainer, DamType.Regional, DamProjectType.Assessment, out importLogMessages).ToList();
- var selectedDikeIds = new List() {dikeRingId_Hempolder, dikeRingId_TPL_BALGZANDKANAAL};
- using (WaterBoard waterBoard = WaterBoardImporter.ImportDataForDikeRings("", damImportFolder, dataSourceContainer,
- selectedDikeIds, DamType.Regional, DamProjectType.Assessment, null))
- {
- Location location = waterBoard.Dikes[0].Locations.FirstOrDefault(t => t.Name == "TPL_Hempolder_0010");
- Assert.AreEqual(5, location.TrafficLoad, cToleranceCoordinates);
- }
- }
-
- [Test]
- [Category("Integration")]
- [Ignore("Takes 46 minutes on buildserver")]
- public void CanImportHHNKDikeRingListWithHeadPL3()
- {
- const string definitionFilename = @"..\..\..\data\Dam\Waterboards\HHNK\headpl3test.defx";
-
- DataSourceContainer dataSourceContainer = DataSourceContainer.Deserialize(definitionFilename);
- string damImportFolder = Path.GetDirectoryName(definitionFilename);
- List importLogMessages;
- IList dikeList =
- WaterBoardImporter.ImportDikeRingIds(damImportFolder, dataSourceContainer, DamType.Regional, DamProjectType.Assessment, out importLogMessages).ToList();
- var selectedDikeIds = new List() {dikeRingId_Hempolder, dikeRingId_TPL_BALGZANDKANAAL};
- using (WaterBoard waterBoard = WaterBoardImporter.ImportDataForDikeRings("", damImportFolder, dataSourceContainer,
- selectedDikeIds, DamType.Regional, DamProjectType.Assessment, null))
- {
- Location location = waterBoard.Dikes[0].Locations.FirstOrDefault(t => t.Name == "TPL_Hempolder_0070");
- Assert.AreEqual(-1.50, location.HeadPl3.HasValue ? location.HeadPl3.Value : double.MinValue,
- cToleranceCoordinates);
- }
- }
-
-
private void CheckWaterBoardData(WaterBoard waterBoard)
{
// Check for TLP_Hempolder_0010 and TLP_Hempolder_0170
@@ -253,13 +113,9 @@
Assert.AreEqual(506907.4483, location.YRd, cToleranceCoordinates);
Assert.AreEqual("235", location.SegmentId);
Assert.AreEqual(-1.4, location.PolderLevel, cToleranceValues);
- Assert.AreEqual(-1.4, location.PolderLevelLow, cToleranceValues);
Assert.AreEqual(-1.3, location.HeadPl3.Value, cToleranceValues);
- Assert.AreEqual(SoilType.Clay, location.DikeMaterialType);
Assert.AreEqual(0.0, location.DampingFactorPL3, cToleranceValues);
Assert.AreEqual(0.0, location.DampingFactorPL4, cToleranceValues);
- Assert.AreEqual(8.6, location.SheetPileLength, cToleranceValues);
- Assert.AreEqual(-9.1, location.RwBankProtectionBottomLevel, cToleranceValues);
Assert.AreEqual(0.0, location.PenetrationLength, cToleranceValues);
Assert.AreEqual(5.0, location.TrafficLoad, cToleranceValues);
Assert.AreEqual(PLLineCreationMethod.ExpertKnowledgeRRD, location.PLLineCreationMethod);
@@ -268,15 +124,7 @@
Assert.AreEqual(0.0, location.PlLineOffsetBelowDikeTopAtPolder, cToleranceValues);
Assert.AreEqual(0.25, location.PlLineOffsetBelowShoulderBaseInside, cToleranceValues);
Assert.AreEqual(0.0, location.PlLineOffsetBelowDikeToeAtPolder, cToleranceValues);
- Assert.AreEqual(1.5, location.PLLineOffsetDryBelowDikeTopAtRiver, cToleranceValues);
- Assert.AreEqual(1.5, location.PLLineOffsetDryBelowDikeTopAtPolder, cToleranceValues);
- Assert.AreEqual(1.5, location.PLLineOffsetDryBelowShoulderBaseInside, cToleranceValues);
- Assert.AreEqual(0.0, location.PLLineOffsetDryBelowDikeToeAtPolder, cToleranceValues);
-
- Assert.AreEqual(-4.8, location.DredgingDepth, cToleranceValues);
- Assert.AreEqual(0.0, location.BoezemLevelTp, cToleranceValues);
- Assert.AreEqual(-0.5, location.BoezemLevelHbp, cToleranceValues);
- Assert.AreEqual(-0.3, location.BoezemLevelLbp, cToleranceValues);
+
Assert.AreEqual(1.5, location.MinimalCircleDepth, cToleranceValues);
Assert.AreEqual(1.2, location.ModelFactors.RequiredSafetyFactorPiping.Value, cToleranceValues);
Assert.AreEqual(1.2, location.ModelFactors.UpliftCriterionPiping.Value, cToleranceValues);
@@ -287,370 +135,8 @@
Assert.AreEqual(507499.3175, location.YRd, cToleranceCoordinates);
Assert.AreEqual("234", location.SegmentId);
Assert.AreEqual(-1.3, location.PolderLevel, cToleranceValues);
- Assert.AreEqual(-1.4, location.PolderLevelLow, cToleranceValues);
Assert.AreEqual(-1.9, location.HeadPl3.Value, cToleranceValues);
Assert.AreEqual(5.0, location.TrafficLoad, cToleranceValues);
- }
-
- ///
- /// Read Delfland data
- ///
- [Test]
- public void CanImportDelfland()
- {
- const string definitionFilename = @"..\..\..\data\Dam\Waterboards\Delfland\Delfland.defx";
- using (var damProject = new DamProject())
- {
- damProject.ImportWithDefinitionFile(definitionFilename, DamType.Regional, DamProjectType.Assessment, null);
- Assert.AreEqual(1, damProject.DamProjectData.WaterBoard.Dikes.Count);
- Assert.AreEqual(9, damProject.DamProjectData.WaterBoard.Dikes[0].Locations.Count);
- }
- }
-
- ///
- /// Create list of all dikerings of HHNK
- ///
- ///
- private List CreateHhnkDikeRinglist()
- {
- var dikeRingInfoList = new List();
-
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 89,
- ProjectFilename = "TPL_BALGZANDKANAAL",
- DefinitionFilename = @"TPL_BALGZANDKANAAL\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 6,
- ProjectFilename = "TPL_BEEMSTER_BU",
- DefinitionFilename = @"TPL_BEEMSTER_BU\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 19,
- ProjectFilename = "TPL_BERKMEER_ZUID",
- DefinitionFilename = @"TPL_BERKMEER_ZUID\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 3,
- ProjectFilename = "TPL_BLIJKMEER",
- DefinitionFilename = @"TPL_BLIJKMEER\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 5,
- ProjectFilename = "TPL_BOEZEM_ALKMAAR",
- DefinitionFilename = @"TPL_BOEZEM_ALKMAAR\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 70,
- ProjectFilename = "TPL_BOEZEM_DH",
- DefinitionFilename = @"TPL_BOEZEM_DH\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 33,
- ProjectFilename = "TPL_BROEKERMEER",
- DefinitionFilename = @"TPL_BROEKERMEER\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 46,
- ProjectFilename = "TPL_Buikslotermeer",
- DefinitionFilename = @"TPL_Buikslotermeer\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 5,
- ProjectFilename = "TPL_BURKMEER",
- DefinitionFilename = @"TPL_BURKMEER\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 38,
- ProjectFilename = "TPL_DRIKHORN",
- DefinitionFilename = @"TPL_DRIKHORN\HHNK.defx"
- });
-
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 43,
- ProjectFilename = "TPL_Hempolder",
- DefinitionFilename = @"TPL_Hempolder\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 2,
- ProjectFilename = "TPL_HV_04090_BU",
- DefinitionFilename = @"TPL_HV_04090_BU\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 1,
- ProjectFilename = "TPL_Karspel_BR",
- DefinitionFilename = @"TPL_Karspel_BR\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 237,
- ProjectFilename = "TPL_K_O_K_N",
- DefinitionFilename = @"TPL_K_O_K_N\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 186,
- ProjectFilename = "TPL_LRHHW",
- DefinitionFilename = @"TPL_LRHHW\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 96,
- ProjectFilename = "TPL_LRHHW2",
- DefinitionFilename = @"TPL_LRHHW2\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 136,
- ProjectFilename = "TPL_M_H",
- DefinitionFilename = @"TPL_M_H\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 27,
- ProjectFilename = "TPL_MONNIKENMEER",
- DefinitionFilename = @"TPL_MONNIKENMEER\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 56,
- ProjectFilename = "TPL_NAUERNASCHE_VAART_Z",
- DefinitionFilename = @"TPL_NAUERNASCHE_VAART_Z\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 215,
- ProjectFilename = "TPL_NHK_AFTAKKINGEN_NO",
- DefinitionFilename = @"TPL_NHK_AFTAKKINGEN_NO\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 113,
- ProjectFilename = "TPL_NHK_AFTAKKINGEN_NW_A",
- DefinitionFilename = @"TPL_NHK_AFTAKKINGEN_NW_A \HHNK.defx"
- });
-
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 64,
- ProjectFilename = "TPL_NHK_AFTAKKINGEN_NW_B",
- DefinitionFilename = @"TPL_NHK_AFTAKKINGEN_NW_B\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 127,
- ProjectFilename = "TPL_NHK_AFTAKKINGEN_ZO",
- DefinitionFilename = @"TPL_NHK_AFTAKKINGEN_ZO\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 28,
- ProjectFilename = "TPL_NHK_AFTAKKINGEN_ZW",
- DefinitionFilename = @"TPL_NHK_AFTAKKINGEN_ZW\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 54,
- ProjectFilename = "TPL_NHK_TZAND_DH_L",
- DefinitionFilename = @"TPL_NHK_TZAND_DH_L\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 73,
- ProjectFilename = "TPL_NHK_TZAND_DHR_R",
- DefinitionFilename = @"TPL_NHK_TZAND_DHR_R\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 229,
- ProjectFilename = "TPL_NHK_TZAND_ZIJPERSLUIS",
- DefinitionFilename = @"TPL_NHK_TZAND_ZIJPERSLUIS\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 29,
- ProjectFilename = "TPL_NOORMEER",
- DefinitionFilename = @"TPL_NOORMEER\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 57,
- ProjectFilename = "TPL_OUDE_VEER",
- DefinitionFilename = @"TPL_OUDE_VEER\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 27,
- ProjectFilename = "TPL_OUDORPERPOLDER",
- DefinitionFilename = @"TPL_OUDORPERPOLDER\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 124,
- ProjectFilename = "TPL_PURMERRINGVAART_BU",
- DefinitionFilename = @"TPL_PURMERRINGVAART_BU\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 101,
- ProjectFilename = "TPL_SBN_E_B",
- DefinitionFilename = @"TPL_SBN_E_B\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 221,
- ProjectFilename = "TPL_SCHAGEN_KOLHORN",
- DefinitionFilename = @"TPL_SCHAGEN_KOLHORN\HHNK.defx"
- });
-
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 30,
- ProjectFilename = "TPL_SCHERMER_BUITEN",
- DefinitionFilename = @"TPL_SCHERMER_BUITEN\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 30,
- ProjectFilename = "TPL_SCHERMER_BUITENRING",
- DefinitionFilename = @"TPL_SCHERMER_BUITENRING\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 69,
- ProjectFilename = "TPL_STARNMEER_BINNEN",
- DefinitionFilename = @"TPL_STARNMEER_BINNEN\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 29,
- ProjectFilename = "TPL_STARNMEER_BUITEN",
- DefinitionFilename = @"TPL_STARNMEER_BUITEN\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 90,
- ProjectFilename = "TPL_TTWISKE",
- DefinitionFilename = @"TPL_TTWISKE\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 47,
- ProjectFilename = "TPL_VOORL_W",
- DefinitionFilename = @"TPL_VOORL_W\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 168,
- ProjectFilename = "TPL_WAARD_GROETKANAAL",
- DefinitionFilename = @"TPL_WAARD_GROETKANAAL\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 59,
- ProjectFilename = "TPL_WESTZ_NAUERN",
- DefinitionFilename = @"TPL_WESTZ_NAUERN\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 38,
- ProjectFilename = "TPL_W_L_",
- DefinitionFilename = @"TPL_W_L_\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 9,
- ProjectFilename = "TPL_ZAAN",
- DefinitionFilename = @"TPL_ZAAN\HHNK.defx"
- });
- dikeRingInfoList.Add(new DikeRingInfo
- {
- LocationCount = 181,
- ProjectFilename = "TPL_NHK_ZIJPERSLUIS_ALKMAAR",
- DefinitionFilename = @"TPL_NHK_ZIJPERSLUIS_ALKMAAR\HHNK.defx"
- });
-
-
- return dikeRingInfoList;
- }
-
- [Test]
- [Ignore("Not a test, but just to import dikerings HHNK")]
- public void CanImportAllHhnkDikerings()
- {
- List dikeRingInfoList = CreateHhnkDikeRinglist();
- var messages = new List();
- foreach (DikeRingInfo dikeRingInfo in dikeRingInfoList)
- {
- using (var damProject = new DamProject())
- {
- string defintionFilename = Path.Combine(rootPath, dikeRingInfo.DefinitionFilename);
- string projectFilename = Path.Combine(rootPath, dikeRingInfo.ProjectFilename);
- DateTime startTime = DateTime.Now;
- try
- {
- damProject.ImportWithDefinitionFile(defintionFilename, DamType.Regional, DamProjectType.Assessment, null);
- damProject.DamProjectData.DamProjectType = DamProjectType.Assessment;
- damProject.SaveXMLProject(projectFilename, null);
- DateTime endTime = DateTime.Now;
- TimeSpan timeSpan = endTime - startTime;
- messages.Add(String.Format("Imported '{0}': location count = {1}, time = {2}",
- dikeRingInfo.ProjectFilename,
- damProject.DamProjectData.WaterBoard.Dikes[0].Locations.Count, timeSpan));
- Assert.AreEqual(1, damProject.DamProjectData.WaterBoard.Dikes.Count);
- Assert.AreEqual(dikeRingInfo.LocationCount,
- damProject.DamProjectData.WaterBoard.Dikes[0].Locations.Count);
- }
- catch (Exception e)
- {
- messages.Add(String.Format("Error importing '{0}': {1}", dikeRingInfo.ProjectFilename, e.Message));
- }
- string messagesFilename = Path.Combine(rootPath, "Import.log");
- File.WriteAllLines(messagesFilename, messages.ToArray());
- }
- }
- }
-
- [Test]
- [Category("Integration")]
- [Ignore("Takes more than 17 minutes on buildserver")]
- public void CanImportHHNKDikeRingListWithScenarios()
- {
- const string definitionFilename = @"..\..\..\data\Dam\Waterboards\HHNK\scenariostest.defx";
-
- DataSourceContainer dataSourceContainer = DataSourceContainer.Deserialize(definitionFilename);
- string damImportFolder = Path.GetDirectoryName(definitionFilename);
- List importLogMessages;
- IList dikeList =
- WaterBoardImporter.ImportDikeRingIds(damImportFolder, dataSourceContainer, DamType.Regional, DamProjectType.Assessment, out importLogMessages).ToList();
- var selectedDikeIds = new List() { dikeRingId_Hempolder, dikeRingId_TPL_BALGZANDKANAAL };
- using (WaterBoard waterBoard = WaterBoardImporter.ImportDataForDikeRings("", damImportFolder, dataSourceContainer,
- selectedDikeIds, DamType.Regional, DamProjectType.Assessment, null))
- {
- Location location = waterBoard.Dikes[0].Locations.FirstOrDefault(t => t.Name == "TPL_Hempolder_0070");
- Assert.AreEqual(10, location.Scenarios.Count);
- var scenario = location.Scenarios.FirstOrDefault(n => n.LocationScenarioID.Equals("2"));
- Assert.AreEqual(1.09, scenario.RiverLevel, cToleranceValues);
- Assert.AreEqual(2.46, scenario.DikeTableHeight.Value, cToleranceValues);
- Assert.AreEqual(1.19, scenario.ModelFactors.RequiredSafetyFactorStabilityInnerSlope.Value, cToleranceValues);
- Assert.AreEqual(0.4, scenario.WaterHeightDecimeringsHoogte.Value, cToleranceValues);
- Assert.AreEqual(4.0, scenario.MaxWaterLevel.Value, cToleranceValues);
- Assert.AreEqual(0.001, scenario.ModelFactors.RequiredProbabilityOfFailureStabilityInnerslope.Value, cToleranceValues);
- Assert.AreEqual(0.001, scenario.ModelFactors.RequiredProbabilityOfFailurePiping.Value, cToleranceValues);
- }
- }
+ }
}
}
\ No newline at end of file
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Importers/LocationShapeFileAttributeMap.cs
===================================================================
diff -u -r2089 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Importers/LocationShapeFileAttributeMap.cs (.../LocationShapeFileAttributeMap.cs) (revision 2089)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Importers/LocationShapeFileAttributeMap.cs (.../LocationShapeFileAttributeMap.cs) (revision 2135)
@@ -72,11 +72,6 @@
public const string PolderLevelAttributeId = LocationCsvColumnNames.PolderLevelColumnName;
///
- /// PolderLevellow PolderLevel.shp PLLow double
- ///
- public const string PolderLevelLowAttributeId = LocationCsvColumnNames.PolderLevelLowColumnName;
-
- ///
/// head_pl2 HeadPL2.shp HeadPL2 double
///
public const string HeadPl2AttributeId = LocationCsvColumnNames.HeadPl2ColumnName;
@@ -154,40 +149,6 @@
public const string DampingFactorPl4AttributeId = LocationCsvColumnNames.DampingFactorPl4ColumnName;
///
- /// Sheetpile_length
- /// CustomShape
- /// SheetPile_Length.shp
- /// SheetPileL
- /// double
- ///
- public const string SheetPileLengthAttributeId = LocationCsvColumnNames.SheetPileLengthColumnName;
-
- ///
- /// SheetpilePointLevel
- /// CustomShape
- /// SheetPile_Length.shp
- /// SHTPPLVL
- /// double
- ///
- public const string RwBankProtectionBottomLevelAttributeId = LocationCsvColumnNames.RwBankProtectionBottomLevelColumnName;
-
-
- ///
- /// Sheetpile_x CustomShape Sheetpile_x.shp SheetPileX double
- ///
- public const string SheetpileXAttributeId = LocationCsvColumnNames.SheetPileXRdColumnName;
-
- ///
- /// Sheetpile_y CustomShape Sheetpile_y.shp SheetPileY double
- ///
- public const string SheetpileYAttributeId = LocationCsvColumnNames.SheetPileYRdColumnName;
-
- ///
- /// Sheetpile_z CustomShape Sheetpile_z.shp SheetPileZ double
- ///
- public const string SheetpileZAttributeId = LocationCsvColumnNames.SheetPileZRdColumnName;
-
- ///
/// use_original_plline_assignments CustomShape use_original_plline_assignments.shp IsOrgPLs bool
///
public const string UseOriginalPlLineAssignmentsAttributeId = LocationCsvColumnNames.UseOriginalPlLineAssignmentsColumnName;
@@ -258,42 +219,6 @@
public const string PlLineOffsetBelowDikeToeAtPolderAttributeId = LocationCsvColumnNames.PlLineOffsetBelowDikeToeAtPolderColumnName;
///
- /// PLLineOffsetDryBelowDikeTopAtRiver
- /// CustomShape
- /// PLLineOffsetDryBelowDikeTopAtRiver.shp
- /// PLBlTDRvrD
- /// double
- ///
- public const string PlLineOffsetDryBelowDikeTopAtRiverAttributeId = LocationCsvColumnNames.PlLineOffsetDryBelowDikeTopAtRiverColumnName;
-
- ///
- /// PLLineOffsetDryBelowDikeTopAtPolder
- /// CustomShape
- /// PLLineOffsetDryBelowDikeTopAtPolder.shp
- /// PLBlTDPldD
- /// double
- ///
- public const string PlLineOffsetDryBelowDikeTopAtPolderAttributeId = LocationCsvColumnNames.PlLineOffsetDryBelowDikeTopAtPolderColumnName;
-
- ///
- /// PLLineOffsetDryBelowShoulderBaseInside
- /// CustomShape
- /// PLLineOffsetDryBelowShoulderBaseInside.shp
- /// PLBlTDShD
- /// double
- ///
- public const string PlLineOffsetDryBelowShoulderBaseInsideAttributeId = LocationCsvColumnNames.PlLineOffsetDryBelowShoulderBaseInsideColumnName;
-
- ///
- /// PLLineOffsetDryBelowDikeToeAtPolder
- /// CustomShape
- /// PLLineOffsetDryBelowDikeToeAtPolder.shp
- /// PLBlDTPldD
- /// double
- ///
- public const string PlLineOffsetDryBelowDikeToeAtPolderAttributeId = LocationCsvColumnNames.PlLineOffsetDryBelowDikeToeAtPolderColumnName;
-
- ///
/// PlLineOffsetBelowDikeCrestMiddle
/// CustomShape
/// PlLineOffsetBelowDikeCrestMiddle.shp
@@ -312,24 +237,6 @@
public const string PlLineOffsetFactorBelowShoulderCrestAttributeId = LocationCsvColumnNames.PlLineOffsetFactorBelowShoulderCrest;
///
- /// PlLineOffsetDryBelowDikeCrestMiddle
- /// CustomShape
- /// PlLineOffsetDryBelowDikeCrestMiddle.shp
- /// PLDBlDCM
- /// double
- ///
- public const string PlLineOffsetDryBelowDikeCrestMiddleAttributeId = LocationCsvColumnNames.PlLineOffsetDryBelowDikeCrestMiddle;
-
- ///
- /// PlLineOffsetDryFactorBelowShoulderCrest
- /// CustomShape
- /// PlLineOffsetDryFactorBelowShoulderCrest.shp
- /// PLDFBlSC
- /// double
- ///
- public const string PlLineOffsetDryFactorBelowShoulderCrestAttributeId = LocationCsvColumnNames.PlLineOffsetDryFactorBelowShoulderCrest;
-
- ///
/// UsePlLineOffsetBelowDikeCrestMiddle
/// CustomShape
/// UsePlLineOffsetBelowDikeCrestMiddle.shp
@@ -348,24 +255,6 @@
public const string UsePlLineOffsetFactorBelowShoulderCrestAttributeId = LocationCsvColumnNames.UsePlLineOffsetFactorBelowShoulderCrest;
///
- /// UsePlLineOffsetDryBelowDikeCrestMiddle
- /// CustomShape
- /// UsePlLineOffsetDryBelowDikeCrestMiddle.shp
- /// UPLDBlDCM
- /// double
- ///
- public const string UsePlLineOffsetDryBelowDikeCrestMiddleAttributeId = LocationCsvColumnNames.UsePlLineOffsetDryBelowDikeCrestMiddle;
-
- ///
- /// UsePlLineOffsetDryFactorBelowShoulderCrest
- /// CustomShape
- /// UsePlLineOffsetDryFactorBelowShoulderCrest.shp
- /// UPLDFBlSC
- /// double
- ///
- public const string UsePlLineOffsetDryFactorBelowShoulderCrestAttributeId = LocationCsvColumnNames.UsePlLineOffsetDryFactorBelowShoulderCrest;
-
- ///
/// The intrusion vertical water pressure attribute identifier
/// CustomShape
/// IntrusionVerticalWaterPressure.shp
@@ -402,42 +291,6 @@
public const string StabilitySlopeAdaptionDeltaXAttributeId = LocationCsvColumnNames.StabilitySlopeAdaptionDeltaXColumnName;
///
- /// baggerdiepte
- /// CustomShape
- /// baggerdiepte.shp
- /// DrdgDepth
- /// double
- ///
- public const string DredgingDepth = LocationCsvColumnNames.DredgingDepthColumnName;
-
- ///
- /// bp_tp
- /// CustomShape
- /// bp_tp.shp
- /// bp_tp
- /// double
- ///
- public const string BoezemLevelTpAttributeId = LocationCsvColumnNames.BoezemLevelTpColumnName;
-
- ///
- /// bp_hbp
- /// CustomShape
- /// bp_hbp.shp
- /// bphbp
- /// double
- ///
- public const string BoezemLevelHbpAttributeId = LocationCsvColumnNames.BoezemLevelHbpColumnName;
-
- ///
- /// bp_lbp
- /// CustomShape
- /// bp_lbp.shp
- /// bplbp
- /// double
- ///
- public const string BoezemLevelLbpAttributeId = LocationCsvColumnNames.BoezemLevelLbpColumnName;
-
- ///
/// minimal_circle_depth
/// CustomShape
/// minimal_circle_depth.shp
@@ -484,14 +337,6 @@
///
- /// materiaaltypedijk
- /// materiaaltypedijk.shp
- /// MatDike
- /// string
- ///
- public const string DikeMaterialTypeAttributeId = LocationCsvColumnNames.DikeMaterialTypeColumnName;
-
- ///
/// safety_factor_piping
/// CustomShape
/// safety_factor_piping.shp
@@ -573,16 +418,6 @@
public const string DistanceToEntryPointAttributeId = LocationCsvColumnNames.DistanceToEntryPointColumnName;
///
- /// Schadefactor
- /// CustomShape
- /// Schadefactor.shp
- /// SCHADEFACT
- /// double
- ///
- public const string DetrimentFactorAttributeId = LocationCsvColumnNames.DetrimentFactorColumnName;
-
-
- ///
/// DikeTableHeight
/// CustomShape
/// DTH.shp
@@ -849,16 +684,11 @@
{
// direct property mappings
createItem(SegmentAttributeId, "segment_id.shp", "segmentid", (t, value) => t.SegmentId = value.ToString()),
- createItem(BoezemLevelTpAttributeId, "bp_tp.shp", "bptp", (t, value) => t.BoezemLevelTp = value.ToType()),
- createItem(BoezemLevelHbpAttributeId, "bp_hbp.shp", "bphbp", (t, value) => t.BoezemLevelHbp = value.ToType()),
- createItem(BoezemLevelLbpAttributeId, "bp_lbp.shp", "bplbp", (t, value) => t.BoezemLevelLbp = value.ToType()),
createItem(DampingFactorPl3AttributeId, "DampingFactoPL3.shp", "DampingPL3", (t, value) => t.DampingFactorPL3 = value.ToType() ),
createItem(DampingFactorPl4AttributeId, "DampingFactoPL4.shp", "DampingPL4", (t, value) => t.DampingFactorPL4 = value.ToType() ),
- createItem(DikeMaterialTypeAttributeId, "materiaaltypedijk.shp", "MatDike", (t, value) => t.DikeMaterialType = LocationImportHelper.ToSoilType(value) ),
createItem(DikeEmbankmentMaterialAttributeId, "Dikematerial.shp", "DikeMtrl", (t, value) => t.DikeEmbankmentMaterial = value.ToType() ),
createItem(DirectionAttributeId, "Direction.shp", "Direction", (t, value) => t.Direction = value.ToType()),
createItem(DistanceToEntryPointAttributeId, "distance_to_entry_point.shp", "dist_entry", (t, value) => t.DistanceToEntryPoint = value.ToType()),
- createItem(DredgingDepth, "baggerdiepte.shp", "DrdgDepth", (t, value) => t.DredgingDepth = value.ToType()),
createItem(GrassQualityAttributeId, "GrassQuality.shp", "GrassQlty", (t, value) => t.GrassQuality = value.ToType()),
createItem(HeadPl2AttributeId, "HeadPL2.shp", "HeadPL2", (t, value) => t.HeadPL2 = value.ToType() ),
createItem(HeadPl3AttributeId, "HeadPL3.shp", "HeadPL3", (t, value) => t.HeadPl3 = value.ToType() ),
@@ -870,7 +700,6 @@
createItem(MinimalCircleDepthAtrributeId, "minimal_circle_depth.shp", "mincrcldepth", (t, value) => t.MinimalCircleDepth = value.ToType()),
createItem(PenetrationLengthAttributeId, "PenetrationLength.shp", "PenLength", (t, value) => t.PenetrationLength = value.ToType()),
createItem(PolderLevelAttributeId, PolderLevelShapeFileName, "PLHigh", (t, value) => t.PolderLevel = value.ToType()),
- createItem(PolderLevelLowAttributeId, PolderLevelShapeFileName, "PLLow", (t, value) => t.PolderLevelLow = value.ToType()),
createItem(PlLineCreationMethodAttributeId, "PLLineCreationMethod.shp", "PLCrtMthd", (t, value) => t.PLLineCreationMethod = LocationImportHelper.ToPLLineCreationMethod(value)),
createItem(ZoneTypeAttributeId, "StabilityZones.shp", "ZoneType", (t, value) => t.StabilityZoneType = LocationImportHelper.ToMStabZonesTypeMethod(value)),
createItem(ForbiddenZoneFactorAttributeId, "StabilityZones.shp", "ForbiddenZoneFactor", (t, value) => t.ForbiddenZoneFactor = value.ToType()),
@@ -879,18 +708,10 @@
createItem(PlLineOffsetBelowDikeTopAtPolderAttributeId, PlLineShapeFileName, "PLBlwTDPld", (t, value) => t.PlLineOffsetBelowDikeTopAtPolder = value.ToType()),
createItem(PlLineOffsetBelowShoulderBaseInsideAttributeId, PlLineShapeFileName, "PLBlwTDSh", (t, value) => t.PlLineOffsetBelowShoulderBaseInside = value.ToType()),
createItem(PlLineOffsetBelowDikeToeAtPolderAttributeId, PlLineShapeFileName, "PLBlwDTPld", (t, value) => t.PlLineOffsetBelowDikeToeAtPolder = value.ToType()),
- createItem(PlLineOffsetDryBelowDikeTopAtRiverAttributeId, PlLineShapeFileName, "PLBlTDRvrD",(t, value) => t.PLLineOffsetDryBelowDikeTopAtRiver = value.ToType()),
- createItem(PlLineOffsetDryBelowDikeTopAtPolderAttributeId, PlLineShapeFileName, "PLBlTDPldD", (t, value) => t.PLLineOffsetDryBelowDikeTopAtPolder = value.ToType()),
- createItem(PlLineOffsetDryBelowShoulderBaseInsideAttributeId, PlLineShapeFileName, "PLBlTDShD", (t, value) => t.PLLineOffsetDryBelowShoulderBaseInside = value.ToType()),
- createItem(PlLineOffsetDryBelowDikeToeAtPolderAttributeId, PlLineShapeFileName, "PLBlDTPldD", (t, value) => t.PLLineOffsetDryBelowDikeToeAtPolder = value.ToType()),
createItem(PlLineOffsetBelowDikeCrestMiddleAttributeId, PlLineShapeFileName, "PLBlDCM", (t, value) => t.PlLineOffsetBelowDikeCrestMiddle = value.ToType()),
createItem(PlLineOffsetFactorBelowShoulderCrestAttributeId, PlLineShapeFileName, "PLFBlSC", (t, value) => t.PlLineOffsetFactorBelowShoulderCrest = value.ToType()),
- createItem(PlLineOffsetDryBelowDikeCrestMiddleAttributeId, PlLineShapeFileName, "PLDBlDCM", (t, value) => t.PlLineOffsetDryBelowDikeCrestMiddle = value.ToType()),
- createItem(PlLineOffsetDryFactorBelowShoulderCrestAttributeId, PlLineShapeFileName, "PLDFBlSC", (t, value) => t.PlLineOffsetDryFactorBelowShoulderCrest = value.ToType()),
createItem(UsePlLineOffsetBelowDikeCrestMiddleAttributeId, PlLineShapeFileName, "UPLBlDCM", (t, value) => t.UsePlLineOffsetBelowDikeCrestMiddle = value.ToType()),
createItem(UsePlLineOffsetFactorBelowShoulderCrestAttributeId, PlLineShapeFileName, "UPLFBlSC", (t, value) => t.UsePlLineOffsetFactorBelowShoulderCrest = value.ToType()),
- createItem(UsePlLineOffsetDryBelowDikeCrestMiddleAttributeId, PlLineShapeFileName, "UPLDBlDCM", (t, value) => t.UsePlLineOffsetDryBelowDikeCrestMiddle = value.ToType()),
- createItem(UsePlLineOffsetDryFactorBelowShoulderCrestAttributeId, PlLineShapeFileName, "UPLDFBlSC", (t, value) => t.UsePlLineOffsetDryFactorBelowShoulderCrest = value.ToType()),
createItem(IntrusionVerticalWaterPressureAttributeId, "IntrusionVerticalWaterPressure.shp", "IVWP", (t, value) => t.IntrusionVerticalWaterPressure = LocationImportHelper.ToIntrusionVerticalWaterPressure(value)),
createItem(ProbabilityOfFailureStabilityInnerSlopeAttributeId, "probability_of_failure_stability_innerslope.shp", "probstabi", (t, value) => t.ModelFactors.RequiredProbabilityOfFailureStabilityInnerslope = value.ToType()),
createItem(ProbabilityOfFailureStabilityOuterSlopeAttributeId, "probability_of_failure_stability_outerslope.shp", "probstabo", (t, value) => t.ModelFactors.RequiredProbabilityOfFailureStabilityOuterslope = value.ToType()),
@@ -900,19 +721,13 @@
createItem(SafetyFactorStabilityInnerSlopeAttributeId, "safety_factor_stability_inner_slope.shp", "fstabinner", (t, value) => t.ModelFactors.RequiredSafetyFactorStabilityInnerSlope = value.ToType()),
createItem(SafetyFactorStabilityOuterSlopeAttributeId, "safety_factor_stability_outer_slope.shp", "fstabouter", (t, value) => t.ModelFactors.RequiredSafetyFactorStabilityOuterSlope = value.ToType()),
createItem(ShoulderEmbankmentMaterialAttributeId, ShoulderMaterialShapeFileName, "ShlderMtrl", (t, value) => t.ShoulderEmbankmentMaterial = value.ToType() ),
- createItem(SheetPileLengthAttributeId, "SheetPile_Length.shp", "SheetPileL", (t, value) => t.SheetPileLength = value.ToType()),
- createItem(RwBankProtectionBottomLevelAttributeId, "SheetPile_Length.shp", "SHTPPLVL", (t, value) => t.RwBankProtectionBottomLevel = value.ToType()),
- createItem(SheetpileXAttributeId, "Sheetpile_x.shp", "SheetPileX", (t, value) => t.SheetPilePointX = value.ToType()),
- createItem(SheetpileYAttributeId, "Sheetpile_y.shp", "SheetPileY", (t, value) => t.SheetPilePointY = value.ToType()),
- createItem(SheetpileZAttributeId, "Sheetpile_z.shp", "SheetPileZ", (t, value) => t.SheetPilePointZ = value.ToType()),
createItem(StabilityShoulderGrowSlopeAttributeId, "StabilityShoulderGrowSlope.shp", "StShSlpGr", (t, value) => t.StabilityShoulderGrowSlope = value.ToType()),
createItem(StabilityShoulderGrowDeltaXAttributeId, "StabilityShoulderGrowDeltaX.shp", "StShDXGr", (t, value) => t.StabilityShoulderGrowDeltaX = value.ToType()),
createItem(StabilitySlopeAdaptionDeltaXAttributeId, "StabilitySlopeAdaptionDeltaX.shp", "StSlAdaptDX", (t, value) => t.StabilitySlopeAdaptionDeltaX = value.ToType()),
createItem(UpliftCriterionPipingAttributeId, "uplift_criterion_piping.shp", "uplpiping", (t, value) => t.ModelFactors.UpliftCriterionPiping = value.ToType()),
createItem(UpliftCriterionStabilityAttributeId, "uplift_criterion_stability.shp", "uplstab", (t, value) => t.ModelFactors.UpliftCriterionStability = value.ToType()),
createItem(UseOriginalPlLineAssignmentsAttributeId, "use_original_plline_assignments.shp", "IsOrgPLs", (t, value) => t.IsUseOriginalPLLineAssignments = value.ToType()),
createItem(XSoilGeometry2DOriginAttributeId, "XSoilGeometry2DOrigin.shp", "XG2DOrg", (t, value) => t.XSoilGeometry2DOrigin = value.ToType()),
- createItem(DetrimentFactorAttributeId, "detrimentfactor.shp", "dtrfactor", (t, value) => t.DetrimentFactor = value.ToType()),
createItem(DikeTableHeightAttributeId, "DTH.shp", "DTH", (t, value) => t.DikeTableHeight = value.ToType() ),
createItem(SlopeDampingPiezometricHeightPolderSideAttributeId, "SlopeDampingPiezometricHeightPolderSide.shp", "SlopeDampingPiezometricHeightPolderSide", (t, value) => t.SlopeDampingPiezometricHeightPolderSide = value.ToType() ),
Fisheye: Tag 2135 refers to a dead (removed) revision in file `DamClients/DamUI/trunk/src/Dam/Forms/LocationScenarioChart.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DAMEnumerations.cs
===================================================================
diff -u -r2089 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DAMEnumerations.cs (.../DAMEnumerations.cs) (revision 2089)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DAMEnumerations.cs (.../DAMEnumerations.cs) (revision 2135)
@@ -42,26 +42,13 @@
Regional
}
- public enum FullAnalysisType
- {
- Normal,
- WV21
- };
-
public enum DamProjectType
{
Calamity,
- Assessment,
Design,
DamLiveConfiguration
}
-
- public enum ProgramType
- {
- MStab,
- SlopeW
- };
-
+
public enum StabilityKernelType
{
// The Classic models all use DGMStabDam.dll to generate a sti file from the input (so also pl-lines only)
@@ -201,27 +188,6 @@
BeyondPLLine // indicates that point is outside the scope of the pl line.
};
- public enum DikeDrySensitivity //RWScenarios
- {
- None,
- Dry
- }
-
- public enum HydraulicShortcutType //RWScenarios
- {
- HydraulicShortcut,
- NoHydraulicShortcut
- }
-
- public enum RWResultType //RWScenarios
- {
- [Label("Probability of failure")]
- ProbabilityOfFailure,
-
- [Label("Safety factor")]
- SafetyFactor
- }
-
public enum ResultEvaluation //RWScenarios
{
[Label("Accepted")]
@@ -240,30 +206,6 @@
Wet
}
- public enum ScenarioType //RWScenarios
- {
- Scenario01 = 1,
- Scenario02 = 2,
- Scenario03 = 3,
- Scenario04 = 4,
- Scenario05 = 5,
- Scenario06 = 6,
- Scenario07 = 7,
- Scenario08 = 8,
- Scenario09 = 9,
- Scenario10 = 10,
- Scenario11 = 11
- }
-
- public enum SchematizationType //Schematizationfactor
- {
- MacroStabiltyInnerSideWet,
- MacroStabiltyInnerSideDry,
- PipingWet,
- PipingDry,
- HorzontalBalanceDry
- }
-
public enum DataSourceTypeSensors //Sensors
{
Ignore,
Fisheye: Tag 2135 refers to a dead (removed) revision in file `DamClients/DamUI/trunk/src/Dam/Forms/ScenarioCalculationPropertyControl.Designer.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 2135 refers to a dead (removed) revision in file `DamClients/DamUI/trunk/src/Dam/Forms/AssessmentCalculationSpecificationPropertyControl.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: DamClients/DamUI/trunk/src/Dam/Tests/DamCalculationBenchmarkTest.cs
===================================================================
diff -u -r875 -r2135
--- DamClients/DamUI/trunk/src/Dam/Tests/DamCalculationBenchmarkTest.cs (.../branches/CalcualtionIncluded/src/Dam/Tests/DamCalculationBenchmarkTest.cs) (revision 875)
+++ DamClients/DamUI/trunk/src/Dam/Tests/DamCalculationBenchmarkTest.cs (.../trunk/src/Dam/Tests/DamCalculationBenchmarkTest.cs) (revision 2135)
@@ -1,12 +1,23 @@
-//-----------------------------------------------------------------------
-//
-// Copyright (c) 2011 Deltares. All rights reserved.
-//
-// B.S.T.I.M. The
-// tom.the@deltares.nl
-// 04-08-2011
-// n.a.
-//-----------------------------------------------------------------------
+// Copyright (C) Stichting Deltares 2018. All rights reserved.
+//
+// This file is part of the application DAM - UI.
+//
+// DAM - UI is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
namespace Deltares.Dam.Tests
{
@@ -15,7 +26,7 @@
using Data;
using NUnit.Framework;
- [TestFixture]
+ [TestFixture, Category("Calculation")]
public class DamCalculationBenchmarkTest
{
const string cmstabProgramPath = ".\\DGeoStability.exe";
@@ -42,10 +53,13 @@
DamIntegrationTestHelper.AddCalculationSpecificationsToDamProjectData(damProjectData);
// Calculate dijkring
- var damProjectCalculator = new DamProjectCalculator(damProjectData);
- damProjectCalculator.CalculationBaseDirectory = Path.GetFullPath(Path.Combine(cFolderName, "CalculationFiles"));
- damProjectCalculator.MStabProgramPath = cmstabProgramPath;
- List> allCalculationresults = damProjectCalculator.Calculate(damProjectData, dike.Scenarios);
+ // TODO: DAMUI Start
+ //var damProjectCalculator = new DamProjectCalculator(damProjectData);
+ //damProjectCalculator.CalculationBaseDirectory = Path.GetFullPath(Path.Combine(cFolderName, "CalculationFiles"));
+ //damProjectCalculator.MStabProgramPath = cmstabProgramPath;
+ // List> allCalculationresults = damProjectCalculator.Calculate(damProjectData, dike.Scenarios);
+ List> allCalculationresults = null;
+ // TODO: DAMUI End
Assert.IsTrue(allCalculationresults[0][0].IsUplift.Value);
Assert.AreEqual(1.024077029, allCalculationresults[0][0].Pl3MinUplift.Value, cTolerance);
Assert.AreEqual(49.1, allCalculationresults[0][0].Pl3LocalLocationXMinUplift.Value, cTolerance); // Due to improvement of PLLineCreator this value was changed from 51.1
@@ -69,10 +83,13 @@
DamIntegrationTestHelper.AddCalculationSpecificationsToDamProjectData(damProjectData);
// Calculate dijkring
- var damProjectCalculator = new DamProjectCalculator(damProjectData);
- damProjectCalculator.CalculationBaseDirectory = Path.GetFullPath(Path.Combine(cFolderName, "CalculationFiles"));
- damProjectCalculator.MStabProgramPath = cmstabProgramPath;
- List> allCalculationresults = damProjectCalculator.Calculate(damProjectData, dike.Scenarios);
+ // TODO: DAMUI Start
+ //var damProjectCalculator = new DamProjectCalculator(damProjectData);
+ //damProjectCalculator.CalculationBaseDirectory = Path.GetFullPath(Path.Combine(cFolderName, "CalculationFiles"));
+ //damProjectCalculator.MStabProgramPath = cmstabProgramPath;
+ //List> allCalculationresults = damProjectCalculator.Calculate(damProjectData, dike.Scenarios);
+ List> allCalculationresults = null;
+ // TODO: DAMUI End
Assert.IsTrue(allCalculationresults[0][0].IsUplift.Value);
Assert.AreEqual(0.905914295, allCalculationresults[0][0].Pl3MinUplift.Value, cTolerance);
Assert.AreEqual(-1.289245668, allCalculationresults[0][0].Pl3HeadAdjusted.Value, cTolerance);
@@ -95,10 +112,13 @@
DamIntegrationTestHelper.AddCalculationSpecificationsToDamProjectData(damProjectData);
// Calculate dijkring
- var damProjectCalculator = new DamProjectCalculator(damProjectData);
- damProjectCalculator.CalculationBaseDirectory = Path.GetFullPath(Path.Combine(cFolderName, "CalculationFiles"));
- damProjectCalculator.MStabProgramPath = cmstabProgramPath;
- List> allCalculationresults = damProjectCalculator.Calculate(damProjectData, dike.Scenarios);
+ // TODO: DAMUI Start
+ //var damProjectCalculator = new DamProjectCalculator(damProjectData);
+ //damProjectCalculator.CalculationBaseDirectory = Path.GetFullPath(Path.Combine(cFolderName, "CalculationFiles"));
+ //damProjectCalculator.MStabProgramPath = cmstabProgramPath;
+ //List> allCalculationresults = damProjectCalculator.Calculate(damProjectData, dike.Scenarios);
+ List> allCalculationresults = null;
+ // TODO: DAMUI End
Assert.IsTrue(allCalculationresults[0][0].IsUplift.Value);
Assert.AreEqual(1.0, allCalculationresults[0][0].Pl3MinUplift.Value, cTolerance);
Assert.AreEqual(-1.289245668, allCalculationresults[0][0].Pl3HeadAdjusted.Value, cTolerance);
@@ -121,10 +141,13 @@
DamIntegrationTestHelper.AddCalculationSpecificationsToDamProjectData(damProjectData);
// Calculate dijkring
- var damProjectCalculator = new DamProjectCalculator(damProjectData);
- damProjectCalculator.CalculationBaseDirectory = Path.GetFullPath(Path.Combine(cFolderName, "CalculationFiles"));
- damProjectCalculator.MStabProgramPath = cmstabProgramPath;
- List> allCalculationresults = damProjectCalculator.Calculate(damProjectData, dike.Scenarios);
+ // TODO: DAMUI Start
+ //var damProjectCalculator = new DamProjectCalculator(damProjectData);
+ //damProjectCalculator.CalculationBaseDirectory = Path.GetFullPath(Path.Combine(cFolderName, "CalculationFiles"));
+ //damProjectCalculator.MStabProgramPath = cmstabProgramPath;
+ //List> allCalculationresults = damProjectCalculator.Calculate(damProjectData, dike.Scenarios);
+ List> allCalculationresults = null;
+ // TODO: DAMUI End
Assert.IsTrue(allCalculationresults[0][0].IsUplift.Value);
Assert.AreEqual(0.969283045, allCalculationresults[0][0].Pl3MinUplift.Value, cTolerance);
Assert.AreEqual(-1.6382263, allCalculationresults[0][0].Pl3HeadAdjusted.Value, cTolerance);
@@ -147,11 +170,14 @@
DamIntegrationTestHelper.AddCalculationSpecificationsToDamProjectData(damProjectData);
// Calculate dijkring
- var damProjectCalculator = new DamProjectCalculator(damProjectData);
- damProjectCalculator.CalculationBaseDirectory = Path.GetFullPath(Path.Combine(cFolderName, "CalculationFiles"));
- damProjectCalculator.MStabProgramPath = cmstabProgramPath;
- damProjectData.DamProjectCalculationSpecification.SelectedStabilityKernelType = StabilityKernelType.DamClassicWti; // = StabilityKernelType.WtiMacroStability;
- List> allCalculationresults = damProjectCalculator.Calculate(damProjectData, dike.Scenarios);
+ // TODO: DAMUI Start
+ //var damProjectCalculator = new DamProjectCalculator(damProjectData);
+ //damProjectCalculator.CalculationBaseDirectory = Path.GetFullPath(Path.Combine(cFolderName, "CalculationFiles"));
+ //damProjectCalculator.MStabProgramPath = cmstabProgramPath;
+ //damProjectData.DamProjectCalculationSpecification.SelectedStabilityKernelType = StabilityKernelType.DamClassicWti; // = StabilityKernelType.WtiMacroStability;
+ //List> allCalculationresults = damProjectCalculator.Calculate(damProjectData, dike.Scenarios);
+ List> allCalculationresults = null;
+ // TODO: DAMUI End
Assert.IsTrue(allCalculationresults[0][0].IsUplift.Value);
Assert.AreEqual(0.969283045, allCalculationresults[0][0].Pl3MinUplift.Value, cTolerance);
Assert.AreEqual(-1.6382263, allCalculationresults[0][0].Pl3HeadAdjusted.Value, cTolerance);
@@ -174,10 +200,13 @@
DamIntegrationTestHelper.AddCalculationSpecificationsToDamProjectData(damProjectData);
// Calculate dijkring
- var damProjectCalculator = new DamProjectCalculator(damProjectData);
- damProjectCalculator.CalculationBaseDirectory = Path.GetFullPath(Path.Combine(cFolderName, "CalculationFiles"));
- damProjectCalculator.MStabProgramPath = cmstabProgramPath;
- List> allCalculationresults = damProjectCalculator.Calculate(damProjectData, dike.Scenarios);
+ // TODO: DAMUI Start
+ //var damProjectCalculator = new DamProjectCalculator(damProjectData);
+ //damProjectCalculator.CalculationBaseDirectory = Path.GetFullPath(Path.Combine(cFolderName, "CalculationFiles"));
+ //damProjectCalculator.MStabProgramPath = cmstabProgramPath;
+ //List> allCalculationresults = damProjectCalculator.Calculate(damProjectData, dike.Scenarios);
+ List> allCalculationresults = null;
+ // TODO: DAMUI End
Assert.IsFalse(allCalculationresults[0][0].IsUplift.Value);
Assert.AreEqual(1.512062521, allCalculationresults[0][0].Pl3MinUplift.Value, cTolerance);
Assert.AreEqual(43.0, allCalculationresults[0][0].Pl3LocalLocationXMinUplift.Value, cTolerance);
@@ -198,10 +227,13 @@
DamIntegrationTestHelper.AddCalculationSpecificationsToDamProjectData(damProjectData);
// Calculate dijkring
- var damProjectCalculator = new DamProjectCalculator(damProjectData);
- damProjectCalculator.CalculationBaseDirectory = Path.GetFullPath(Path.Combine(cFolderName, "CalculationFiles"));
- damProjectCalculator.MStabProgramPath = cmstabProgramPath;
- List> allCalculationresults = damProjectCalculator.Calculate(damProjectData, dike.Scenarios);
+ // TODO: DAMUI Start
+ //var damProjectCalculator = new DamProjectCalculator(damProjectData);
+ //damProjectCalculator.CalculationBaseDirectory = Path.GetFullPath(Path.Combine(cFolderName, "CalculationFiles"));
+ //damProjectCalculator.MStabProgramPath = cmstabProgramPath;
+ //List> allCalculationresults = damProjectCalculator.Calculate(damProjectData, dike.Scenarios);
+ List> allCalculationresults = null;
+ // TODO: DAMUI End
Assert.IsTrue(allCalculationresults[0][0].IsUplift.Value);
// Values at bottom ditch dikeside
Assert.AreEqual(0.820097604, allCalculationresults[0][0].Pl3MinUplift.Value, cTolerance);
@@ -231,267 +263,7 @@
Assert.AreEqual(1, damProjectData.WaterBoard.Dikes.Count);
}
}
- #endregion Uplift
+ #endregion Uplift
- #region ScenarioSelectionSupportingMethods
-
- ///
- /// Perform scenario selection only for the project
- ///
- ///
- ///
- private EvaluationJob ComputeEvaluationJobWithScenariosSelected(DamProjectData damProjectData)
- {
- var rwScenariosCalculation = new RWScenariosCalculation();
-
- rwScenariosCalculation.MStabExePath = Path.GetFullPath(cmstabProgramPath);
-
- foreach (LocationJob locationjob in damProjectData.LocationJobs)
- {
- locationjob.Run = true;
- }
- EvaluationJob evaluationJob = damProjectData.GetEvaluationJob();
-
- rwScenariosCalculation.Load(evaluationJob.XML);
- rwScenariosCalculation.IsSkipStabilityCalculation = true; // skip actual calculations, because only scenario selection is tested
- rwScenariosCalculation.Run();
-
- string results = "";
- rwScenariosCalculation.GetResults(ref results);
-
- evaluationJob.XML = results;
- evaluationJob.AttachResults(damProjectData.LocationJobs);
- return evaluationJob;
- }
-
- ///
- /// Check if the selected situation for DikeDrySensitivity is correct
- ///
- ///
- ///
- private void CheckScenarioSelectionDikeDrySensitivity(string projectPath, DikeDrySensitivity resultDikeDrySensitivity)
- {
- DamProject.UserWorkingPath = projectPath;
- DamProject.ProjectWorkingPathLocation = ProjectPathLocation.InUserMap;
-
- using (DamProjectData damProjectData = DamIntegrationTestHelper.CreateDamProjectDataFromCsvFiles(projectPath))
- {
- Assert.AreEqual(1, damProjectData.WaterBoard.Dikes.Count);
-
- EvaluationJob evaluationJob = ComputeEvaluationJobWithScenariosSelected(damProjectData);
-
- Assert.IsTrue(evaluationJob.Results.Count > 0);
- foreach (RWScenariosResult result in evaluationJob.Results)
- {
- foreach (RWScenarioResult rwScenarioResult in result.RWScenarioResults)
- {
- foreach (RWScenarioProfileResult rwScenarioProfileResult in rwScenarioResult.RWScenarioProfileResults)
- {
- Assert.AreEqual(resultDikeDrySensitivity, rwScenarioProfileResult.DikeDrySensitivity);
- }
- }
- }
- }
- }
-
- ///
- /// Check if the selected situation for DikeDrySensitivity is correct
- ///
- ///
- ///
- private void CheckScenarioSelectionHydraulicShortcut(string projectPath, HydraulicShortcutType resultHydraulicShortcut)
- {
- DamProject.UserWorkingPath = projectPath;
- DamProject.ProjectWorkingPathLocation = ProjectPathLocation.InUserMap;
-
- using (DamProjectData damProjectData = DamIntegrationTestHelper.CreateDamProjectDataFromCsvFiles(projectPath))
- {
- Assert.AreEqual(1, damProjectData.WaterBoard.Dikes.Count);
-
- EvaluationJob evaluationJob = ComputeEvaluationJobWithScenariosSelected(damProjectData);
-
- Assert.IsTrue(evaluationJob.Results.Count > 0);
- foreach (RWScenariosResult result in evaluationJob.Results)
- {
- foreach (RWScenarioResult rwScenarioResult in result.RWScenarioResults)
- {
- foreach (RWScenarioProfileResult rwScenarioProfileResult in rwScenarioResult.RWScenarioProfileResults)
- {
- Assert.AreEqual(resultHydraulicShortcut, rwScenarioProfileResult.HydraulicShortcutType);
- }
- }
- }
- }
- }
- #endregion ScenarioSelectionSupportingBenchmarks
-
- #region ScenarioSelectionDroogtegevoeligheid
- [Test]
- public void BM05ScenarioSelectie01DroogtegevoeligheidFalse()
- {
- string cFolderName = @"..\..\..\data\Dam\\Benchmarks\5 Validatie scenarioselectie regionale keringen\01 Bepaling droogtegevoeligheid kade\False\DAM invoerfiles";
- string projectPath = Path.GetFullPath(cFolderName);
- CheckScenarioSelectionDikeDrySensitivity(projectPath, DikeDrySensitivity.None);
- }
-
- [Test]
- public void BM05ScenarioSelectie01DroogtegevoeligheidTrue()
- {
- string cFolderName = @"..\..\..\data\Dam\\Benchmarks\5 Validatie scenarioselectie regionale keringen\01 Bepaling droogtegevoeligheid kade\True\DAM invoerfiles";
- string projectPath = Path.GetFullPath(cFolderName);
- CheckScenarioSelectionDikeDrySensitivity(projectPath, DikeDrySensitivity.Dry);
- }
- #endregion ScenarioSelectionDroogtegevoeligheid
-
- #region ScenarioSelectionHydraulischeKortsluiting
- [Test]
- public void BM05ScenarioSelectie02HydraulischeKortsluitingStap1True()
- {
- string cFolderName = @"..\..\..\data\Dam\\Benchmarks\5 Validatie scenarioselectie regionale keringen\02 Bepaling hydraulische kortsluiting\Stap 1\Altijd Hydraulische Kortsluiting\DAM invoerfiles";
- string projectPath = Path.GetFullPath(cFolderName);
- CheckScenarioSelectionHydraulicShortcut(projectPath, HydraulicShortcutType.HydraulicShortcut);
- }
-
- [Test]
- public void BM05ScenarioSelectie02HydraulischeKortsluitingStap1False()
- {
- string cFolderName = @"..\..\..\data\Dam\\Benchmarks\5 Validatie scenarioselectie regionale keringen\02 Bepaling hydraulische kortsluiting\Stap 1\Geen Hydraulische Kortsluiting\DAM invoerfiles";
- string projectPath = Path.GetFullPath(cFolderName);
- CheckScenarioSelectionHydraulicShortcut(projectPath, HydraulicShortcutType.NoHydraulicShortcut);
- }
-
- [Test]
- public void BM05ScenarioSelectie02HydraulischeKortsluitingStap2BoezemBodemSituatie1()
- {
- string cFolderName = @"..\..\..\data\Dam\\Benchmarks\5 Validatie scenarioselectie regionale keringen\02 Bepaling hydraulische kortsluiting\Stap 2\Met boezembodem\Situatie 1\DAM invoerfiles";
- string projectPath = Path.GetFullPath(cFolderName);
- CheckScenarioSelectionHydraulicShortcut(projectPath, HydraulicShortcutType.HydraulicShortcut);
- }
-
- [Test]
- public void BM05ScenarioSelectie02HydraulischeKortsluitingStap2BoezemBodemSituatie2()
- {
- string cFolderName = @"..\..\..\data\Dam\\Benchmarks\5 Validatie scenarioselectie regionale keringen\02 Bepaling hydraulische kortsluiting\Stap 2\Met boezembodem\Situatie 2\DAM invoerfiles";
- string projectPath = Path.GetFullPath(cFolderName);
- CheckScenarioSelectionHydraulicShortcut(projectPath, HydraulicShortcutType.NoHydraulicShortcut);
- }
-
- [Test]
- public void BM05ScenarioSelectie02HydraulischeKortsluitingStap2BoezemBodemSituatie3()
- {
- string cFolderName = @"..\..\..\data\Dam\\Benchmarks\5 Validatie scenarioselectie regionale keringen\02 Bepaling hydraulische kortsluiting\Stap 2\Met boezembodem\Situatie 3\DAM invoerfiles";
- string projectPath = Path.GetFullPath(cFolderName);
- CheckScenarioSelectionHydraulicShortcut(projectPath, HydraulicShortcutType.HydraulicShortcut);
- }
-
- [Test]
- public void BM05ScenarioSelectie02HydraulischeKortsluitingStap2BoezemBodemSituatie4()
- {
- string cFolderName = @"..\..\..\data\Dam\\Benchmarks\5 Validatie scenarioselectie regionale keringen\02 Bepaling hydraulische kortsluiting\Stap 2\Met boezembodem\Situatie 4\DAM invoerfiles";
- string projectPath = Path.GetFullPath(cFolderName);
- CheckScenarioSelectionHydraulicShortcut(projectPath, HydraulicShortcutType.NoHydraulicShortcut);
- }
-
- [Test]
- public void BM05ScenarioSelectie02HydraulischeKortsluitingStap2DamwandSituatie1()
- {
- string cFolderName = @"..\..\..\data\Dam\\Benchmarks\5 Validatie scenarioselectie regionale keringen\02 Bepaling hydraulische kortsluiting\Stap 2\Met damwand\Situatie 1\DAM invoerfiles";
- string projectPath = Path.GetFullPath(cFolderName);
- CheckScenarioSelectionHydraulicShortcut(projectPath, HydraulicShortcutType.HydraulicShortcut);
- }
-
- [Test]
- public void BM05ScenarioSelectie02HydraulischeKortsluitingStap2DamwandSituatie2()
- {
- string cFolderName = @"..\..\..\data\Dam\\Benchmarks\5 Validatie scenarioselectie regionale keringen\02 Bepaling hydraulische kortsluiting\Stap 2\Met damwand\Situatie 2\DAM invoerfiles";
- string projectPath = Path.GetFullPath(cFolderName);
- CheckScenarioSelectionHydraulicShortcut(projectPath, HydraulicShortcutType.NoHydraulicShortcut);
- }
-
- [Test]
- public void BM05ScenarioSelectie02HydraulischeKortsluitingStap2DamwandSituatie3()
- {
- string cFolderName = @"..\..\..\data\Dam\\Benchmarks\5 Validatie scenarioselectie regionale keringen\02 Bepaling hydraulische kortsluiting\Stap 2\Met damwand\Situatie 3\DAM invoerfiles";
- string projectPath = Path.GetFullPath(cFolderName);
- CheckScenarioSelectionHydraulicShortcut(projectPath, HydraulicShortcutType.HydraulicShortcut);
- }
-
- [Test]
- public void BM05ScenarioSelectie02HydraulischeKortsluitingStap2DamwandSituatie4()
- {
- string cFolderName = @"..\..\..\data\Dam\\Benchmarks\5 Validatie scenarioselectie regionale keringen\02 Bepaling hydraulische kortsluiting\Stap 2\Met damwand\Situatie 4\DAM invoerfiles";
- string projectPath = Path.GetFullPath(cFolderName);
- CheckScenarioSelectionHydraulicShortcut(projectPath, HydraulicShortcutType.NoHydraulicShortcut);
- }
-
- [Test]
- public void BM05ScenarioSelectie02HydraulischeKortsluitingStap3Situatie1()
- {
- string cFolderName = @"..\..\..\data\Dam\\Benchmarks\5 Validatie scenarioselectie regionale keringen\02 Bepaling hydraulische kortsluiting\Stap 3\Situatie 1\DAM invoerfiles";
- string projectPath = Path.GetFullPath(cFolderName);
- CheckScenarioSelectionHydraulicShortcut(projectPath, HydraulicShortcutType.NoHydraulicShortcut);
- }
-
- [Test, Ignore("Test is not yet correct; need to work with Erik Vastenburg to fix this")]
- public void BM05ScenarioSelectie02HydraulischeKortsluitingStap3Situatie2()
- {
- string cFolderName = @"..\..\..\data\Dam\\Benchmarks\5 Validatie scenarioselectie regionale keringen\02 Bepaling hydraulische kortsluiting\Stap 3\Situatie 2\DAM invoerfiles";
- string projectPath = Path.GetFullPath(cFolderName);
- CheckScenarioSelectionHydraulicShortcut(projectPath, HydraulicShortcutType.NoHydraulicShortcut);
- }
-
- [Test]
- public void BM05ScenarioSelectie02HydraulischeKortsluitingStap3Situatie3()
- {
- string cFolderName = @"..\..\..\data\Dam\\Benchmarks\5 Validatie scenarioselectie regionale keringen\02 Bepaling hydraulische kortsluiting\Stap 3\Situatie 3\DAM invoerfiles";
- string projectPath = Path.GetFullPath(cFolderName);
- CheckScenarioSelectionHydraulicShortcut(projectPath, HydraulicShortcutType.NoHydraulicShortcut);
- }
-
- [Test, Ignore("Test is not yet correct; need to work with Erik Vastenburg to fix this")]
- public void BM05ScenarioSelectie02HydraulischeKortsluitingStap3Situatie4()
- {
- string cFolderName = @"..\..\..\data\Dam\\Benchmarks\5 Validatie scenarioselectie regionale keringen\02 Bepaling hydraulische kortsluiting\Stap 3\Situatie 4\DAM invoerfiles";
- string projectPath = Path.GetFullPath(cFolderName);
- CheckScenarioSelectionHydraulicShortcut(projectPath, HydraulicShortcutType.HydraulicShortcut);
- }
-
- [Test, Ignore("Test is not yet correct; need to work with Erik Vastenburg to fix this")]
- public void BM05ScenarioSelectie02HydraulischeKortsluitingStap3Situatie5()
- {
- string cFolderName = @"..\..\..\data\Dam\\Benchmarks\5 Validatie scenarioselectie regionale keringen\02 Bepaling hydraulische kortsluiting\Stap 3\Situatie 5\DAM invoerfiles";
- string projectPath = Path.GetFullPath(cFolderName);
- CheckScenarioSelectionHydraulicShortcut(projectPath, HydraulicShortcutType.HydraulicShortcut);
- }
-
- #endregion ScenarioSelectionHydraulischeKortsluiting
-
- #region ScenarioSelectionOpdrijven
- [Test]
- [Ignore("Data not available yet")]
- public void BM05ScenarioSelectie03BepalingOpdrijven()
- {
- string cFolderName = @"..\..\..\data\Dam\\Benchmarks\5 Validatie scenarioselectie regionale keringen\03 Bepaling opdrijven";
- using (DamProjectData damProjectData = DamIntegrationTestHelper.CreateDamProjectDataFromCsvFiles(cFolderName))
- {
- Assert.AreEqual(1, damProjectData.WaterBoard.Dikes.Count);
- }
- }
- #endregion ScenarioSelectionOpdrijven
-
- #region ScenarioSelectionBepalingScenarios
- [Test]
- [Ignore("Data not available yet")]
- public void BM05ScenarioSelectie04BepalingScenarios()
- {
- string cFolderName = @"..\..\..\data\Dam\\Benchmarks\5 Validatie scenarioselectie regionale keringen\04 Bepaling scenario_s";
- using (DamProjectData damProjectData = DamIntegrationTestHelper.CreateDamProjectDataFromCsvFiles(cFolderName))
- {
- Assert.AreEqual(1, damProjectData.WaterBoard.Dikes.Count);
- }
- }
-
- #endregion ScenarioSelectionBepalingScenarios
-
}
}
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Deltares.Dam.Data.csproj
===================================================================
diff -u -r1546 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Deltares.Dam.Data.csproj (.../Deltares.Dam.Data.csproj) (revision 1546)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Deltares.Dam.Data.csproj (.../Deltares.Dam.Data.csproj) (revision 2135)
@@ -233,16 +233,11 @@
-
-
-
-
-
@@ -258,7 +253,6 @@
-
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Sensors/SensorLocation.cs
===================================================================
diff -u -r2089 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Sensors/SensorLocation.cs (.../SensorLocation.cs) (revision 2089)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Sensors/SensorLocation.cs (.../SensorLocation.cs) (revision 2135)
@@ -86,42 +86,6 @@
private Group sensorGroup;
///
- /// Gets the PL line offset below dike top at river.
- ///
- [Browsable(false)]
- public double PLLineOffsetBelowDikeTopAtRiver
- {
- get { return Location.PlLineOffsetBelowDikeTopAtRiver; }
- }
-
- ///
- /// Gets the PL line offset below dike top at polder.
- ///
- [Browsable(false)]
- public double PLLineOffsetBelowDikeTopAtPolder
- {
- get { return Location.PLLineOffsetDryBelowDikeTopAtPolder; }
- }
-
- ///
- /// Gets the PL line offset below dike toe at polder.
- ///
- [Browsable(false)]
- public double PLLineOffsetBelowDikeToeAtPolder
- {
- get { return Location.PlLineOffsetBelowDikeToeAtPolder; }
- }
-
- ///
- /// Gets the PL line offset dry below shoulder base inside.
- ///
- [Browsable(false)]
- public double PLLineOffsetDryBelowShoulderBaseInside
- {
- get { return Location.PlLineOffsetBelowShoulderBaseInside; }
- }
-
- ///
/// Gets or sets the DAM location.
///
///
@@ -163,11 +127,6 @@
}
}
- public void ResetGroupID(int id)
- {
- sensorGroup.ID = id;
- }
-
///
/// Gets the group ID.
///
@@ -338,13 +297,6 @@
set;
}
- [Browsable(false)]
- public string MStabFile
- {
- get; //{ return SoilProfile2D } ;
- set;
- }
-
///
/// Gets the PiezometricHead type sensors sorted by relative location along profile.
///
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamEngineIo/ConversionHelper.cs
===================================================================
diff -u -r2089 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamEngineIo/ConversionHelper.cs (.../ConversionHelper.cs) (revision 2089)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamEngineIo/ConversionHelper.cs (.../ConversionHelper.cs) (revision 2135)
@@ -44,7 +44,6 @@
{
var translationTable = new Dictionary()
{
- {InputDamProjectType.AssessmentRegional, DamProjectType.Assessment},
{InputDamProjectType.Design, DamProjectType.Design},
{InputDamProjectType.Operational, DamProjectType.Calamity}
};
@@ -62,7 +61,6 @@
damProjectType = DamProjectType.Calamity;
var translationTable = new Dictionary()
{
- {DamProjectType.Assessment, InputDamProjectType.AssessmentRegional},
{DamProjectType.Design, InputDamProjectType.Design},
{DamProjectType.Calamity, InputDamProjectType.Operational},
};
@@ -934,36 +932,6 @@
public const int DikeDrySensitivityDry = 1;
///
- /// Converts to Dike Dry Sensitivity.
- ///
- /// The input DikeDrySensitivity.
- ///
- public static DikeDrySensitivity ConvertToDikeDrySensitivity(int inputDikeDrySensitivity)
- {
- var translationTable = new Dictionary()
- {
- {DikeDrySensitivityNone, DikeDrySensitivity.None},
- {DikeDrySensitivityDry, DikeDrySensitivity.Dry}
- };
- return translationTable[inputDikeDrySensitivity];
- }
-
- ///
- /// Converts to output Dike Dry Sensitivity.
- ///
- /// The DikeDrySensitivity.
- ///
- public static int ConvertToOutputDikeDrySensitivity(DikeDrySensitivity dikeDrySensitivity)
- {
- var translationTable = new Dictionary()
- {
- {DikeDrySensitivity.None, DikeDrySensitivityNone},
- {DikeDrySensitivity.Dry, DikeDrySensitivityDry}
- };
- return translationTable[dikeDrySensitivity];
- }
-
- ///
/// The hydraulic shortcut type hydraulic shortcut
///
public const int HydraulicShortcutTypeHydraulicShortcut = 0;
@@ -974,36 +942,6 @@
public const int HydraulicShortcutTypeNoHydraulicShortcut = 1;
///
- /// Converts to Hydraulic Shortcut Type.
- ///
- /// The input HydraulicShortcutType.
- ///
- public static HydraulicShortcutType ConvertToHydraulicShortcutType(int inputHydraulicShortcutType)
- {
- var translationTable = new Dictionary()
- {
- {HydraulicShortcutTypeHydraulicShortcut, HydraulicShortcutType.HydraulicShortcut},
- {HydraulicShortcutTypeNoHydraulicShortcut, HydraulicShortcutType.NoHydraulicShortcut}
- };
- return translationTable[inputHydraulicShortcutType];
- }
-
- ///
- /// Converts to output Hydraulic Shortcut Type.
- ///
- /// The HydraulicShortcutType.
- ///
- public static int ConvertToOutputHydraulicShortcutType(HydraulicShortcutType hydraulicShortcutType)
- {
- var translationTable = new Dictionary()
- {
- {HydraulicShortcutType.HydraulicShortcut, HydraulicShortcutTypeHydraulicShortcut},
- {HydraulicShortcutType.NoHydraulicShortcut, HydraulicShortcutTypeNoHydraulicShortcut}
- };
- return translationTable[hydraulicShortcutType];
- }
-
- ///
/// The uplift type uplift
///
public const int UpliftTypeUplift = 0;
@@ -1195,54 +1133,6 @@
public const int ScenarioTypeScenario11 = 10;
///
- /// Converts to Scenario Type.
- ///
- /// The input ScenarioType.
- ///
- public static ScenarioType ConvertToScenarioType(int inputScenarioType)
- {
- var translationTable = new Dictionary()
- {
- {ScenarioTypeScenario01, ScenarioType.Scenario01},
- {ScenarioTypeScenario02, ScenarioType.Scenario02},
- {ScenarioTypeScenario03, ScenarioType.Scenario03},
- {ScenarioTypeScenario04, ScenarioType.Scenario04},
- {ScenarioTypeScenario05, ScenarioType.Scenario05},
- {ScenarioTypeScenario06, ScenarioType.Scenario06},
- {ScenarioTypeScenario07, ScenarioType.Scenario07},
- {ScenarioTypeScenario08, ScenarioType.Scenario08},
- {ScenarioTypeScenario09, ScenarioType.Scenario09},
- {ScenarioTypeScenario10, ScenarioType.Scenario10},
- {ScenarioTypeScenario11, ScenarioType.Scenario11}
- };
- return translationTable[inputScenarioType];
- }
-
- ///
- /// Converts to output Scenario Type.
- ///
- /// The ScenarioType.
- ///
- public static int ConvertToOutputScenarioType(ScenarioType scenarioType)
- {
- var translationTable = new Dictionary()
- {
- {ScenarioType.Scenario01, ScenarioTypeScenario01},
- {ScenarioType.Scenario02, ScenarioTypeScenario02},
- {ScenarioType.Scenario03, ScenarioTypeScenario03},
- {ScenarioType.Scenario04, ScenarioTypeScenario04},
- {ScenarioType.Scenario05, ScenarioTypeScenario05},
- {ScenarioType.Scenario06, ScenarioTypeScenario06},
- {ScenarioType.Scenario07, ScenarioTypeScenario07},
- {ScenarioType.Scenario08, ScenarioTypeScenario08},
- {ScenarioType.Scenario09, ScenarioTypeScenario09},
- {ScenarioType.Scenario10, ScenarioTypeScenario10},
- {ScenarioType.Scenario11, ScenarioTypeScenario11}
- };
- return translationTable[scenarioType];
- }
-
- ///
/// The piping model type bligh
///
public const int PipingModelTypeBligh = 0;
@@ -1297,46 +1187,6 @@
}
///
- /// The rw result type probability of failure
- ///
- public const int RwResultTypeProbabilityOfFailure = 0;
-
- ///
- /// The rw result type safety factor
- ///
- public const int RwResultTypeSafetyFactor = 1;
-
- ///
- /// Converts to RegionalResult Type.
- ///
- /// The input RegionalResultType.
- ///
- public static RWResultType ConvertToRegionalResultType(int inputRegionalResultType)
- {
- var translationTable = new Dictionary()
- {
- {RwResultTypeProbabilityOfFailure, RWResultType.ProbabilityOfFailure},
- {RwResultTypeSafetyFactor, RWResultType.SafetyFactor}
- };
- return translationTable[inputRegionalResultType];
- }
-
- ///
- /// Converts to output RegionalResult Type.
- ///
- /// The RegionalResultType.
- ///
- public static int ConvertToOutputRegionalResultType(RWResultType regionalResultType)
- {
- var translationTable = new Dictionary()
- {
- {RWResultType.ProbabilityOfFailure, RwResultTypeProbabilityOfFailure},
- {RWResultType.SafetyFactor, RwResultTypeSafetyFactor}
- };
- return translationTable[regionalResultType];
- }
-
- ///
/// Constants for translating to Enums TimeStepUnit
///
public const uint TimeStepUnitSecond = 0;
Fisheye: Tag 2135 refers to a dead (removed) revision in file `DamClients/DamUI/trunk/src/Dam/Forms/ScenarioCalculationPropertyControl.resx'.
Fisheye: No comparison available. Pass `N' to diff?
Index: DamClients/DamUI/trunk/src/Dam/Forms/DamGeometryEditor.cs
===================================================================
diff -u -r2088 -r2135
--- DamClients/DamUI/trunk/src/Dam/Forms/DamGeometryEditor.cs (.../DamGeometryEditor.cs) (revision 2088)
+++ DamClients/DamUI/trunk/src/Dam/Forms/DamGeometryEditor.cs (.../DamGeometryEditor.cs) (revision 2135)
@@ -85,12 +85,6 @@
FailureMechanismSystemType.StabilityInside, FailureMechanismSystemType.StabilityOutside,
FailureMechanismSystemType.Piping
};
- case DamProjectType.Assessment:
- return new[]
- {
- FailureMechanismSystemType.StabilityInside, FailureMechanismSystemType.Piping,
- FailureMechanismSystemType.HorizontalBalance
- };
case DamProjectType.Design:
{
if (DamProjectCalculationSpecification.SelectedAnalysisType == AnalysisType.NoAdaption)
Index: DamClients/DamUI/trunk/src/Dam/Tests/Importers/LocationPropertyImporterTest.cs
===================================================================
diff -u -r875 -r2135
--- DamClients/DamUI/trunk/src/Dam/Tests/Importers/LocationPropertyImporterTest.cs (.../branches/CalcualtionIncluded/src/Dam/Tests/Importers/LocationPropertyImporterTest.cs) (revision 875)
+++ DamClients/DamUI/trunk/src/Dam/Tests/Importers/LocationPropertyImporterTest.cs (.../trunk/src/Dam/Tests/Importers/LocationPropertyImporterTest.cs) (revision 2135)
@@ -1,14 +1,32 @@
+// Copyright (C) Stichting Deltares 2018. All rights reserved.
+//
+// This file is part of the application DAM - UI.
+//
+// DAM - UI is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Deltares.Dam.Data;
using Deltares.Dam.Data.Importers;
-using Deltares.Geotechnics;
-using Deltares.Geotechnics.Soils;
using Deltares.Maps;
using Deltares.Probabilistic;
-using Deltares.Standard;
using GeoAPI.Geometries;
using NetTopologySuite.Geometries;
using NUnit.Framework;
@@ -22,8 +40,6 @@
{
const string DirectoryWithDataShapeFiles = @"..\..\..\data\Dam\Waterboards\Groot Salland\Binnenwaarts\GWS\gis-customdata\ShapeFiles\";
private const string TestShapeFile = "trafficload.shp";
- private const string TestAttribute = "trafload";
-
private LocationPropertyImporter importer;
#region Setup
@@ -96,14 +112,12 @@
const string stringInitialValue = "someValue";
const double doubleInitialValue = 99.9;
const bool boolInitialValue = false;
- const SoilType soilTypeInitialValue = SoilType.Peat;
const DistributionType distributionInitialValue = DistributionType.Weibull;
const PLLineCreationMethod plLineCreationMethodInitialValue = PLLineCreationMethod.ExpertKnowledgeRRD;
const string stringTestValue = "testValue";
const double doubleTestValue = 111.1;
const bool boolTestValue = true;
- const SoilType soilTypeTestValue = SoilType.Sand;
const DistributionType distributionTestValue = DistributionType.Uniform;
const PLLineCreationMethod plLineCreationMethodTestValue = PLLineCreationMethod.GaugesWithFallbackToExpertKnowledgeRRD;
const MStabZonesType mstabZonesTypeTestValue = MStabZonesType.ZoneAreas;
@@ -151,10 +165,6 @@
{
geom.AddAttribute(mapping.Name, boolTestValue);
}
- else if (key.Equals(LocationShapeFileAttributeMap.DikeMaterialTypeAttributeId, StringComparison.InvariantCultureIgnoreCase))
- {
- geom.AddAttribute(mapping.Name, soilTypeTestValue);
- }
else if (key.Equals(LocationShapeFileAttributeMap.ZoneTypeAttributeId, StringComparison.InvariantCultureIgnoreCase))
{
geom.AddAttribute(mapping.Name, mstabZonesTypeTestValue);
@@ -182,16 +192,11 @@
XRd = 1,
YRd = 1,
SegmentId = stringInitialValue,
- BoezemLevelTp = doubleInitialValue,
- BoezemLevelHbp = doubleInitialValue,
- BoezemLevelLbp = doubleInitialValue,
DampingFactorPL3 = doubleInitialValue,
DampingFactorPL4 = doubleInitialValue,
- DikeMaterialType = soilTypeInitialValue,
DikeEmbankmentMaterial = stringInitialValue,
Direction = doubleInitialValue,
DistanceToEntryPoint = doubleInitialValue,
- DredgingDepth = doubleInitialValue,
GrassQuality = doubleInitialValue,
HeadPL2 = doubleInitialValue,
HeadPl3 = doubleInitialValue,
@@ -203,16 +208,11 @@
MinimalCircleDepth = doubleInitialValue,
PenetrationLength = doubleInitialValue,
PolderLevel = doubleInitialValue,
- PolderLevelLow = doubleInitialValue,
PLLineCreationMethod = plLineCreationMethodInitialValue,
PlLineOffsetBelowDikeTopAtRiver = doubleInitialValue,
PlLineOffsetBelowDikeTopAtPolder = doubleInitialValue,
PlLineOffsetBelowShoulderBaseInside = doubleInitialValue,
PlLineOffsetBelowDikeToeAtPolder = doubleInitialValue,
- PLLineOffsetDryBelowDikeTopAtRiver = doubleInitialValue,
- PLLineOffsetDryBelowDikeTopAtPolder = doubleInitialValue,
- PLLineOffsetDryBelowShoulderBaseInside = doubleInitialValue,
- PLLineOffsetDryBelowDikeToeAtPolder = doubleInitialValue,
ModelFactors = new ModelFactors()
{
RequiredProbabilityOfFailureStabilityInnerslope = doubleInitialValue,
@@ -226,11 +226,6 @@
},
TrafficLoad = doubleInitialValue,
ShoulderEmbankmentMaterial = stringInitialValue,
- SheetPileLength = doubleInitialValue,
- SheetPilePointX = doubleInitialValue,
- SheetPilePointY = doubleInitialValue,
- SheetPilePointZ = doubleInitialValue,
- RwBankProtectionBottomLevel = doubleInitialValue,
StabilityShoulderGrowSlope = doubleInitialValue,
StabilityShoulderGrowDeltaX = doubleInitialValue,
StabilitySlopeAdaptionDeltaX = doubleInitialValue,
@@ -263,7 +258,7 @@
var file = new ShapeFileLocation("test.shp");
string[] lines = { "First line", "Second line", "Third line" };
- System.IO.File.WriteAllLines(file.FullPath, lines);
+ File.WriteAllLines(file.FullPath, lines);
Expect.Call(mockImporter.GetFile(null)).IgnoreArguments().Return(file);
Expect.Call(mockImporter.CreateFromShapeFile(null)).IgnoreArguments().Return(attributeRepository);
@@ -278,16 +273,11 @@
mockImporter.Import(null);
Assert.AreEqual(stringTestValue, location.SegmentId);
- Assert.AreEqual(doubleTestValue, location.BoezemLevelTp);
- Assert.AreEqual(doubleTestValue, location.BoezemLevelHbp);
- Assert.AreEqual(doubleTestValue, location.BoezemLevelLbp);
Assert.AreEqual(doubleTestValue, location.DampingFactorPL3);
Assert.AreEqual(doubleTestValue, location.DampingFactorPL4);
- Assert.AreEqual(soilTypeTestValue, location.DikeMaterialType);
Assert.AreEqual(stringTestValue, location.DikeEmbankmentMaterial);
Assert.AreEqual(doubleTestValue, location.Direction);
Assert.AreEqual(doubleTestValue, location.DistanceToEntryPoint);
- Assert.AreEqual(doubleTestValue, location.DredgingDepth);
Assert.AreEqual(doubleTestValue, location.GrassQuality);
Assert.AreEqual(doubleTestValue, location.HeadPL2);
Assert.AreEqual(doubleTestValue, location.HeadPl3);
@@ -299,16 +289,11 @@
Assert.AreEqual(doubleTestValue, location.MinimalCircleDepth);
Assert.AreEqual(doubleTestValue, location.PenetrationLength);
Assert.AreEqual(doubleTestValue, location.PolderLevel);
- Assert.AreEqual(doubleTestValue, location.PolderLevelLow);
Assert.AreEqual(plLineCreationMethodTestValue, location.PLLineCreationMethod);
Assert.AreEqual(doubleTestValue, location.PlLineOffsetBelowDikeTopAtRiver);
Assert.AreEqual(doubleTestValue, location.PlLineOffsetBelowDikeTopAtPolder);
Assert.AreEqual(doubleTestValue, location.PlLineOffsetBelowShoulderBaseInside);
Assert.AreEqual(doubleTestValue, location.PlLineOffsetBelowDikeToeAtPolder);
- Assert.AreEqual(doubleTestValue, location.PLLineOffsetDryBelowDikeTopAtRiver);
- Assert.AreEqual(doubleTestValue, location.PLLineOffsetDryBelowDikeTopAtPolder);
- Assert.AreEqual(doubleTestValue, location.PLLineOffsetDryBelowShoulderBaseInside);
- Assert.AreEqual(doubleTestValue, location.PLLineOffsetDryBelowDikeToeAtPolder);
Assert.AreEqual(doubleTestValue, location.ModelFactors.RequiredProbabilityOfFailureStabilityInnerslope);
Assert.AreEqual(doubleTestValue, location.ModelFactors.RequiredProbabilityOfFailureStabilityOuterslope);
Assert.AreEqual(doubleTestValue, location.ModelFactors.RequiredProbabilityOfFailurePiping);
@@ -317,11 +302,6 @@
Assert.AreEqual(doubleTestValue, location.ModelFactors.RequiredSafetyFactorStabilityInnerSlope);
Assert.AreEqual(doubleTestValue, location.ModelFactors.RequiredSafetyFactorStabilityOuterSlope);
Assert.AreEqual(stringTestValue, location.ShoulderEmbankmentMaterial);
- Assert.AreEqual(doubleTestValue, location.SheetPileLength);
- Assert.AreEqual(doubleTestValue, location.SheetPilePointX);
- Assert.AreEqual(doubleTestValue, location.SheetPilePointY);
- Assert.AreEqual(doubleTestValue, location.SheetPilePointZ);
- Assert.AreEqual(doubleTestValue, location.RwBankProtectionBottomLevel);
Assert.AreEqual(doubleTestValue, location.StabilityShoulderGrowSlope);
Assert.AreEqual(doubleTestValue, location.StabilityShoulderGrowDeltaX);
Assert.AreEqual(doubleTestValue, location.StabilitySlopeAdaptionDeltaX);
@@ -366,7 +346,6 @@
const string stringInitialValue = "someValue";
const double doubleInitialValue = 99.9;
const bool boolInitialValue = false;
- const SoilType soilTypeInitialValue = SoilType.Peat;
const DistributionType distributionInitialValue = DistributionType.Weibull;
const PLLineCreationMethod plLineCreationMethodInitialValue = PLLineCreationMethod.ExpertKnowledgeRRD;
const MStabZonesType mstabZonesTypeTestValue = MStabZonesType.ZoneAreas;
@@ -376,7 +355,6 @@
const double doubleTestValue = 111.1;
const double dampingPl3Value = 0.34;
const bool boolTestValue = true;
- const SoilType soilTypeTestValue = SoilType.Sand;
const DistributionType distributionTestValue = DistributionType.Uniform;
const PLLineCreationMethod plLineCreationMethodTestValue = PLLineCreationMethod.GaugesWithFallbackToExpertKnowledgeRRD;
@@ -423,10 +401,6 @@
{
attributeLine.AddAttribute(mapping.Name, boolTestValue);
}
- else if (key.Equals(LocationShapeFileAttributeMap.DikeMaterialTypeAttributeId, StringComparison.InvariantCultureIgnoreCase))
- {
- attributeLine.AddAttribute(mapping.Name, soilTypeTestValue);
- }
else if (key.Equals(LocationShapeFileAttributeMap.ZoneTypeAttributeId, StringComparison.InvariantCultureIgnoreCase))
{
attributeLine.AddAttribute(mapping.Name, mstabZonesTypeTestValue);
@@ -450,25 +424,20 @@
}
}
- const string locationID = "Test_Location_01";
+ const string locationId = "Test_Location_01";
using (var location = new Location
{
- Name = locationID,
+ Name = locationId,
XRd = 1,
YRd = 1,
SegmentId = stringInitialValue,
- BoezemLevelTp = doubleInitialValue,
- BoezemLevelHbp = doubleInitialValue,
- BoezemLevelLbp = doubleInitialValue,
DampingFactorPL3 = doubleInitialValue,
DampingFactorPL4 = doubleInitialValue,
- DikeMaterialType = soilTypeInitialValue,
DikeEmbankmentMaterial = stringInitialValue,
Direction = doubleInitialValue,
DistanceToEntryPoint = doubleInitialValue,
- DredgingDepth = doubleInitialValue,
GrassQuality = doubleInitialValue,
HeadPL2 = doubleInitialValue,
HeadPl3 = dampingPl3Value,
@@ -480,16 +449,11 @@
MinimalCircleDepth = doubleInitialValue,
PenetrationLength = doubleInitialValue,
PolderLevel = doubleInitialValue,
- PolderLevelLow = doubleInitialValue,
PLLineCreationMethod = plLineCreationMethodInitialValue,
PlLineOffsetBelowDikeTopAtRiver = doubleInitialValue,
PlLineOffsetBelowDikeTopAtPolder = doubleInitialValue,
PlLineOffsetBelowShoulderBaseInside = doubleInitialValue,
PlLineOffsetBelowDikeToeAtPolder = doubleInitialValue,
- PLLineOffsetDryBelowDikeTopAtRiver = doubleInitialValue,
- PLLineOffsetDryBelowDikeTopAtPolder = doubleInitialValue,
- PLLineOffsetDryBelowShoulderBaseInside = doubleInitialValue,
- PLLineOffsetDryBelowDikeToeAtPolder = doubleInitialValue,
ModelFactors = new ModelFactors()
{
RequiredProbabilityOfFailureStabilityInnerslope = doubleInitialValue,
@@ -503,11 +467,6 @@
},
TrafficLoad = doubleInitialValue,
ShoulderEmbankmentMaterial = stringInitialValue,
- SheetPileLength = doubleInitialValue,
- SheetPilePointX = doubleInitialValue,
- SheetPilePointY = doubleInitialValue,
- SheetPilePointZ = doubleInitialValue,
- RwBankProtectionBottomLevel = doubleInitialValue,
StabilityShoulderGrowSlope = doubleInitialValue,
StabilityShoulderGrowDeltaX = doubleInitialValue,
StabilitySlopeAdaptionDeltaX = doubleInitialValue,
@@ -523,7 +482,7 @@
Expect.Call(mockImporter.GetCrossSectionRepository(null)).IgnoreArguments().Return(crossSectionRepository);
var crossSectionMapping = LocationShapeFileAttributeMap.GetAttributeMapping(LocationShapeFileAttributeMap.CrossSectionAttributId);
- crossSection.AddAttribute(crossSectionMapping.Name, locationID);
+ crossSection.AddAttribute(crossSectionMapping.Name, locationId);
Expect.Call(crossSectionRepository.Features).Return(new[] { crossSection });
Expect.Call(mockImporter.GetAttributeName(null)).IgnoreArguments().Return(crossSectionMapping.Name);
@@ -536,7 +495,7 @@
var file = new ShapeFileLocation("test.shp");
string[] lines = { "First line", "Second line", "Third line" };
- System.IO.File.WriteAllLines(file.FullPath, lines);
+ File.WriteAllLines(file.FullPath, lines);
Expect.Call(mockImporter.GetFile(null)).IgnoreArguments().Return(file);
Expect.Call(mockImporter.CreateFromShapeFile(null)).IgnoreArguments().Return(attributeRepository);
@@ -552,16 +511,11 @@
mockImporter.Import(null);
Assert.AreEqual(stringTestValue, location.SegmentId);
- Assert.AreEqual(doubleTestValue, location.BoezemLevelTp);
- Assert.AreEqual(doubleTestValue, location.BoezemLevelHbp);
- Assert.AreEqual(doubleTestValue, location.BoezemLevelLbp);
Assert.AreEqual(dampingPl3Value, location.DampingFactorPL3);
Assert.AreEqual(0, location.DampingFactorPL4); // as testvalue is beyond the limits, its reset to 0
- Assert.AreEqual(soilTypeTestValue, location.DikeMaterialType);
Assert.AreEqual(stringTestValue, location.DikeEmbankmentMaterial);
Assert.AreEqual(doubleTestValue, location.Direction);
Assert.AreEqual(doubleTestValue, location.DistanceToEntryPoint);
- Assert.AreEqual(doubleTestValue, location.DredgingDepth);
Assert.AreEqual(doubleTestValue, location.GrassQuality);
Assert.AreEqual(doubleTestValue, location.HeadPL2);
Assert.AreEqual(doubleTestValue, location.HeadPl3);
@@ -573,16 +527,11 @@
Assert.AreEqual(doubleTestValue, location.MinimalCircleDepth);
Assert.AreEqual(doubleTestValue, location.PenetrationLength);
Assert.AreEqual(doubleTestValue, location.PolderLevel);
- Assert.AreEqual(doubleTestValue, location.PolderLevelLow);
Assert.AreEqual(plLineCreationMethodTestValue, location.PLLineCreationMethod);
Assert.AreEqual(doubleTestValue, location.PlLineOffsetBelowDikeTopAtRiver);
Assert.AreEqual(doubleTestValue, location.PlLineOffsetBelowDikeTopAtPolder);
Assert.AreEqual(doubleTestValue, location.PlLineOffsetBelowShoulderBaseInside);
Assert.AreEqual(doubleTestValue, location.PlLineOffsetBelowDikeToeAtPolder);
- Assert.AreEqual(doubleTestValue, location.PLLineOffsetDryBelowDikeTopAtRiver);
- Assert.AreEqual(doubleTestValue, location.PLLineOffsetDryBelowDikeTopAtPolder);
- Assert.AreEqual(doubleTestValue, location.PLLineOffsetDryBelowShoulderBaseInside);
- Assert.AreEqual(doubleTestValue, location.PLLineOffsetDryBelowDikeToeAtPolder);
Assert.AreEqual(doubleTestValue, location.ModelFactors.RequiredProbabilityOfFailureStabilityInnerslope);
Assert.AreEqual(doubleTestValue, location.ModelFactors.RequiredProbabilityOfFailureStabilityOuterslope);
Assert.AreEqual(doubleTestValue, location.ModelFactors.RequiredProbabilityOfFailurePiping);
@@ -591,11 +540,6 @@
Assert.AreEqual(doubleTestValue, location.ModelFactors.RequiredSafetyFactorStabilityInnerSlope);
Assert.AreEqual(doubleTestValue, location.ModelFactors.RequiredSafetyFactorStabilityOuterSlope);
Assert.AreEqual(stringTestValue, location.ShoulderEmbankmentMaterial);
- Assert.AreEqual(doubleTestValue, location.SheetPileLength);
- Assert.AreEqual(doubleTestValue, location.SheetPilePointX);
- Assert.AreEqual(doubleTestValue, location.SheetPilePointY);
- Assert.AreEqual(doubleTestValue, location.SheetPilePointZ);
- Assert.AreEqual(doubleTestValue, location.RwBankProtectionBottomLevel);
Assert.AreEqual(doubleTestValue, location.StabilityShoulderGrowSlope);
Assert.AreEqual(doubleTestValue, location.StabilityShoulderGrowDeltaX);
Assert.AreEqual(doubleTestValue, location.StabilitySlopeAdaptionDeltaX);
@@ -643,7 +587,7 @@
var attributeRepository = mocks.DynamicMock();
var file = new ShapeFileLocation("test.shp");
string[] lines = { "First line", "Second line", "Third line" };
- System.IO.File.WriteAllLines(file.FullPath, lines);
+ File.WriteAllLines(file.FullPath, lines);
Expect.Call(attributeRepository.SupportedAttributes).Return(supportedAttributes);
Expect.Call(attributeRepository.Features).Return(new[] { geom });
Expect.Call(attributeRepository.Query((IGeometry)null)).IgnoreArguments().Return(new[]{ geom });
@@ -701,11 +645,11 @@
var mapping = LocationShapeFileAttributeMap.GetAttributeMapping(attributeId);
supportedAttributes.Add(mapping.Name);
- const string locationID = "Test_Location_01";
+ const string locationId = "Test_Location_01";
using (var location = new Location
{
- Name = locationID,
+ Name = locationId,
XRd = 1,
YRd = 1,
})
@@ -715,7 +659,7 @@
Expect.Call(mockImporter.GetCrossSectionRepository(null)).IgnoreArguments().Return(crossSectionRepository);
var crossSectionMapping = LocationShapeFileAttributeMap.GetAttributeMapping(LocationShapeFileAttributeMap.CrossSectionAttributId);
- crossSection.AddAttribute(crossSectionMapping.Name, locationID);
+ crossSection.AddAttribute(crossSectionMapping.Name, locationId);
Expect.Call(crossSectionRepository.Features).Return(new[] { crossSection });
Expect.Call(mockImporter.GetAttributeName(null)).IgnoreArguments().Return(crossSectionMapping.Name);
@@ -729,7 +673,7 @@
var file = new ShapeFileLocation("test.shp");
string[] lines = { "First line", "Second line", "Third line" };
- System.IO.File.WriteAllLines(file.FullPath, lines);
+ File.WriteAllLines(file.FullPath, lines);
Expect.Call(mockImporter.GetFile(null)).IgnoreArguments().Return(file);
Expect.Call(mockImporter.CreateFromShapeFile(null)).IgnoreArguments().Return(attributeRepository);
Index: DamClients/DamUI/trunk/src/Dam/Forms/DamMapEditor.cs
===================================================================
diff -u -r2088 -r2135
--- DamClients/DamUI/trunk/src/Dam/Forms/DamMapEditor.cs (.../DamMapEditor.cs) (revision 2088)
+++ DamClients/DamUI/trunk/src/Dam/Forms/DamMapEditor.cs (.../DamMapEditor.cs) (revision 2135)
@@ -137,102 +137,7 @@
mixedCategory.SelectionSymbolizer = new PointSymbolizer(symbol.GetPieImage(percentages,values, true), 16);
scheme.AddCategory(mixedCategory);
return scheme;
- }
-
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- private static string DetermineScenarioColumName(string resultType, string selectionType, ScenarioType scenarioType)
- {
- return String.Format("S{2:D2}{0}{1}", resultType, selectionType, (int)scenarioType);
- }
-
- ///
- ///
- ///
- public void ExportScenarios()
- {
- SaveFileDialog dialog = new SaveFileDialog();
- dialog.Filter = "Shape files (*.shp)|*.shp";
- dialog.Title = "Save scenario results";
- if (dialog.ShowDialog() == DialogResult.OK)
- {
- List jobs = this.project.LocationJobs;
-
- FeatureSet featureSet = new FeatureSet();
-
- featureSet.Features.Clear();
- if (project.DataSourceEsriProjection != null)
- {
- featureSet.Projection = ProjectionInfo.FromEsriString(project.DataSourceEsriProjection);
- }
- else
- {
- featureSet.Projection = KnownCoordinateSystems.Projected.NationalGrids.DutchRD;
- }
-
- foreach (IGeographicPoint geographic in jobs)
- {
- Feature feature = new Feature(new DotSpatial.Topology.Coordinate(geographic.X, geographic.Y));
- featureSet.AddFeature(feature);
- }
-
- featureSet.AddFid();
-
- featureSet.DataTable.Columns.Add("LocationId", typeof(string));
- featureSet.DataTable.Columns.Add("DetrFactor", typeof(double));
- featureSet.DataTable.Columns.Add("PRPIHPNAME", typeof(string));
- featureSet.DataTable.Columns.Add("PRPIHPVAL", typeof(double));
- featureSet.DataTable.Columns.Add("PRSTHPNAME", typeof(string));
- featureSet.DataTable.Columns.Add("PRSTHPVAL", typeof(double));
- foreach (ScenarioType scenarioType in Enum.GetValues(typeof(ScenarioType)))
- {
- featureSet.DataTable.Columns.Add(DetermineScenarioColumName("SF", "PH", scenarioType), typeof(double));
- featureSet.DataTable.Columns.Add(DetermineScenarioColumName("SF", "LF", scenarioType), typeof(double));
- featureSet.DataTable.Columns.Add(DetermineScenarioColumName("SPN", "LF", scenarioType), typeof(string));
- featureSet.DataTable.Columns.Add(DetermineScenarioColumName("SPV", "LF", scenarioType), typeof(double));
-
- }
-
- for (int i = 0; i < featureSet.Features.Count; i++)
- {
- LocationJob locationJob = jobs[i];
- featureSet.Features[i].DataRow["LocationId"] = locationJob.Location.Name;
- featureSet.Features[i].DataRow["DetrFactor"] = locationJob.Location.DetrimentFactor;
- var pipingProfile = locationJob.Location.GetMostProbableProfile(FailureMechanismSystemType.Piping);
- if (pipingProfile != null)
- {
- featureSet.Features[i].DataRow["PRPIHPNAME"] = pipingProfile.Name;
- featureSet.Features[i].DataRow["PRPIHPVAL"] = locationJob.Location.Segment.GetSoilProfileProbability(pipingProfile,
- FailureMechanismSystemType.Piping);
- }
- var stabilityProfile = locationJob.Location.GetMostProbableProfile(FailureMechanismSystemType.StabilityInside);
- if (stabilityProfile != null)
- {
- featureSet.Features[i].DataRow["PRSTHPNAME"] = stabilityProfile.Name;
- featureSet.Features[i].DataRow["PRSTHPVAL"] = locationJob.Location.Segment.GetSoilProfileProbability(stabilityProfile,
- FailureMechanismSystemType.StabilityInside);
- }
- foreach (ScenarioType scenarioType in Enum.GetValues(typeof(ScenarioType)))
- {
-
- RWScenarioProfileResult result = locationJob.GetRWScenarioResultOfProfileWithHighestProbablilityOfOccurrence(scenarioType);
- featureSet.Features[i].DataRow[DetermineScenarioColumName("SF", "PH", scenarioType)] = result != null ? result.SafetyFactor : DamGlobalConstants.NoRunValue;
-
- result = locationJob.GetRWScenarioResultWithLowestSafetyFactor(scenarioType);
- featureSet.Features[i].DataRow[DetermineScenarioColumName("SF", "LF", scenarioType)] = result != null ? result.SafetyFactor : DamGlobalConstants.NoRunValue;
- featureSet.Features[i].DataRow[DetermineScenarioColumName("SPN", "LF", scenarioType)] = result != null ? result.SoilProfileName : "";
- featureSet.Features[i].DataRow[DetermineScenarioColumName("SPV", "LF", scenarioType)] = result != null ? result.SoilProfileProbability : 0.0;
- }
- }
-
- featureSet.SaveAs(dialog.FileName, true);
- }
- }
+ }
}
}
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamEngineIo/FillDamUiFromXmlOutput.cs
===================================================================
diff -u -r2089 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamEngineIo/FillDamUiFromXmlOutput.cs (.../FillDamUiFromXmlOutput.cs) (revision 2089)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamEngineIo/FillDamUiFromXmlOutput.cs (.../FillDamUiFromXmlOutput.cs) (revision 2135)
@@ -48,23 +48,14 @@
{
if (output != null && output.Results != null && output.Results.CalculationResults != null)
{
- if (output.Results.CalculationResults.DesignResults != null)
+ if (output.Results.CalculationResults != null)
{
DataEventPublisher.InvokeWithoutPublishingEvents(() =>
{
CreateDesignResultsFromOutput(output, damProjectData);
}
);
- }
- if (output.Results.CalculationResults.LocationResults != null)
- {
- DataEventPublisher.InvokeWithoutPublishingEvents(() =>
- {
- CreateLocationResultsOutput(output, damProjectData);
- damProjectData.UpdateCalculations();
- }
- );
- }
+ }
}
// Transfer calculation messages
@@ -147,9 +138,9 @@
{
// Design results
damProjectData.DesignCalculations = new List();
- for (int i = 0; i < output.Results.CalculationResults.DesignResults.Length; i++)
+ for (int i = 0; i < output.Results.CalculationResults.Length; i++)
{
- var designResult = output.Results.CalculationResults.DesignResults[i];
+ var designResult = output.Results.CalculationResults[i];
var desResult = new CsvExportData(designResult.LocationName, designResult.ScenarioName)
{
DamFailureMechanismeCalculation = damProjectData.DamProjectCalculationSpecification.CurrentSpecification, // vanuit invoer
@@ -323,81 +314,6 @@
desResult.Pl4HeadAdjusted = uplift.Pl4HeadAdjusted;
desResult.Pl4LocalLocationXMinUplift = uplift.Pl4LocationXMinUplift;
}
- }
-
- private static void CreateLocationResultsOutput(Output output, DamProjectData damProjectData)
- {
- // Calculation results (per location)
- foreach (var outputLocationResult in output.Results.CalculationResults.LocationResults)
- {
- var locationJob = new LocationJob(null)
- {
- LocationResult = new LocationResult()
- };
- Location location = null;
- if (outputLocationResult.RegionalScenariosResult != null)
- {
- locationJob.LocationResult.RWScenariosResult = new RWScenariosResult
- {
- CalculationResult = ConversionHelper.ConvertToCalculationResult(outputLocationResult.RegionalScenariosResult.CalculationResult),
- SafetyFactor = outputLocationResult.RegionalScenariosResult.SafetyFactor
- };
- var regionalScenarioResults = new List();
- if (outputLocationResult.RegionalScenariosResult.RegionalScenarioResult != null)
- {
- foreach (var outPutRegionalScenarioResult in outputLocationResult.RegionalScenariosResult.RegionalScenarioResult)
- {
- var regionalScenarioResult = new RWScenarioResult
- {
- CalculationResult = ConversionHelper.ConvertToCalculationResult(outPutRegionalScenarioResult.CalculationResult),
- DikeDrySensitivity = ConversionHelper.ConvertToDikeDrySensitivity(outPutRegionalScenarioResult.DikeDrySensitivity),
- HydraulicShortcutType = ConversionHelper.ConvertToHydraulicShortcutType(outPutRegionalScenarioResult.HydraulicShortcutType),
- LoadSituation = ConversionHelper.ConvertToLoadSituation(outPutRegionalScenarioResult.LoadSituation),
- ModelOption = ConversionHelper.ConvertToMStabModelType(outPutRegionalScenarioResult.ModelOption),
- SafetyFactor = outPutRegionalScenarioResult.SafetyFactor,
- ScenarioType = ConversionHelper.ConvertToScenarioType(outPutRegionalScenarioResult.ScenarioType),
- UpliftType = ConversionHelper.ConvertToUpliftType(outPutRegionalScenarioResult.UpliftType)
- };
- var regionalScenarioProfileResults = new List();
- foreach (var outPutRegionalScenarioProfileResult in outPutRegionalScenarioResult.RegionalScenarioProfileResults)
- {
-
- var locationName = outPutRegionalScenarioProfileResult.LocationName;
- location = damProjectData.WaterBoard.Dikes[0].Locations.FirstOrDefault(x => x.Name == locationName);
- var spName = outPutRegionalScenarioProfileResult.SoilProfileName;
- var soilGeometryProbability = location.Segment.SoilProfileProbabilities.FirstOrDefault(s => ((s.SegmentFailureMechanismType == null) ||
- (s.SegmentFailureMechanismType.Value == FailureMechanismSystemType.StabilityInside)) &&
- (s.SoilGeometryName == spName));
- var regionalScenarioProfileResult = new RWScenarioProfileResult()
- {
- Location = location,
- SoilGeometryProbability = soilGeometryProbability,
- LoadSituation = ConversionHelper.ConvertToLoadSituation(outPutRegionalScenarioProfileResult.LoadSituation),
- DikeDrySensitivity = ConversionHelper.ConvertToDikeDrySensitivity(outPutRegionalScenarioProfileResult.DikeDrySensitivity),
- HydraulicShortcutType = ConversionHelper.ConvertToHydraulicShortcutType(outPutRegionalScenarioProfileResult.HydraulicShortcutType),
- UpliftType = ConversionHelper.ConvertToUpliftType(outPutRegionalScenarioProfileResult.UpliftType),
- MstabModelOption = ConversionHelper.ConvertToMStabModelType(outPutRegionalScenarioProfileResult.MStabModelOption),
- PipingModelOption = ConversionHelper.ConvertToPipingModelType(outPutRegionalScenarioProfileResult.PipingModelOption),
- ScenarioType = ConversionHelper.ConvertToScenarioType(outPutRegionalScenarioProfileResult.ScenarioType),
- FailureMechanismType = ConversionHelper.ConvertToFailureMechanismSystemType(outPutRegionalScenarioProfileResult.FailureMechanismType),
- BaseFileName = outPutRegionalScenarioProfileResult.BaseFileName,
- RwResultType = ConversionHelper.ConvertToRegionalResultType(outPutRegionalScenarioProfileResult.RegionalResult.RegionalResultType),
- SafetyFactor = outPutRegionalScenarioProfileResult.RegionalResult.SafetyFactor,
- ProbabilityOfFailure = outPutRegionalScenarioProfileResult.RegionalResult.ProbabilityOfFailure,
- CalculationResult = ConversionHelper.ConvertToCalculationResult(outPutRegionalScenarioProfileResult.RegionalResult.CalculationResult)
- };
- regionalScenarioProfileResults.Add(regionalScenarioProfileResult);
- }
- regionalScenarioResult.RWScenarioProfileResults.AddRange(regionalScenarioProfileResults);
- regionalScenarioResults.Add(regionalScenarioResult);
- }
- locationJob.LocationResult.RWScenariosResult.RWScenarioResults.AddRange(regionalScenarioResults);
- //locationJob.Location = location;
- var curjob = damProjectData.LocationJobs.FirstOrDefault(x => x.Location.Name == location.Name);
- curjob.LocationResult = locationJob.LocationResult;
- }
- }
- }
- }
+ }
}
}
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamEngineIo/FillXmlInputFromDamUi.cs
===================================================================
diff -u -r2109 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamEngineIo/FillXmlInputFromDamUi.cs (.../FillXmlInputFromDamUi.cs) (revision 2109)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamEngineIo/FillXmlInputFromDamUi.cs (.../FillXmlInputFromDamUi.cs) (revision 2135)
@@ -26,8 +26,10 @@
using Deltares.Dam.Data.Sensors;
using Deltares.DamEngine.Io;
using Deltares.DamEngine.Io.XmlInput;
+using Deltares.Geotechnics.Soils;
using Deltares.Geotechnics.SurfaceLines;
using Soil = Deltares.Geotechnics.Soils.Soil;
+using SoilProfile1D = Deltares.DamEngine.Io.XmlInput.SoilProfile1D;
using SurfaceLine = Deltares.DamEngine.Io.XmlInput.SurfaceLine;
namespace Deltares.Dam.Data.DamEngineIo
@@ -84,16 +86,65 @@
input.Soils = new DamEngine.Io.XmlInput.Soil[dike.SoilList.Soils.Count];
TransferSoils(dike.SoilList.Soils, input.Soils);
TransferAquiferSoils(dike.SoilList.AquiferDictionary, input);
-
+ //var sf = dike.Scenarios[0].Location.SurfaceLine2;
+
// Process soilprofiles
- if (dike.SoilProfiles != null)
+ if (damProjectData.DamProjectCalculationSpecification.SelectedStabilityKernelType == StabilityKernelType.DamClassicStability)
{
- var profilesCount = dike.SoilProfiles.Count;
- input.SoilProfiles1D = new DamEngine.Io.XmlInput.SoilProfile1D[profilesCount];
- TransferSoilProfiles1D(dike.SoilProfiles, input.SoilProfiles1D);
+ // Fill 1D profiles in case of DamClassicStability
+ if (dike.SoilProfiles != null)
+ {
+ var profilesCount = dike.SoilProfiles.Count;
+ input.SoilProfiles1D = new DamEngine.Io.XmlInput.SoilProfile1D[profilesCount];
+ TransferSoilProfiles1D(dike.SoilProfiles, input.SoilProfiles1D);
+ // Fill profiles2D too
+ //DataEventPublisher.InvokeAndPublish(() =>
+// {
+// var soilSurfaceProfile = new SoilSurfaceProfile();
+// soilSurfaceProfile.SoilProfile = (Geotechnics.Soils.SoilProfile1D)input.SoilProfiles1D;
+// soilSurfaceProfile.SurfaceLine2 = surfaceLine;
+// soilSurfaceProfile.DikeEmbankmentMaterial = dikeEmbankmentMaterial;
+// });
+ input.SoilProfiles2D = new DamEngine.Io.XmlInput.SoilProfile2D[dike.SoilProfiles.Count];
+ //TransferSoilProfiles2D(dike.SoilProfiles, input.SoilProfiles2D);
+ }
}
var localSegments = EnsureInputLocationsSegmentsAreInSegments(damProjectData.WaterBoard.Segments, localLocations);
+ if (damProjectData.DamProjectCalculationSpecification.SelectedStabilityKernelType == StabilityKernelType.WtiMacroStabilityKernel)
+ {
+ // fill 2D profiles in case of WtiMacroStabilityKernel
+ var i = 0;
+ foreach (var localSegment in localSegments)
+ {
+ foreach (var localSegmentSoilProfileProbability in localSegment.SoilProfileProbabilities)
+ {
+ if (localSegmentSoilProfileProbability.SegmentFailureMechanismType ==
+ FailureMechanismSystemType.StabilityInside)
+ {
+ //var p2D = localLocations[0].GetSoilSurfaceProfile(FailureMechanismSystemType.StabilityInside, 0, out prob);
+ var soilSurfaceProfile = new SoilSurfaceProfile();
+ var soilProfile1D = new Deltares.Geotechnics.Soils.SoilProfile1D();
+ soilProfile1D.Assign(localSegmentSoilProfileProbability.SoilProfile);
+ soilSurfaceProfile.SoilProfile = soilProfile1D;
+ soilSurfaceProfile.SurfaceLine2 = localLocations[i].LocalXZSurfaceLine2;
+ var dikeSoil = localLocations[i].GetDikeEmbankmentSoil();
+ soilSurfaceProfile.DikeEmbankmentMaterial = dikeSoil;
+ foreach (SoilLayer2D layer in soilSurfaceProfile.Surfaces)
+ {
+ if (layer.Soil == null)
+ {
+ layer.Soil = dikeSoil;
+ }
+ }
+
+ }
+ }
+ i++;
+ }
+ TransferSoilProfiles2D(dike.SoilProfiles, input.SoilProfiles2D);
+ }
+
// Process segments
if (localSegments != null)
{
@@ -284,13 +335,14 @@
input.AnalysisType = ConversionHelper.ConvertToInputAnalysisType(DamProjectCalculationSpecification.SelectedAnalysisType);
}
- input.PipingModelTypeSpecified = (input.FailureMechanismSystemType == ConversionHelper.InputFailureMechanismPiping) || (input.DamProjectType == InputDamProjectType.AssessmentRegional);
+ input.PipingModelTypeSpecified = input.FailureMechanismSystemType == ConversionHelper.InputFailureMechanismPiping;
if (input.PipingModelTypeSpecified)
{
input.PipingModelType = ConversionHelper.ConvertToInputPipingModelType(damProjectData.DamProjectCalculationSpecification.CurrentSpecification.PipingModelType);
}
- input.StabilityModelTypeSpecified = (input.FailureMechanismSystemType == ConversionHelper.InputFailureMechanismStabilityInside) || (input.FailureMechanismSystemType == ConversionHelper.InputFailureMechanismStabilityOutside) || (input.DamProjectType == InputDamProjectType.AssessmentRegional);
+ input.StabilityModelTypeSpecified = input.FailureMechanismSystemType ==ConversionHelper.InputFailureMechanismStabilityInside ||
+ input.FailureMechanismSystemType == ConversionHelper.InputFailureMechanismStabilityOutside;
if (input.StabilityModelTypeSpecified)
{
input.StabilityModelType = ConversionHelper.ConvertToInputStabilityModelType(damProjectData.DamProjectCalculationSpecification.CurrentSpecification.StabilityModelType);
@@ -520,19 +572,13 @@
waternetOptions.PhreaticLineCreationMethod = ConversionHelper.ConvertToInputPhreaticLineCreationMethod(location.PLLineCreationMethod);
waternetOptions.IntrusionVerticalWaterPressure = ConversionHelper.ConvertToInputIntrusionVerticalWaterPressure(location.IntrusionVerticalWaterPressure ?? IntrusionVerticalWaterPressureType.Standard);
waternetOptions.PolderLevel = location.PolderLevel;
- waternetOptions.PolderLevelLow = location.PolderLevelLow;
- waternetOptions.PolderLevelLowSpecified = true;
waternetOptions.DampingFactorPl3 = location.DampingFactorPL4;
waternetOptions.DampingFactorPl4 = location.DampingFactorPL3;
waternetOptions.PenetrationLength = location.PenetrationLength;
waternetOptions.Pl1BelowCrestMiddleSpecified = location.PlLineOffsetBelowDikeCrestMiddle.HasValue;
waternetOptions.Pl1BelowCrestMiddle = location.PlLineOffsetBelowDikeCrestMiddle ?? 0.0;
waternetOptions.Pl1FactorBelowShoulderCrestSpecified = location.UsePlLineOffsetFactorBelowShoulderCrest ?? false;
waternetOptions.Pl1FactorBelowShoulderCrest = location.PlLineOffsetFactorBelowShoulderCrest ?? 0.0;
- waternetOptions.DryPl1BelowCrestMiddleSpecified = location.PlLineOffsetDryBelowDikeCrestMiddle.HasValue;
- waternetOptions.DryPl1BelowCrestMiddle = location.PlLineOffsetDryBelowDikeCrestMiddle ?? 0.0;
- waternetOptions.DryPl1FactorBelowShoulderCrestSpecified = location.UsePlLineOffsetDryFactorBelowShoulderCrest ?? false;
- waternetOptions.DryPl1FactorBelowShoulderCrest = location.PlLineOffsetDryFactorBelowShoulderCrest ?? 0.0;
waternetOptions.HeadPl2Specified = location.HeadPL2.HasValue;
waternetOptions.HeadPl2 = location.HeadPL2 ?? 0.0;
waternetOptions.HeadPl3Specified = location.HeadPl3.HasValue;
@@ -544,28 +590,8 @@
waternetOptions.Pl1BelowCrestPolderside = location.PlLineOffsetBelowDikeTopAtPolder;
waternetOptions.Pl1BelowShoulderCrestPolderside = location.PlLineOffsetBelowShoulderBaseInside;
waternetOptions.Pl1BelowToeDikePolderside = location.PlLineOffsetBelowDikeToeAtPolder;
- waternetOptions.DryPl1BelowDikeTopAtRiver = location.PLLineOffsetDryBelowDikeTopAtRiver;
- waternetOptions.DryPl1BelowDikeTopAtRiverSpecified = true;
- waternetOptions.DryPl1DryBelowDikeTopAtPolder = location.PLLineOffsetDryBelowDikeTopAtPolder;
- waternetOptions.DryPl1DryBelowDikeTopAtPolderSpecified = true;
- waternetOptions.DryPl1BelowShoulderBaseInside = location.PLLineOffsetDryBelowShoulderBaseInside;
- waternetOptions.DryPl1BelowShoulderBaseInsideSpecified = true;
- waternetOptions.DryPl1DryBelowDikeToeAtPolder = location.PLLineOffsetDryBelowDikeToeAtPolder;
- waternetOptions.DryPl1DryBelowDikeToeAtPolderSpecified = true;
inputLocation.WaternetOptions = waternetOptions;
-
- // Regional settings
- var assesmentRegionalOptions = new LocationAssesmentRegionalOptions();
inputLocation.DikeTableHeight = location.DikeTableHeight;
- assesmentRegionalOptions.BoezemLevelHbp = location.BoezemLevelHbp;
- assesmentRegionalOptions.BoezemLevelLbp = location.BoezemLevelLbp;
- assesmentRegionalOptions.BoezemLevelTp = location.BoezemLevelTp;
- assesmentRegionalOptions.RegionalBankProtectionBottomLevel = location.RwBankProtectionBottomLevel;
- assesmentRegionalOptions.DredgingDepth = location.DredgingDepth;
- assesmentRegionalOptions.DetrimentFactor = location.DetrimentFactor;
- assesmentRegionalOptions.DikeSoilType = ConversionHelper.ConvertToInputSoilType(location.DikeMaterialType);
- assesmentRegionalOptions.DikeSoilTypeSpecified = true;
- inputLocation.AssesmentRegionalOptions = assesmentRegionalOptions;
inputLocation.DesignScenarios = new LocationDesignScenario[location.Scenarios.Count];
for (int j = 0; j < location.Scenarios.Count; j++)
@@ -677,6 +703,7 @@
inputLocations[i] = inputLocation;
}
}
+
private static void TransferSoilProfiles1D(IList dikeSoilProfiles, DamEngine.Io.XmlInput.SoilProfile1D[] inputSoilProfiles1D)
{
var profilesCount = dikeSoilProfiles.Count;
@@ -694,6 +721,23 @@
}
}
+ private static void TransferSoilProfiles2D(IList dikeSoilProfiles, DamEngine.Io.XmlInput.SoilProfile2D[] inputSoilProfiles2D)
+ {
+ var profilesCount = dikeSoilProfiles.Count;
+ for (int i = 0; i < profilesCount; i++)
+ {
+ var soilProfile2D = dikeSoilProfiles[i];
+ var inputSoilProfile2D = new DamEngine.Io.XmlInput.SoilProfile2D
+ {
+ Name = soilProfile2D.Name,
+
+ Layers2D = new SoilProfile2DLayer2D[soilProfile2D.LayerCount]
+ };
+ // AddLayers2D(soilProfile2D, inputSoilProfile2D);
+ inputSoilProfiles2D[i] = inputSoilProfile2D;
+ }
+ }
+
private static void AddLayers1D(Deltares.Geotechnics.Soils.SoilProfile1D soilProfile1D, DamEngine.Io.XmlInput.SoilProfile1D inputSoilProfile1D)
{
for (int i = 0; i < soilProfile1D.LayerCount; i++)
@@ -745,14 +789,18 @@
{
inputSoilGeometryProbability.FailureMechanismSystemTypeSpecified = false;
}
- if (soilGeometryProbability.SoilProfileType == SoilProfileType.SoilProfile1D)
+
+ switch (soilGeometryProbability.SoilProfileType)
{
- inputSoilGeometryProbability.SoilProfileName = soilGeometryProbability.SoilGeometryName;
+ case SoilProfileType.SoilProfile1D:
+ case SoilProfileType.SoilProfile2D:
+ inputSoilGeometryProbability.SoilProfileName = soilGeometryProbability.SoilGeometryName;
+ break;
+ default:
+ inputSoilGeometryProbability.SoilProfileName = soilGeometryProbability.SoilGeometry2DName;
+ break;
+
}
- else
- {
- inputSoilGeometryProbability.SoilProfileName = soilGeometryProbability.SoilGeometry2DName;
- }
inputSoilGeometryProbability.SoilProfileType = ConversionHelper.ConvertToInputSoilProfileType(soilGeometryProbability.SoilProfileType);
inputSegment.SoilGeometryProbability[i] = inputSoilGeometryProbability;
}
Index: DamClients/DamUI/trunk/src/Dam/Tests/DamEngineIo/ConversionHelperTests.cs
===================================================================
diff -u -r1996 -r2135
--- DamClients/DamUI/trunk/src/Dam/Tests/DamEngineIo/ConversionHelperTests.cs (.../ConversionHelperTests.cs) (revision 1996)
+++ DamClients/DamUI/trunk/src/Dam/Tests/DamEngineIo/ConversionHelperTests.cs (.../ConversionHelperTests.cs) (revision 2135)
@@ -36,7 +36,6 @@
public class ConversionHelperTests
{
[Test]
- [TestCase(InputDamProjectType.AssessmentRegional, DamProjectType.Assessment)]
[TestCase(InputDamProjectType.Design, DamProjectType.Design)]
[TestCase(InputDamProjectType.Operational, DamProjectType.Calamity)]
public void CanConvertToDamProjectType(InputDamProjectType inputDamProjectType, DamProjectType damProjectType)
@@ -45,7 +44,6 @@
}
[Test]
- [TestCase(DamProjectType.Assessment, InputDamProjectType.AssessmentRegional)]
[TestCase(DamProjectType.Design, InputDamProjectType.Design)]
[TestCase(DamProjectType.Calamity, InputDamProjectType.Operational)]
public void CanConvertToInputDamProjectType(DamProjectType damProjectType, InputDamProjectType inputDamProjectType)
@@ -425,39 +423,6 @@
}
[Test]
- [TestCase(DikeDrySensitivity.None, ConversionHelper.DikeDrySensitivityNone)]
- [TestCase(DikeDrySensitivity.Dry, ConversionHelper.DikeDrySensitivityDry)]
- public void CanConvertToOutputDikeDrySensitivity(DikeDrySensitivity dikeDrySensitivity, int outputDikeDrySensitivity)
- {
- Assert.AreEqual(outputDikeDrySensitivity, ConversionHelper.ConvertToOutputDikeDrySensitivity(dikeDrySensitivity));
- }
-
- [Test]
- [TestCase(ConversionHelper.DikeDrySensitivityNone, DikeDrySensitivity.None)]
- [TestCase(ConversionHelper.DikeDrySensitivityDry, DikeDrySensitivity.Dry)]
- public void CanConvertToDikeDrySensitivity(int outputDikeDrySensitivity, DikeDrySensitivity dikeDrySensitivity)
- {
- Assert.AreEqual(dikeDrySensitivity, ConversionHelper.ConvertToDikeDrySensitivity(outputDikeDrySensitivity));
- }
-
-
- [Test]
- [TestCase(HydraulicShortcutType.HydraulicShortcut, ConversionHelper.HydraulicShortcutTypeHydraulicShortcut)]
- [TestCase(HydraulicShortcutType.NoHydraulicShortcut, ConversionHelper.HydraulicShortcutTypeNoHydraulicShortcut)]
- public void CanConvertToOutputHydraulicShortcutType(HydraulicShortcutType hydraulicShortcutType, int outputHydraulicShortcutType)
- {
- Assert.AreEqual(outputHydraulicShortcutType, ConversionHelper.ConvertToOutputHydraulicShortcutType(hydraulicShortcutType));
- }
-
- [Test]
- [TestCase(ConversionHelper.HydraulicShortcutTypeHydraulicShortcut, HydraulicShortcutType.HydraulicShortcut)]
- [TestCase(ConversionHelper.HydraulicShortcutTypeNoHydraulicShortcut, HydraulicShortcutType.NoHydraulicShortcut)]
- public void CanConvertToHydraulicShortcutType(int outputHydraulicShortcutType, HydraulicShortcutType hydraulicShortcutType)
- {
- Assert.AreEqual(hydraulicShortcutType, ConversionHelper.ConvertToHydraulicShortcutType(outputHydraulicShortcutType));
- }
-
- [Test]
[TestCase(UpliftType.Uplift, ConversionHelper.UpliftTypeUplift)]
[TestCase(UpliftType.NoUplift, ConversionHelper.UpliftTypeNoUplift)]
public void CanConvertToOutputUpliftType(UpliftType upliftType, int outputUpliftType)
@@ -506,40 +471,6 @@
}
[Test]
- [TestCase(ScenarioType.Scenario01, ConversionHelper.ScenarioTypeScenario01)]
- [TestCase(ScenarioType.Scenario02, ConversionHelper.ScenarioTypeScenario02)]
- [TestCase(ScenarioType.Scenario03, ConversionHelper.ScenarioTypeScenario03)]
- [TestCase(ScenarioType.Scenario04, ConversionHelper.ScenarioTypeScenario04)]
- [TestCase(ScenarioType.Scenario05, ConversionHelper.ScenarioTypeScenario05)]
- [TestCase(ScenarioType.Scenario06, ConversionHelper.ScenarioTypeScenario06)]
- [TestCase(ScenarioType.Scenario07, ConversionHelper.ScenarioTypeScenario07)]
- [TestCase(ScenarioType.Scenario08, ConversionHelper.ScenarioTypeScenario08)]
- [TestCase(ScenarioType.Scenario09, ConversionHelper.ScenarioTypeScenario09)]
- [TestCase(ScenarioType.Scenario10, ConversionHelper.ScenarioTypeScenario10)]
- [TestCase(ScenarioType.Scenario11, ConversionHelper.ScenarioTypeScenario11)]
- public void CanConvertToOutputScenarioType(ScenarioType scenarioType, int outputScenarioType)
- {
- Assert.AreEqual(outputScenarioType, ConversionHelper.ConvertToOutputScenarioType(scenarioType));
- }
-
- [Test]
- [TestCase(ConversionHelper.ScenarioTypeScenario01, ScenarioType.Scenario01)]
- [TestCase(ConversionHelper.ScenarioTypeScenario02, ScenarioType.Scenario02)]
- [TestCase(ConversionHelper.ScenarioTypeScenario03, ScenarioType.Scenario03)]
- [TestCase(ConversionHelper.ScenarioTypeScenario04, ScenarioType.Scenario04)]
- [TestCase(ConversionHelper.ScenarioTypeScenario05, ScenarioType.Scenario05)]
- [TestCase(ConversionHelper.ScenarioTypeScenario06, ScenarioType.Scenario06)]
- [TestCase(ConversionHelper.ScenarioTypeScenario07, ScenarioType.Scenario07)]
- [TestCase(ConversionHelper.ScenarioTypeScenario08, ScenarioType.Scenario08)]
- [TestCase(ConversionHelper.ScenarioTypeScenario09, ScenarioType.Scenario09)]
- [TestCase(ConversionHelper.ScenarioTypeScenario10, ScenarioType.Scenario10)]
- [TestCase(ConversionHelper.ScenarioTypeScenario11, ScenarioType.Scenario11)]
- public void CanConvertToScenarioType(int outputScenarioType, ScenarioType scenarioType)
- {
- Assert.AreEqual(scenarioType, ConversionHelper.ConvertToScenarioType(outputScenarioType));
- }
-
- [Test]
[TestCase(PipingModelType.Bligh, ConversionHelper.PipingModelTypeBligh)]
[TestCase(PipingModelType.Sellmeijer, ConversionHelper.PipingModelTypeSellmeijer)]
[TestCase(PipingModelType.Sellmeijer4Forces, ConversionHelper.PipingModelTypeSellmeijer4Forces)]
@@ -560,21 +491,6 @@
}
[Test]
- [TestCase(RWResultType.ProbabilityOfFailure, ConversionHelper.RwResultTypeProbabilityOfFailure)]
- [TestCase(RWResultType.SafetyFactor, ConversionHelper.RwResultTypeSafetyFactor)]
- public void CanConvertToOutputRegionalResultType(RWResultType regionalResultType, int outputRegionalResultType)
- {
- Assert.AreEqual(outputRegionalResultType, ConversionHelper.ConvertToOutputRegionalResultType(regionalResultType));
- }
-
- [Test]
- [TestCase(ConversionHelper.RwResultTypeProbabilityOfFailure, RWResultType.ProbabilityOfFailure)]
- [TestCase(ConversionHelper.RwResultTypeSafetyFactor, RWResultType.SafetyFactor)]
- public void CanConvertToRegionalResultType(int outputRegionalResultType, RWResultType regionalResultType)
- {
- Assert.AreEqual(regionalResultType, ConversionHelper.ConvertToRegionalResultType(outputRegionalResultType));
- }
- [Test]
[TestCase(DesignResultStabilityDesignResultsStabilityModelType.Bishop, MStabModelType.Bishop)]
[TestCase(DesignResultStabilityDesignResultsStabilityModelType.UpliftVan, MStabModelType.UpliftVan)]
[TestCase(DesignResultStabilityDesignResultsStabilityModelType.BishopUpliftVan, MStabModelType.BishopUpliftVan)]
Index: DamClients/DamUI/trunk/src/Dam/Forms/LocationJobSymbol.cs
===================================================================
diff -u -r2088 -r2135
--- DamClients/DamUI/trunk/src/Dam/Forms/LocationJobSymbol.cs (.../LocationJobSymbol.cs) (revision 2088)
+++ DamClients/DamUI/trunk/src/Dam/Forms/LocationJobSymbol.cs (.../LocationJobSymbol.cs) (revision 2135)
@@ -46,7 +46,6 @@
private DateTime minDateTime = DateTime.Today;
private DateTime maxDateTime = DateTime.Today;
- private ScenarioType currentScenarioType = ScenarioType.Scenario01;
private string currentProfileName;
private string currentScenarioName;
private string currentCalculation;
@@ -102,40 +101,13 @@
TimeSerie timeSerie = locationJob.LocationResult.StabilityTimeSerie;
double value = timeSerie.GetValue(dateTime);
return GetImage(GetColor(value), selected);
- }
-
- if (damProjectType == DamProjectType.Assessment)
- {
- if (!locationJob.HasRWScenarioResults)
- return GetImage(GetColor(DamGlobalConstants.NoRunValue), selected);
-
- var rwScenarioResult =
- locationJob.RWScenarioResults.Where(l => l.ScenarioType == this.CurrentScenarioType);
- var percentages = rwScenarioResult.First().RWScenarioProfileResults.Select(rw => rw.SoilProfileProbability);
- var results = rwScenarioResult.First().RWScenarioProfileResults.Select(rw => rw.SafetyFactor);
-
- return GetPieImage(percentages, results, selected);
- }
+ }
}
return GetImage(Color.Black, selected);
}
[XmlIgnore]
- public ScenarioType CurrentScenarioType
- {
- get { return this.currentScenarioType; }
- set
- {
- DataEventPublisher.BeforeChange(this, "CurrentScenarioType");
- this.currentScenarioType = value;
- LocationJob.CurrentScenarioType = value;
- DataEventPublisher.DataListModified(this.DamProjectData.LocationJobs);
- DataEventPublisher.AfterChange(this, "CurrentScenarioType");
- }
- }
-
- [XmlIgnore]
public string CurrentProfileName
{
get { return this.currentProfileName; }
@@ -295,8 +267,6 @@
case "CurrentView":
case "CurrentDateTime":
return this.DamProjectData.DamProjectType == DamProjectType.Calamity;
- case "CurrentScenarioType":
- return this.damProjectData.DamProjectType == DamProjectType.Assessment;
case "CurrentProfileName": return false;
case "CurrentScenarioName": return false;
case "CurrentCalculation": return false;
@@ -319,8 +289,6 @@
case "CurrentDateTime":
return this.DamProjectData != null && this.DamProjectData.DamProjectType == DamProjectType.Calamity &&
this.DamProjectData.LocationJobs != null && this.DamProjectData.LocationJobs.Count > 0;
- case "CurrentScenarioType":
- return this.damProjectData.HasResults();
case "CurrentProfileName": return false;
case "CurrentScenarioName": return false;
case "CurrentCalculation": return false;
Index: DamClients/DamUI/trunk/src/Dam/Forms/DesignCalculationPropertyControl.cs
===================================================================
diff -u -r2088 -r2135
--- DamClients/DamUI/trunk/src/Dam/Forms/DesignCalculationPropertyControl.cs (.../DesignCalculationPropertyControl.cs) (revision 2088)
+++ DamClients/DamUI/trunk/src/Dam/Forms/DesignCalculationPropertyControl.cs (.../DesignCalculationPropertyControl.cs) (revision 2135)
@@ -19,13 +19,8 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
-using System;
-using System.Diagnostics;
-using System.Diagnostics.Eventing.Reader;
-using System.IO;
using System.Windows.Forms;
using Deltares.Dam.Data;
-using Deltares.Standard;
using Deltares.Standard.EventPublisher;
using Deltares.Standard.Forms;
using Deltares.Standard.Forms.DExpress;
@@ -98,7 +93,7 @@
{
locationJob = (LocationJob) value;
- if (result == null || !result.LocationName.Equals((locationJob).Location.Name) || (locationJob).HasScenarioResults == false
+ if (result == null || !result.LocationName.Equals((locationJob).Location.Name) || (locationJob).HasDesignScenarioResults == false
|| result.ProfileName != soilProfileName || result.ScenarioName != scenarioName || result.Calculation != calculationName)
{
// Note: if no results for this locationjob (the third condition) the result will be set to null, so dialog will be hidden
Index: DamClients/DamUI/trunk/src/Dam/Tests/DikeCoordinateSystemConverterTest.cs
===================================================================
diff -u -r875 -r2135
--- DamClients/DamUI/trunk/src/Dam/Tests/DikeCoordinateSystemConverterTest.cs (.../branches/CalcualtionIncluded/src/Dam/Tests/DikeCoordinateSystemConverterTest.cs) (revision 875)
+++ DamClients/DamUI/trunk/src/Dam/Tests/DikeCoordinateSystemConverterTest.cs (.../trunk/src/Dam/Tests/DikeCoordinateSystemConverterTest.cs) (revision 2135)
@@ -1,16 +1,25 @@
-//-----------------------------------------------------------------------
-//
-// Copyright (c) 2010 Deltares. All rights reserved.
-//
-// Tom The
-// tom.the@deltares.nl
-// 07-06-2010
-//
-// Tests for DikeCoordinateSystemConverter object
-//
-//-----------------------------------------------------------------------
+// Copyright (C) Stichting Deltares 2018. All rights reserved.
+//
+// This file is part of the application DAM - UI.
+//
+// DAM - UI is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
using Deltares.Geometry;
-using Deltares.Geotechnics;
using Deltares.Geotechnics.GeotechnicalGeometry;
using System;
using Deltares.Dam.Data;
@@ -22,8 +31,6 @@
[TestFixture]
public class DikeCoordinateSystemConverterTest
{
- const int cSheetPilingPointIndex = 1;
-
///
/// Create result surfaceline
///
@@ -212,8 +219,6 @@
location.Name = "Loc2";
location.SurfaceLine2 = surfaceLine;
location.PL1Line = pl1Line;
- location.SheetPilePoint.Assign(surfaceLine.Geometry.Points[cSheetPilingPointIndex]);
- location.SheetPileLength = 12.0;
dike.Locations.Add(location);
// Location 3: a location which has the same surfaceline and pl1-line as Location 2
@@ -242,13 +247,7 @@
CheckResultingLocalSurfaceLine(location.LocalXZSurfaceLine2);
// Check PL1-Lines
- CheckResultingLocalPL1Line(location.LocalXZPL1Line);
-
- // Check sheetpiling
- if (location.SheetPileLength > 0)
- {
- Assert.IsTrue(location.LocalXZSurfaceLine2.Geometry.Points[cSheetPilingPointIndex].LocationEquals(location.LocalXZSheetPilePoint));
- }
+ CheckResultingLocalPL1Line(location.LocalXZPL1Line);
}
}
}
Fisheye: Tag 2135 refers to a dead (removed) revision in file `DamClients/DamUI/trunk/src/Dam/Forms/ScenarioCalculationPropertyControl.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: DamClients/DamUI/trunk/src/Dam/Tests/LoadCompatiblityTest.cs
===================================================================
diff -u -r2121 -r2135
--- DamClients/DamUI/trunk/src/Dam/Tests/LoadCompatiblityTest.cs (.../LoadCompatiblityTest.cs) (revision 2121)
+++ DamClients/DamUI/trunk/src/Dam/Tests/LoadCompatiblityTest.cs (.../LoadCompatiblityTest.cs) (revision 2135)
@@ -90,27 +90,17 @@
XRd = 111232.178664511,
YRd = 507197.06382921,
SegmentId = "234",
- //SurfaceLineId = "",
- //PL1LineId = "",
- DredgingDepth = -1.59999995232,
PolderLevel = -1.29999995232,
- PolderLevelLow = -1.39999997616,
HeadPL2 = -1.3,
HeadPl3 = -1.6,
HeadPl4 = null,
GrassQuality = 1.0,
Direction = 1.0,
XSoilGeometry2DOrigin = 0.0, // actual value
- DikeMaterialType = SoilType.Clay,
DikeEmbankmentMaterial = "HHNK1_Bfg",
ShoulderEmbankmentMaterial = "HHNK1_Bfl",
DampingFactorPL3 = 0.0, // actual value
DampingFactorPL4 = 0.0, // actual value
- SheetPilePointX = -151610.123065615,
- SheetPilePointY = 0.0, // actual value
- SheetPilePointZ = 0.0, // actual value
- SheetPileLength = 2.19999990464,
- RwBankProtectionBottomLevel = 0.0, // actual value
IsUseOriginalPLLineAssignments = false,
PenetrationLength = 0.0, // actual value
TrafficLoad = 5.0,
@@ -119,27 +109,17 @@
PlLineOffsetBelowDikeTopAtPolder = 0.0, // actual value
PlLineOffsetBelowShoulderBaseInside = 0.25,
PlLineOffsetBelowDikeToeAtPolder = 0.0, // actual value
- PLLineOffsetDryBelowDikeTopAtRiver = 1.5,
- PLLineOffsetDryBelowDikeTopAtPolder = 1.5,
- PLLineOffsetDryBelowShoulderBaseInside = 1.5,
- PLLineOffsetDryBelowDikeToeAtPolder = 0.0, // actual value
StabilityShoulderGrowSlope = 0.333333333333333,
StabilityShoulderGrowDeltaX = 2.0,
StabilitySlopeAdaptionDeltaX = 2.0,
- BoezemLevelTp = -0.15,
- BoezemLevelHbp = -0.5,
- BoezemLevelLbp = -0.3,
MinimalCircleDepth = 1.5,
LevelReductionInside = 0.5,
LevelReductionOutside = 0.6,
LayerHeightDistribution = 0.0,
LayerHeightDeviation = 0.0,
DistanceToEntryPoint = 0.0, // actual value
- DetrimentFactor = 1.0,
StabilityZoneType = MStabZonesType.NoZones,
DikeTableHeight = 0.0,
- SheetPilePoint = new GeometryPoint{X= -151610.123065615, Y= 0, Z =0},
- LocalXZSheetPilePoint = new GeometryPoint { X = -151610.123065615, Y = 0, Z = 0 },
ModelFactors = new ModelFactors
{
RequiredProbabilityOfFailureStabilityInnerslope = 1.0e-08,
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DikeCoordinateSystemConverter.cs
===================================================================
diff -u -r2089 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DikeCoordinateSystemConverter.cs (.../DikeCoordinateSystemConverter.cs) (revision 2089)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DikeCoordinateSystemConverter.cs (.../DikeCoordinateSystemConverter.cs) (revision 2135)
@@ -54,22 +54,16 @@
coordinateSystemConverter.DefineGlobalXYZBasedOnLine(location.SurfaceLine2.Geometry);
PL1Line localPL1Line = (location.PL1Line != null) ? location.PL1Line.Clone() : null;
SurfaceLine2 localSurfaceLine = location.SurfaceLine2.FullDeepClone();
- GeometryPoint localSheetPilePoint = (GeometryPoint)location.SheetPilePoint.Clone();
coordinateSystemConverter.ConvertGlobalXYZToLocalXZ(localSurfaceLine.Geometry);
if (localPL1Line != null)
coordinateSystemConverter.ConvertGlobalXYZToLocalXZ(localPL1Line);
- if (location.SheetPileLength > 0)
- {
- coordinateSystemConverter.ConvertGlobalXYZToLocalXZ(localSheetPilePoint);
- }
location.LocalXZPL1Line = localPL1Line;
if (location.LocalXZSurfaceLine2 != null)
{
location.LocalXZSurfaceLine2.Dispose();
}
location.LocalXZSurfaceLine2 = localSurfaceLine;
- location.LocalXZSheetPilePoint = localSheetPilePoint;
location.AreLocalXZObjectsCreated = true;
}
}
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/EntityFactory.cs
===================================================================
diff -u -r2089 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/EntityFactory.cs (.../EntityFactory.cs) (revision 2089)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/EntityFactory.cs (.../EntityFactory.cs) (revision 2135)
@@ -327,16 +327,6 @@
location1.IntrusionVerticalWaterPressure = IntrusionVerticalWaterPressureType.FullHydroStatic;
location1.PenetrationLength = 3.6;
location1.TrafficLoad = 3.7;
- location1.SheetPileLength = 10;
- location1.SheetPilePointX = 7;
- location1.SheetPilePointY = 8;
- location1.SheetPilePointZ = 9;
- location1.DikeMaterialType = SoilType.Peat;
- location1.PolderLevelLow = 0.3;
- location1.BoezemLevelTp = 1.5;
- location1.BoezemLevelHbp = 1.4;
- location1.BoezemLevelLbp = 1.3;
- location1.DredgingDepth = -1.0;
location1.MinimalCircleDepth = 1.11;
location1.LevelReductionInside = 1.12;
location1.LevelReductionOutside = 1.13;
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/LocationJob.cs
===================================================================
diff -u -r2089 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/LocationJob.cs (.../LocationJob.cs) (revision 2089)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/LocationJob.cs (.../LocationJob.cs) (revision 2135)
@@ -35,17 +35,14 @@
public interface ILocationJob
{
- Location Location { get; }
- IEnumerable RWScenarioResults { get; }
- bool HasRWScenarioResults { get; }
+ Location Location { get; }
}
public class LocationJob : DamJob, ILocationJob, IGeographicPoint, IVisibleEnabled
{
private TimeSerie waterLevelTimeSerie = new TimeSerie();
private LocationResult locationResult = new LocationResult();
- private static ScenarioType currentScenarioType = ScenarioType.Scenario01;
private static string currentProfileName = "";
private static string currentScenarioName = "";
private static string currentCalculation = "";
@@ -95,37 +92,6 @@
}
}
- [XmlOldName("ScenarioResults")]
- public virtual IEnumerable RWScenarioResults
- {
- get
- {
- return !this.HasRWScenarioResults ?
- new List() : this.locationResult.RWScenariosResult.RWScenarioResults;
- }
- }
-
- public virtual IEnumerable SchematizationFactorResults
- {
- get
- {
- return !this.HasSchematizationFactorResults ?
- new List() : this.locationResult.SchematizationFactorsResult.SchematizationFactorResults;
- }
- }
-
- public bool HasRWScenarioResults
- {
- get { return this.locationResult != null && this.locationResult.RWScenariosResult != null &&
- this.locationResult.RWScenariosResult.RWScenarioResults.Any();
- }
- }
-
- public bool HasSchematizationFactorResults
- {
- get { return this.locationResult != null && this.locationResult.SchematizationFactorsResult != null; }
- }
-
public virtual LocationResult LocationResult
{
get { return locationResult; }
@@ -186,27 +152,9 @@
return result;
}
- public RWScenarioProfileResult GetAssesmentResultByProfile(ScenarioType scenarioType, string profileName)
- {
- if (this.HasRWScenarioResults)
- {
- RWScenarioResult scenarioResult = this.LocationResult.RWScenariosResult.GetScenarioResult(scenarioType);
- if (scenarioResult != null)
- {
- foreach (var res in scenarioResult.RWScenarioProfileResults)
- {
- if (res.SoilProfileName == profileName)
- return res;
- }
- }
- }
-
- return null;
- }
-
public CsvExportData GetFirstDesignResult()
{
- if (this.HasScenarioResults)
+ if (this.HasDesignScenarioResults)
{
Scenario scenario = Location.Scenarios[0];
if (scenario != null && scenario.CalculationResults.Count > 0)
@@ -220,7 +168,7 @@
public CsvExportData GetDesignResultByProfileScenarioAndCalculationName(string profileName, string scenarioName,
string calculationName)
{
- if (this.HasScenarioResults)
+ if (this.HasDesignScenarioResults)
{
foreach (var scenario in Location.Scenarios)
{
@@ -235,60 +183,15 @@
}
return null;
}
- ///
- /// Return the result of the profile with highest probability of occurrence
- ///
- ///
- ///
- public RWScenarioProfileResult GetRWScenarioResultOfProfileWithHighestProbablilityOfOccurrence(ScenarioType scenarioType)
- {
- if (this.HasRWScenarioResults)
- {
- RWScenarioResult scenarioResult = this.LocationResult.RWScenariosResult.GetScenarioResult(scenarioType);
- if (scenarioResult != null && scenarioResult.RWScenarioProfileResults.Count > 0)
- {
- RWScenarioProfileResult rwScenarioProfileResult = scenarioResult.RWScenarioProfileResults[0];
- for (int i = 1; i < scenarioResult.RWScenarioProfileResults.Count; i++)
- {
- if (scenarioResult.RWScenarioProfileResults[i].SoilProfileProbability > rwScenarioProfileResult.SoilProfileProbability)
- {
- rwScenarioProfileResult = scenarioResult.RWScenarioProfileResults[i];
- }
- }
- return rwScenarioProfileResult;
- }
- }
- return null;
- }
///
- /// Return result with the lowest safetyfactor
+ /// Gets a value indicating whether this instance has (Design) scenario results.
///
- ///
- ///
- public RWScenarioProfileResult GetRWScenarioResultWithLowestSafetyFactor(ScenarioType scenarioType)
+ ///
+ /// true if this instance has scenario results; otherwise, false.
+ ///
+ public bool HasDesignScenarioResults
{
- if (this.HasRWScenarioResults)
- {
- RWScenarioResult scenarioResult = this.LocationResult.RWScenariosResult.GetScenarioResult(scenarioType);
- if (scenarioResult != null && scenarioResult.RWScenarioProfileResults.Count > 0)
- {
- RWScenarioProfileResult rwScenarioProfileResult = scenarioResult.RWScenarioProfileResults[0];
- for (int i = 1; i < scenarioResult.RWScenarioProfileResults.Count; i++)
- {
- if (scenarioResult.RWScenarioProfileResults[i].SafetyFactor < rwScenarioProfileResult.SafetyFactor)
- {
- rwScenarioProfileResult = scenarioResult.RWScenarioProfileResults[i];
- }
- }
- return rwScenarioProfileResult;
- }
- }
- return null;
- }
-
- public bool HasScenarioResults
- {
get
{
List scenarios = Location.Scenarios;
@@ -320,7 +223,7 @@
/// Get lowest safetyfactor of all scenarios
///
///
- private double GetLowestRealSafetyFactorFromScenarios()
+ private double GetLowestRealSafetyFactorFromDesignScenarios()
{
var res = double.MaxValue;
List scenarios = Location.Scenarios;
@@ -353,7 +256,7 @@
/// Get highest porbability of failure of all scenarios
///
///
- private double GetHighestRealPropbabilityFromScenarios()
+ private double GetHighestRealPropbabilityFromDesignScenarios()
{
var res = double.MinValue;
List scenarios = Location.Scenarios;
@@ -398,45 +301,18 @@
{
if (DamProjectType == DamProjectType.Calamity)
{
- if (this.HasLocationResults)
+ if (HasLocationResults)
{
TimeSerie timeSerie = this.LocationResult.StabilityTimeSerie;
return timeSerie.GetValue(CurrentTime);
}
- else
- {
- return DamGlobalConstants.NoRunValue;
- }
+ return DamGlobalConstants.NoRunValue;
}
- else if (DamProjectType == DamProjectType.Assessment)
+ if (DamProjectType == DamProjectType.Design)
{
- if (this.HasRWScenarioResults && GetRWScenarioResultWithLowestSafetyFactor(currentScenarioType) != null)
- {
- return GetRWScenarioResultWithLowestSafetyFactor(currentScenarioType).SafetyFactor;
- }
- else
- {
- if (this.locationResult.RWScenariosResult != null &&
- this.locationResult.RWScenariosResult.CalculationResult == CalculationResult.RunFailed)
- {
- // DamGlobalConstants.NoRunValue is the default result resulting in NoRun whereas the
- // status must be failed. So when failed set to -1.
- return -1;
- }
- else
- {
- return DamGlobalConstants.NoRunValue;
- }
- }
+ return GetLowestRealSafetyFactorFromDesignScenarios();
}
- else if (DamProjectType == DamProjectType.Design)
- {
- return GetLowestRealSafetyFactorFromScenarios();
- }
- else
- {
- return DamGlobalConstants.NoRunValue;
- }
+ return DamGlobalConstants.NoRunValue;
}
}
@@ -451,15 +327,7 @@
{
return designRequiredFactor;
}
- else
- {
- // For Piping in Assesment projects, ignore the given detriment factor and use the required safety for Piping
- if (DamProjectType == DamProjectType.Assessment && (currentScenarioType == ScenarioType.Scenario10 || currentScenarioType == ScenarioType.Scenario11))
- {
- return DamGlobalConstants.RequiredSafetyPipingForAssessment;
- }
- return this.Location.DetrimentFactor;
- }
+ return 1.0;
}
}
@@ -475,18 +343,11 @@
{
return DamGlobalConstants.NoRunValue;
}
- else if (DamProjectType == DamProjectType.Assessment)
+ if (DamProjectType == DamProjectType.Design)
{
- return DamGlobalConstants.NoRunValue;
+ return GetHighestRealPropbabilityFromDesignScenarios();
}
- else if (DamProjectType == DamProjectType.Design)
- {
- return GetHighestRealPropbabilityFromScenarios();
- }
- else
- {
- return DamGlobalConstants.NoRunValue;
- }
+ return DamGlobalConstants.NoRunValue;
}
}
@@ -502,39 +363,10 @@
{
return designRequiredFactor; // only for piping at the moment
}
- else
- {
- return 1; //#Bka: for now return 1 if not piping probabilistic.
- }
+ return 1; //#Bka: for now return 1 if not piping probabilistic.
}
}
- public bool AreRWScenarioResultsMixed(ScenarioType scenarioType)
- {
- if (this.HasRWScenarioResults)
- {
- RWScenarioResult scenarioResult = this.LocationResult.RWScenariosResult.GetScenarioResult(scenarioType);
- if (scenarioResult != null && scenarioResult.RWScenarioProfileResults.Count > 0)
- {
- var aboveRequiredSafety = false;
- var belowRequiredSafety = false;
- for (int i = 0; i < scenarioResult.RWScenarioProfileResults.Count; i++)
- {
- if (!aboveRequiredSafety)
- {
- aboveRequiredSafety = scenarioResult.RWScenarioProfileResults[i].SafetyFactor >= DetrimentFactor;
- }
- if (!belowRequiredSafety)
- {
- belowRequiredSafety = scenarioResult.RWScenarioProfileResults[i].SafetyFactor < DetrimentFactor;
- }
- }
- return aboveRequiredSafety && belowRequiredSafety;
- }
- }
- return false;
- }
-
[Data]
[XmlIgnore]
[Label("Result")]
@@ -544,16 +376,9 @@
{
if (ProbabilisticType == ProbabilisticType.Deterministic)
{
- if (DamProjectType == DamProjectType.Assessment && AreRWScenarioResultsMixed(currentScenarioType))
- {
- return JobResult.Mixed;
- }
return JobResultInterpreter.GetJobResult(SafetyFactor, DetrimentFactor, true);
}
- else
- {
- return JobResultInterpreter.GetJobResult(FailureProbability, RequiredProbability, false);
- }
+ return JobResultInterpreter.GetJobResult(FailureProbability, RequiredProbability, false);
}
}
@@ -575,14 +400,6 @@
[XmlIgnore]
[Browsable(false)]
- public static ScenarioType CurrentScenarioType
- {
- get { return currentScenarioType; }
- set { currentScenarioType = value; }
- }
-
- [XmlIgnore]
- [Browsable(false)]
public static string CurrentProfileName
{
get { return currentProfileName; }
@@ -648,8 +465,6 @@
ProbabilisticType != ProbabilisticType.Deterministic;
case "WaterLevelTimeSerie":
return HasLocationResults;
- case "RWScenarioResults":
- return HasRWScenarioResults;
default: return true;
}
}
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamEngineIo/FillDamUiFromXmlInput.cs
===================================================================
diff -u -r2089 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamEngineIo/FillDamUiFromXmlInput.cs (.../FillDamUiFromXmlInput.cs) (revision 2089)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamEngineIo/FillDamUiFromXmlInput.cs (.../FillDamUiFromXmlInput.cs) (revision 2135)
@@ -400,17 +400,12 @@
location.PLLineCreationMethod = ConversionHelper.ConvertToPhreaticLineCreationMethod(waternetOptions.PhreaticLineCreationMethod);
location.IntrusionVerticalWaterPressure = ConversionHelper.ConvertToIntrusionVerticalWaterPressure(waternetOptions.IntrusionVerticalWaterPressure);
location.PolderLevel = waternetOptions.PolderLevel;
- location.PolderLevelLow = waternetOptions.PolderLevelLow;
- // waternetOptions.PolderLevelLowSpecified is not used because the value is not a nullable
location.DampingFactorPL4 = waternetOptions.DampingFactorPl3;
location.DampingFactorPL3 = waternetOptions.DampingFactorPl4;
location.PenetrationLength = waternetOptions.PenetrationLength;
location.PlLineOffsetBelowDikeCrestMiddle = (waternetOptions.Pl1BelowCrestMiddleSpecified ? (double?)waternetOptions.Pl1BelowCrestMiddle : null);
location.UsePlLineOffsetFactorBelowShoulderCrest = waternetOptions.Pl1FactorBelowShoulderCrestSpecified;
location.PlLineOffsetFactorBelowShoulderCrest = waternetOptions.Pl1FactorBelowShoulderCrest;
- location.PlLineOffsetDryBelowDikeCrestMiddle = (waternetOptions.DryPl1BelowCrestMiddleSpecified ? (double?)waternetOptions.DryPl1BelowCrestMiddle : null);
- location.UsePlLineOffsetDryFactorBelowShoulderCrest = waternetOptions.DryPl1FactorBelowShoulderCrestSpecified;
- location.PlLineOffsetDryFactorBelowShoulderCrest = waternetOptions.DryPl1FactorBelowShoulderCrest;
location.HeadPL2 = (waternetOptions.HeadPl2Specified ? (double?)waternetOptions.HeadPl2 : null);
location.HeadPl3 = (waternetOptions.HeadPl3Specified ? (double?)waternetOptions.HeadPl3 : null);
location.HeadPl4 = (waternetOptions.HeadPl4Specified ? (double?)waternetOptions.HeadPl4 : null);
@@ -419,30 +414,8 @@
location.PlLineOffsetBelowDikeTopAtPolder = waternetOptions.Pl1BelowCrestPolderside;
location.PlLineOffsetBelowShoulderBaseInside = waternetOptions.Pl1BelowShoulderCrestPolderside;
location.PlLineOffsetBelowDikeToeAtPolder = waternetOptions.Pl1BelowToeDikePolderside;
- location.PLLineOffsetDryBelowDikeTopAtRiver = waternetOptions.DryPl1BelowDikeTopAtRiver;
- // waternetOptions.DryPl1BelowDikeTopAtRiverSpecified is not used because the value is not a nullable
- location.PLLineOffsetDryBelowDikeTopAtPolder = waternetOptions.DryPl1DryBelowDikeTopAtPolder;
- // waternetOptions.DryPl1DryBelowDikeTopAtPolderSpecified is not used because the value is not a nullable
- location.PLLineOffsetDryBelowShoulderBaseInside = waternetOptions.DryPl1BelowShoulderBaseInside;
- // waternetOptions.DryPl1BelowShoulderBaseInsideSpecified is not used because the value is not a nullable
- location.PLLineOffsetDryBelowDikeToeAtPolder = waternetOptions.DryPl1DryBelowDikeToeAtPolder;
- // waternetOptions.DryPl1DryBelowDikeToeAtPolderSpecified is not used because the value is not a nullable
-
- // Regional settings
location.DikeTableHeight = inputLocation.DikeTableHeight;
- var assesmentRegionalOptions = inputLocation.AssesmentRegionalOptions;
- if (assesmentRegionalOptions != null)
- {
- location.BoezemLevelHbp = assesmentRegionalOptions.BoezemLevelHbp;
- location.BoezemLevelLbp = assesmentRegionalOptions.BoezemLevelLbp;
- location.BoezemLevelTp = assesmentRegionalOptions.BoezemLevelTp;
- location.RwBankProtectionBottomLevel = assesmentRegionalOptions.RegionalBankProtectionBottomLevel;
- location.DredgingDepth = assesmentRegionalOptions.DredgingDepth;
- location.DetrimentFactor = assesmentRegionalOptions.DetrimentFactor;
- location.DikeMaterialType = assesmentRegionalOptions.DikeSoilTypeSpecified ?
- ConversionHelper.ConvertToSoilType(assesmentRegionalOptions.DikeSoilType) :
- SoilType.Clay;
- }
+
SurfaceLine2 surfaceLine = dikeSurfaceLines.First(n => n.Name.Equals(inputLocation.SurfaceLineName));
location.LocalXZSurfaceLine2 = surfaceLine;
Fisheye: Tag 2135 refers to a dead (removed) revision in file `DamClients/DamUI/trunk/src/Dam/Forms/AssessmentCalculationSpecificationPropertyControl.resx'.
Fisheye: No comparison available. Pass `N' to diff?
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/MStabParameters.cs
===================================================================
diff -u -r2089 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/MStabParameters.cs (.../MStabParameters.cs) (revision 2089)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/MStabParameters.cs (.../MStabParameters.cs) (revision 2135)
@@ -799,7 +799,7 @@
{
switch (property)
{
- case "SearchMethod": return Location.DamProjectType == DamProjectType.Design || Location.DamProjectType == DamProjectType.Assessment;
+ case "SearchMethod": return Location.DamProjectType == DamProjectType.Design;
case "GridPosition": return false; // position depends on failuremechanisme type (inside or outside)
case "ZonesType": return false; // Is set per location!
default: return true;
@@ -810,7 +810,7 @@
{
switch (property)
{
- case "Model": return Location.DamProjectType != DamProjectType.Assessment;
+ case "Model": return true;
case "SearchMethod": return
(SlipCircleDefinition.Specification.FailureMechanismSystemType == FailureMechanismSystemType.StabilityInside ||
SlipCircleDefinition.Specification.FailureMechanismSystemType == FailureMechanismSystemType.StabilityOutside) &&
Index: DamClients/DamUI/trunk/src/Dam/Tests/Deltares.Dam.Tests.csproj
===================================================================
diff -u -r1515 -r2135
--- DamClients/DamUI/trunk/src/Dam/Tests/Deltares.Dam.Tests.csproj (.../Deltares.Dam.Tests.csproj) (revision 1515)
+++ DamClients/DamUI/trunk/src/Dam/Tests/Deltares.Dam.Tests.csproj (.../Deltares.Dam.Tests.csproj) (revision 2135)
@@ -143,7 +143,6 @@
-
Index: DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs
===================================================================
diff -u -r2088 -r2135
--- DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs (.../DamPlugin.cs) (revision 2088)
+++ DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs (.../DamPlugin.cs) (revision 2135)
@@ -79,7 +79,6 @@
private bool initial = true;
private DAMNewProjectData damNewProjectData = null;
- private RWScenarioProfileResult lastAssesmentResult = null;
private CsvExportData lastDesignResult = null;
private LocationResult lastLocationResult = null;
private LocationJob currentLocationJob = null;
@@ -129,9 +128,7 @@
};
private readonly DesignCalculationPropertyControl designCalculationPropertyControl = new DesignCalculationPropertyControl();
- private readonly ScenarioCalculationPropertyControl assessmentCalculationPropertyControl = new ScenarioCalculationPropertyControl();
private readonly LocationPropertyControl locationPropertyControl = new LocationPropertyControl();
- private readonly AssessmentCalculationSpecificationPropertyControl assessmentCalculationSpecificationPropertyControl = new AssessmentCalculationSpecificationPropertyControl();
private readonly DamProjectCalculationSpecificationPropertyControl damProjectCalculationSpecificationPropertyControl = new DamProjectCalculationSpecificationPropertyControl();
private readonly WaterBoardPropertyControl waterBoardPropertyControl = new WaterBoardPropertyControl();
private readonly BarButtonItem showCalculationOptionsItem = new BarButtonItem();
@@ -285,7 +282,6 @@
mainForm.DynamicPropertyControl.ClearRegistrationsForType(typeof(Soil));
mainForm.DynamicPropertyControl.BuildDelayedPropertyControlForTypes(() => PropertyControlFactory.GetPropertyControl(), typeof(Soil));
- dpc.BuildPropertyControlTabForTypes(locationPropertyControl, typeof(Location), typeof(LocationJob), typeof(RWScenarioProfileResult));
dpc.BuildPropertyControlTabForTypes(new LocationScenariosControl(), typeof(Location), typeof(LocationJob));
this.progressDelegate = waterBoardPropertyControl.DoProgress;
@@ -295,9 +291,7 @@
var schematizationFactorPropertyControl = new SchematizationFactorPropertyControl();
dpc.BuildPropertyControlTabForTypes(schematizationFactorPropertyControl, typeof(DamProjectData));
dpc.BuildPropertyControlTabForTypes(damProjectCalculationSpecificationPropertyControl, typeof(DamProjectData));
- dpc.BuildPropertyControlTabForTypes(assessmentCalculationPropertyControl, typeof(RWScenarioProfileResult), typeof(LocationJob));
- dpc.BuildPropertyControlTabForTypes(designCalculationPropertyControl, typeof(CsvExportData), typeof(LocationJob));
- dpc.BuildPropertyControlTabForTypes(assessmentCalculationSpecificationPropertyControl, typeof(DamProjectData));
+ dpc.BuildPropertyControlTabForTypes(designCalculationPropertyControl, typeof(CsvExportData), typeof(LocationJob));
}
private void ConfigureTable()
@@ -314,27 +308,9 @@
this.mainForm.DynamicTableControl.RegisterTable(typeof(Location), locationsControl, "Locations");
BindSupport.Bind(this.projectPanel, locationsControl, p => p.Locations);
- this.mainForm.DynamicTableControl.RegisterTable(typeof(RWScenarioProfileResult),
- calculationsControl, "Assessment calculations");
- BindSupport.Bind(this.projectPanel, calculationsControl, p => p.Calculations);
- BindSupport.Bind(this.projectPanel, calculationsControl.Parent, p => p.Calculations);
-
- var schematizationFactorsControl = new GridViewControl
- {
- Name = "SchematizationFactors", ShowToolbar = true, HideUnusedColumns = true
- };
- this.mainForm.DynamicTableControl.RegisterTable(typeof(RWScenarioProfileResult),
- schematizationFactorsControl, "SchematizationFactors");
- BindSupport.Bind(this.projectPanel,
- schematizationFactorsControl, p => p.SchematizationFactors);
- BindSupport.Bind(this.projectPanel,
- schematizationFactorsControl.Parent, p => p.SchematizationFactors);
-
this.mainForm.DynamicTableControl.RegisterTable(typeof(CsvExportData), designCalculationsControl, "Design calculations");
- BindSupport.Bind(this.projectPanel,
- designCalculationsControl, p => p.DesignCalculations);
- BindSupport.Bind(this.projectPanel,
- designCalculationsControl.Parent, p => p.DesignCalculations);
+ BindSupport.Bind(this.projectPanel, designCalculationsControl, p => p.DesignCalculations);
+ BindSupport.Bind(this.projectPanel, designCalculationsControl.Parent, p => p.DesignCalculations);
this.mainForm.DynamicTableControl.RegisterTable(typeof(Data.Sensors.Sensor), sensorControl, "Sensor Configuration");
BindSupport.Bind(this.sensorControl, sensorControl, p => p.Sensors);
@@ -386,12 +362,8 @@
this.mainForm.DynamicChartControl.RegisterChart(typeof(Data.TimeSerie), locationChart, "Time Series");
BindSupport.Bind(this.locationJobPanel, locationChart.Parent, typeof(LocationJob), "WaterLevelTimeSerie", BindingType.Visibility);
- var locationScenarioChart = new LocationScenarioChart(this.locationJobSymbol);
- this.mainForm.DynamicChartControl.RegisterChart(typeof(Location), locationScenarioChart, "Scenarios");
- BindSupport.Bind(this.locationJobPanel, locationScenarioChart.Parent, typeof(LocationJob), "RWScenarioResults", BindingType.Visibility);
-
// Bind the main tab "Chart" to be able to show it only when needed.
- BindSupport.Bind(this.panel, locationScenarioChart.Parent.Parent.Parent.Parent.Parent, typeof(DamPlugin), "IsChartVisible", BindingType.Visibility);
+ BindSupport.Bind(this.panel, locationChart.Parent.Parent.Parent.Parent.Parent, typeof(DamPlugin), "IsChartVisible", BindingType.Visibility);
}
@@ -420,7 +392,7 @@
// StabilityKernelTypeSpecificationsVisible = true;
// }
// }
- // For easy testing purposes, make sure kernel selectionoption is true
+ // For easy testing purposes, make sure kernel selection option is true
projectData.DamProjectCalculationSpecification.VisibleEnabledProvider = this;
StabilityKernelTypeSpecificationsVisible = true;
Context.CurrentContext = new DamContext
@@ -429,7 +401,6 @@
};
// get data
- lastAssesmentResult = null;
lastDesignResult = null;
lastLocationResult = null;
currentLocationJob = null;
@@ -462,7 +433,6 @@
RealTimeBackgroundValidator.Instance.Register(projectData);
- lastAssesmentResult = null;
lastDesignResult = null;
lastLocationResult = null;
@@ -524,15 +494,6 @@
Width = 100, Edit = projectTypeComboBox, PaintStyle = BarItemPaintStyle.Caption
};
- var scenarioComboBox = new RepositoryItemComboBox
- {
- TextEditStyle = TextEditStyles.DisableTextEditor, DropDownRows = 16
- };
- var scenarioBarItem = new BarEditItem
- {
- Width = 100, Edit = scenarioComboBox, PaintStyle = BarItemPaintStyle.Caption
- };
-
var designAnalysisComboBox = new RepositoryItemComboBox
{
TextEditStyle = TextEditStyles.DisableTextEditor
@@ -550,20 +511,10 @@
sliderBarItem,
dateBarItem,
timeBarItem,
- scenarioBarItem,
designAnalysisBarItem
});
- var scenarioExportItem = new BarButtonItem()
- {
- Caption = "Scenarios",
- Hint = "Export scenario's to ShapeFiles",
- Name = "exportBarItem"
- };
-
- this.mainForm.ExportMenu.AddItem(scenarioExportItem);
- this.mainForm.ExportMenu.Enabled = true;
-
+
var surfacelineExportItem = new BarButtonItem()
{
Caption = "Surfacelines",
@@ -584,7 +535,6 @@
var licenseItemLink = mainForm.ToolsMenu.ItemLinks.Cast().Where(il => il.Item.Name.Equals("LicenseBarButton")).ToList().FirstOrDefault();
mainForm.ToolsMenu.ItemLinks.Remove(licenseItemLink);
- BindSupport.Bind(this.panel, scenarioExportItem, x => x.ExecuteScenarioExport());
BindSupport.Bind(this.panel, surfacelineExportItem, x => x.ExecuteSurfacelinesExport());
BindSupport.Bind(this.panel, clearResultsMenuItem, x => x.ClearResults());
BindSupport.Bind(this.panel, saveCalculationItem, x => x.SaveCalculation());
@@ -596,20 +546,10 @@
BindSupport.Bind(this.locationJobSymbolPanel, sliderBarItem, x => x.CurrentView);
BindSupport.Bind(this.locationJobSymbolPanel, dateBarItem, x => x.CurrentDateTime);
- BindSupport.Bind(this.locationJobSymbolPanel, timeBarItem, x => x.CurrentDateTime);
- BindSupport.Bind(this.locationJobSymbolPanel, scenarioBarItem, x => x.CurrentScenarioType, BindingType.LabelAndValue);
+ BindSupport.Bind(this.locationJobSymbolPanel, timeBarItem, x => x.CurrentDateTime);
}
///
- /// Export the scenario results to shapefiles
- ///
- [Label("Scenarios")]
- private void ExecuteScenarioExport()
- {
- this.mapEditor.ExportScenarios();
- }
-
- ///
/// Export the redesigned surfacelines to a user selected folder
///
[Label("Surfacelines")]
@@ -743,37 +683,10 @@
{
SetProperControlsAfterDesignCalculation();
break;
- }
- case DamProjectType.Assessment:
- {
- SetProperControlsAfterAssessmentCalculation();
- break;
- }
+ }
}
}
- private void SetProperControlsAfterAssessmentCalculation()
- {
- if (damProject.DamProjectData.GetFirstLocationJobWithAssesmentResults() != null)
- {
- var res =
- damProject.DamProjectData.GetFirstLocationJobWithAssesmentResults().RWScenarioResults.FirstOrDefault
- ();
- if (res != null)
- {
- mainForm.SetAsActiveTable(calculationsControl);
- if (res.SafetyFactor > 0 && res.SafetyFactor < DamGlobalConstants.NoRunValue)
- {
- mainForm.SetAsActiveTabOnMainPanel(mainForm.DynamicImageControl);
- }
- // Selecting the result sets the correct line and that the correct property editor is displayed
- mainForm.Invoke(new TaskDelegate(DataEventPublisher.SelectionChanged),
- res.RWScenarioProfileResults[0]);
- mainForm.SetAsActivePropertyEditor(assessmentCalculationPropertyControl);
- }
- }
- }
-
private void SetProperControlsAfterDesignCalculation()
{
var locationJob = damProject.DamProjectData.GetFirstLocationJobWithDesignResults();
@@ -845,7 +758,6 @@
try
{
damProject.DeleteResults();
- lastAssesmentResult = null;
lastDesignResult = null;
lastLocationResult = null;
}
@@ -961,21 +873,7 @@
ShowLocationImage(null, locationJobSymbol.CurrentDateTime);
}
}
- var resultSelected = false;
- if (lastAssesmentResult == null || lastAssesmentResult.Location != location)
- {
- if (damProject.DamProjectData.DamProjectType == DamProjectType.Assessment)
- {
- lastAssesmentResult = locationJob.GetRWScenarioResultWithLowestSafetyFactor(this.locationJobSymbol.CurrentScenarioType);
- if (lastAssesmentResult != null)
- {
- ShowAssesmentImage(lastAssesmentResult);
- resultSelected = true;
- DataEventPublisher.SelectionChanged(lastAssesmentResult, PropertyEditorReactionType.Update);
- }
- }
- }
-
+
if (damProject.DamProjectData.DamProjectType == DamProjectType.Design)
{
var designLocation = location;
@@ -990,28 +888,6 @@
DataEventPublisher.SelectionChanged(lastDesignResult, PropertyEditorReactionType.Ignore);
}
}
-
- var firstProfileResult = damProject.DamProjectData.Calculations.FirstOrDefault(
- r => r.Location == location
- && r.ScenarioType == locationJobSymbol.CurrentScenarioType);
-
- if (firstProfileResult != null && !resultSelected)
- {
- DataEventPublisher.SelectionChanged(firstProfileResult, PropertyEditorReactionType.Ignore);
- }
- if (resultSelected)
- {
- DataEventPublisher.SelectionChanged(lastAssesmentResult, PropertyEditorReactionType.Ignore);
- }
- var firstSchematizationResult = damProject.DamProjectData.SchematizationFactors.FirstOrDefault(
- r => r.Location == location
- && r.DecisiveScenarioName == locationJobSymbol.CurrentScenarioType);
-
- if (firstSchematizationResult != null)
- {
- DataEventPublisher.SelectionChanged(firstSchematizationResult, PropertyEditorReactionType.Ignore);
- }
-
DataEventPublisher.AfterChange(this);
}
@@ -1037,18 +913,6 @@
SelectFirstMatchingLocationJobIfAny(location);
}
- private void SelectRWScenarioProfileResult(RWScenarioProfileResult result)
- {
- lastAssesmentResult = result;
- ShowAssesmentImage(lastAssesmentResult);
-
- this.locationJobSymbol.CurrentScenarioType = lastAssesmentResult.ScenarioType;
- this.locationJobSymbol.CurrentProfileName = lastAssesmentResult.SoilProfileName;
- SelectFirstMatchingLocationJobIfAny(lastAssesmentResult.Location);
-
- DataEventPublisher.AfterChange(this);
- }
-
private void SelectDesignResult(CsvExportData result)
{
lastDesignResult = result;
@@ -1065,15 +929,6 @@
DataEventPublisher.AfterChange(this);
}
- private void SelectRWSchematizationFactorResult(RWSchematizationFactorResult result)
- {
- this.locationJobSymbol.CurrentScenarioType = result.DecisiveScenarioName;
- this.locationJobSymbol.CurrentProfileName = result.OriginalDecisiveSoilProfileName;
- SelectFirstMatchingLocationJobIfAny(result.Location);
-
- DataEventPublisher.AfterChange(this);
- }
-
private void DataEventPublisher_OnSelectionChanged(object sender, PublishEventArgs e)
{
var type = sender == null ? null : sender.GetType();
@@ -1102,14 +957,6 @@
SelectLocation(senderLocation.Location);
// Activate any custom property editor for SensorLocation here.
}
- else if (sender is RWScenarioProfileResult)
- {
- SelectRWScenarioProfileResult((RWScenarioProfileResult)sender);
- }
- else if (sender is RWSchematizationFactorResult)
- {
- SelectRWSchematizationFactorResult((RWSchematizationFactorResult)sender);
- }
else if (sender is CsvExportData)
{
SelectDesignResult((CsvExportData)sender);
@@ -1145,18 +992,6 @@
}
}
- private void ShowAssesmentImage(RWScenarioProfileResult result)
- {
- if (result != null)
- {
- ShowImage(result.ResultFile);
- }
- else
- {
- this.mainForm.DynamicImageControl.ZoomablePictureBox.Image = null;
- }
- }
-
private void ShowDesignImage(CsvExportData result)
{
if (result != null)
@@ -1183,7 +1018,7 @@
damNewProjectData = new DAMNewProjectData
{
- DamProjectType = DamProjectType.Assessment,
+ DamProjectType = DamProjectType.Design,
DamDataSourceFileName = this.damProject.DamProjectData.DamDataSourceFileName,
DamType = DamType.Regional
};
@@ -1201,24 +1036,6 @@
return this.damProject;
}
- private void SetProperControlsAfterNewProject()
- {
- // Clear image (if any was there) and set Mapeditor
- ShowImage("");
- mainForm.SetAsActiveTabOnMainPanel(mapControl);
- // Update data lists
- //mainForm.Invoke(new PublisherDelegate(DataEventPublisher.DataListModified), damProject.DamProjectData.LocationJobs, null);
- // Set Location as active table and property screen, make sure first location is selected.
- // update logmessages
- //mainForm.Invoke(new PublisherDelegate(DataEventPublisher.DataListModified), LogManager.Messages, null);
- // update the data
- // Set the locations table
- mainForm.SetAsActiveTable(locationsControl);
- mainForm.Invoke(new TaskDelegate(DataEventPublisher.SelectionChanged), damProject.DamProjectData.WaterBoard.Locations.FirstOrDefault());
- mainForm.Invoke(new TaskDelegate(DataEventPublisher.SelectionChanged), damProject.DamProjectData.LocationJobs.FirstOrDefault());
- mainForm.SetAsActivePropertyEditor(locationPropertyControl);
- }
-
private void Import()
{
LogManager.Clear();
@@ -1354,15 +1171,7 @@
public void ShowCalculationOptions()
{
DataEventPublisher.SelectionChanged(damProject.DamProjectData.WaterBoardJob);
- if (damProject.DamProjectData.DamProjectType == DamProjectType.Calamity ||
- damProject.DamProjectData.DamProjectType == DamProjectType.Design)
- {
- FormsSupport.MakeTreeVisible(damProjectCalculationSpecificationPropertyControl);
- }
- else if (damProject.DamProjectData.DamProjectType == DamProjectType.Assessment)
- {
- FormsSupport.MakeTreeVisible(assessmentCalculationSpecificationPropertyControl);
- }
+ FormsSupport.MakeTreeVisible(damProjectCalculationSpecificationPropertyControl);
}
[Label("Calculation file")]
@@ -1380,13 +1189,8 @@
private void SaveFile(string filter)
{
var filenameRes = "";
- if (damProject.DamProjectData.DamProjectType != DamProjectType.Design)
+ if (damProject.DamProjectData.DamProjectType == DamProjectType.Design)
{
- if (lastAssesmentResult == null || !File.Exists(lastAssesmentResult.ResultFile)) return;
- filenameRes = lastAssesmentResult.ResultFile;
- }
- else
- {
if (lastDesignResult == null || !File.Exists(lastDesignResult.ResultFile)) return;
filenameRes = lastDesignResult.ResultFile;
}
@@ -1417,25 +1221,19 @@
{
switch (property)
{
- case "SaveCalculation": return (lastAssesmentResult != null) || (lastDesignResult != null);
- case "SaveImage": return lastAssesmentResult != null;
+ case "SaveCalculation": return (lastDesignResult != null);
case "ExecuteSurfacelinesExport":
return this.damProject != null && this.damProject.DamProjectData != null &&
this.damProject.DamProjectData.DamProjectType == DamProjectType.Design && this.damProject.DamProjectData.LocationJobs != null &&
this.damProject.DamProjectData.LocationJobs.Count > 0;
- case "ExecuteScenarioExport":
- return this.damProject != null && this.damProject.DamProjectData != null &&
- this.damProject.DamProjectData.DamProjectType == DamProjectType.Assessment && this.damProject.DamProjectData.LocationJobs != null &&
- this.damProject.DamProjectData.LocationJobs.Count > 0;
case "ClearResults":
return this.damProject != null && this.damProject.DamProjectData != null &&
this.damProject.DamProjectData.HasResults();
case "ShowCalculationOptions":
return this.damProject != null &&
this.damProject.DamProjectData != null &&
this.damProject.DamProjectData.LocationJobs != null &&
- (this.damProject.DamProjectData.DamProjectType == DamProjectType.Assessment ||
- this.damProject.DamProjectData.DamProjectType == DamProjectType.Calamity ||
+ (this.damProject.DamProjectData.DamProjectType == DamProjectType.Calamity ||
this.damProject.DamProjectData.DamProjectType == DamProjectType.Design) &&
this.damProject.DamProjectData.LocationJobs.Count > 0;
default: return true;
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Importers/LocationCsvColumnNames.cs
===================================================================
diff -u -r2089 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Importers/LocationCsvColumnNames.cs (.../LocationCsvColumnNames.cs) (revision 2089)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Importers/LocationCsvColumnNames.cs (.../LocationCsvColumnNames.cs) (revision 2135)
@@ -66,11 +66,6 @@
public const string PolderLevelColumnName = "polderlevel";
///
- /// polderlevellow
- ///
- public const string PolderLevelLowColumnName = "polderlevellow";
-
- ///
/// head_pl2
///
public const string HeadPl2ColumnName = "head_pl2";
@@ -101,11 +96,6 @@
public const string XSoilGeometry2DOriginColumnName = "x_soilgeometry2D_origin";
///
- /// Defines the column name: materiaaltypedijk
- ///
- public const string DikeMaterialTypeColumnName = "materiaaltypedijk";
-
- ///
/// Defines the column name: ophoogmateriaaldijk
///
public const string DikeEmbankmentMaterialColumnName = "ophoogmateriaaldijk";
@@ -126,26 +116,6 @@
public const string DampingFactorPl4ColumnName = "dempingsfactor_pl4";
///
- /// Sheetpile_x
- ///
- public const string SheetPileXRdColumnName = "Sheetpile_x";
-
- ///
- /// Sheetpile_y
- ///
- public const string SheetPileYRdColumnName = "Sheetpile_y";
-
- ///
- /// Sheetpile_z
- ///
- public const string SheetPileZRdColumnName = "Sheetpile_z";
-
- ///
- /// Sheetpile_length
- ///
- public const string SheetPileLengthColumnName = "Sheetpile_length";
-
- ///
/// use_original_plline_assignments
///
public const string UseOriginalPlLineAssignmentsColumnName = "use_original_plline_assignments";
@@ -191,26 +161,6 @@
public const string PlLineOffsetBelowDikeToeAtPolderColumnName = "PLLineOffsetBelowDikeToeAtPolder";
///
- /// PLLineOffsetDryBelowDikeTopAtRiver
- ///
- public const string PlLineOffsetDryBelowDikeTopAtRiverColumnName = "PLLineOffsetDryBelowDikeTopAtRiver";
-
- ///
- /// PLLineOffsetDryBelowDikeTopAtPolder
- ///
- public const string PlLineOffsetDryBelowDikeTopAtPolderColumnName = "PLLineOffsetDryBelowDikeTopAtPolder";
-
- ///
- /// PLLineOffsetDryBelowShoulderBaseInside
- ///
- public const string PlLineOffsetDryBelowShoulderBaseInsideColumnName = "PLLineOffsetDryBelowShoulderBaseInside";
-
- ///
- /// PLLineOffsetDryBelowDikeToeAtPolder
- ///
- public const string PlLineOffsetDryBelowDikeToeAtPolderColumnName = "PLLineOffsetDryBelowDikeToeAtPolder";
-
- ///
/// The pl line offset below dike crest middle
///
public const string PlLineOffsetBelowDikeCrestMiddle = "PLLineOffsetBelowDikeCrestMiddle";
@@ -221,16 +171,6 @@
public const string PlLineOffsetFactorBelowShoulderCrest = "PLLineOffsetFactorBelowShoulderCrest";
///
- /// The pl line offset below dike crest middle (Dry)
- ///
- public const string PlLineOffsetDryBelowDikeCrestMiddle = "PLLineOffsetDryBelowDikeCrestMiddle";
-
- ///
- /// The pl line offset factor below shoulder crest (Dry)
- ///
- public const string PlLineOffsetDryFactorBelowShoulderCrest = "PLLineOffsetDryFactorBelowShoulderCrest";
-
- ///
/// Use the pl line offset below dike crest middle
///
public const string UsePlLineOffsetBelowDikeCrestMiddle = "UsePLLineOffsetBelowDikeCrestMiddle";
@@ -241,16 +181,6 @@
public const string UsePlLineOffsetFactorBelowShoulderCrest = "UsePLLineOffsetFactorBelowShoulderCrest";
///
- /// Use the pl line offset below dike crest middle (Dry)
- ///
- public const string UsePlLineOffsetDryBelowDikeCrestMiddle = "UsePLLineOffsetDryBelowDikeCrestMiddle";
-
- ///
- /// Use the pl line offset factor below shoulder crest (Dry)
- ///
- public const string UsePlLineOffsetDryFactorBelowShoulderCrest = "UsePLLineOffsetDryFactorBelowShoulderCrest";
-
- ///
/// The intrusion vertical water pressure
///
public const string IntrusionVerticalWaterPressure = "IntrusionVerticalWaterPressure";
@@ -271,26 +201,6 @@
public const string StabilitySlopeAdaptionDeltaXColumnName = "StabilitySlopeAdaptionDeltaX";
///
- /// baggerdiepte
- ///
- public const string DredgingDepthColumnName = "baggerdiepte";
-
- ///
- /// bp_tp
- ///
- public const string BoezemLevelTpColumnName = "bp_tp";
-
- ///
- /// bp_hbp
- ///
- public const string BoezemLevelHbpColumnName = "bp_hbp";
-
- ///
- /// bp_lbp
- ///
- public const string BoezemLevelLbpColumnName = "bp_lbp";
-
- ///
/// minimal_circle_depth
///
public const string MinimalCircleDepthColumnName = "minimal_circle_depth";
@@ -321,11 +231,6 @@
public const string DistanceToEntryPointColumnName = "distance_to_entry_point";
///
- /// DetrimentFactor
- ///
- public const string DetrimentFactorColumnName = "detrimentfactor";
-
- ///
/// Dike table height
///
public const string DikeTableHeightColumnName = "DikeTableHeight";
@@ -356,11 +261,6 @@
public const string SlopeDampingPiezometricHeightPolderSideColumnName = "SlopeDampingPiezometricHeightPolderSide";
///
- /// Sheet pile bottom level
- ///
- public const string RwBankProtectionBottomLevelColumnName = "RWBankProtectionBottomLevel";
-
- ///
/// safety_factor_stability_inner_slope
///
public const string RequiredSafetyFactorStabilityInnerSlopeColumnName = ModelFactorCsvIdentifiers.SafetyFactorStabilityInnerslope;
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Location.cs
===================================================================
diff -u -r2089 -r2135
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Location.cs (.../Location.cs) (revision 2089)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Location.cs (.../Location.cs) (revision 2135)
@@ -56,25 +56,17 @@
public const string SegmentId = "SegmentId";
public const string SurfaceLineId = "SurfaceLineId";
public const string PL1LineId = "PL1LineId";
- public const string DredgingDepth = "DredgingDepth";
public const string PolderLevel = "PolderLevel";
- public const string PolderLevelLow = "PolderLevelLow";
public const string HeadPL2 = "HeadPL2";
public const string HeadPL3 = "HeadPL3";
public const string HeadPL4 = "HeadPL4";
public const string GrassQuality = "GrassQuality";
public const string Direction = "Direction";
public const string XSoilGeometry2DOrigin = "XSoilGeometry2DOrigin";
- public const string DikeMaterialType = "DikeMaterialType";
public const string DikeEmbankmentMaterial = "DikeEmbankmentMaterial";
public const string ShoulderEmbankmentMaterial = "ShoulderEmbankmentMaterial";
public const string DampingFactorPL3 = "DampingFactorPL3";
public const string DampingFactorPL4 = "DampingFactorPL4";
- public const string SheetPilePointX = "SheetPilePointX";
- public const string SheetPilePointY = "SheetPilePointY";
- public const string SheetPilePointZ = "SheetPilePointZ";
- public const string SheetPileLength = "SheetPileLength";
- public const string RwBankProtectionBottomLevel = "RwBankProtectionBottomLevel";
public const string IsUseOriginalPLLineAssignments = "IsUseOriginalPLLineAssignments";
public const string PenetrationLength = "PenetrationLength";
public const string TrafficLoad = "TrafficLoad";
@@ -83,24 +75,13 @@
public const string PLLineOffsetBelowDikeTopAtPolder = "PLLineOffsetBelowDikeTopAtPolder";
public const string PLLineOffsetBelowShoulderBaseInside = "PLLineOffsetBelowShoulderBaseInside";
public const string PLLineOffsetBelowDikeToeAtPolder = "PLLineOffsetBelowDikeToeAtPolder";
- public const string PLLineOffsetDryBelowDikeTopAtRiver = "PLLineOffsetDryBelowDikeTopAtRiver";
- public const string PLLineOffsetDryBelowDikeTopAtPolder = "PLLineOffsetDryBelowDikeTopAtPolder";
- public const string PLLineOffsetDryBelowShoulderBaseInside = "PLLineOffsetDryBelowShoulderBaseInside";
- public const string PLLineOffsetDryBelowDikeToeAtPolder = "PLLineOffsetDryBelowDikeToeAtPolder";
public const string PlLineOffsetBelowDikeCrestMiddle = "PlLineOffsetBelowDikeCrestMiddle";
public const string PlLineOffsetFactorBelowShoulderCrest = "PlLineOffsetFactorBelowShoulderCrest";
- public const string PlLineOffsetDryBelowDikeCrestMiddle = "PlLineOffsetDryBelowDikeCrestMiddle";
- public const string PlLineOffsetDryFactorBelowShoulderCrest = "PlLineOffsetDryFactorBelowShoulderCrest";
public const string UsePlLineOffsetBelowDikeCrestMiddle = "UsePlLineOffsetBelowDikeCrestMiddle";
public const string UsePlLineOffsetFactorBelowShoulderCrest = "UsePlLineOffsetFactorBelowShoulderCrest";
- public const string UsePlLineOffsetDryBelowDikeCrestMiddle = "UsePlLineOffsetDryBelowDikeCrestMiddle";
- public const string UsePlLineOffsetDryFactorBelowShoulderCrest = "UsePlLineOffsetDryFactorBelowShoulderCrest";
public const string StabilityShoulderGrowSlope = "StabilityShoulderGrowSlope";
public const string StabilityShoulderGrowDeltaX = "StabilityShoulderGrowDeltaX";
public const string StabilitySlopeAdaptionDeltaX = "StabilitySlopeAdaptionDeltaX";
- public const string BoezemLevelTp = "BoezemLevelTp";
- public const string BoezemlevelHbp = "BoezemLevelHbp";
- public const string BoezemLevelLbp = "BoezemLevelLbp";
public const string MinimalCircleDepth = "MinimalCircleDepth";
public const string LevelReductionInside = "LevelReductionInside";
public const string LevelReductionOutside = "LevelReductionOutside";
@@ -115,7 +96,6 @@
public const string RequiredProbabilityOfFailurePiping = "RequiredProbabilityOfFailurePiping";
public const string UpliftCriterionPiping = "UpliftCriterionPiping";
public const string UpliftCriterionStability = "UpliftCriterionStability";
- public const string DetrimentFactor = "DetrimentFactor";
public const string StabilityZoneType = "StabilityZoneType";
public const string ForbiddenZoneFactor = "ForbiddenZoneFactor";
public const string ZoneAreaRestSlopeCrestWidth = "ZoneAreaRestSlopeCrestWidth";
@@ -154,18 +134,14 @@
public const string DikeCategory = "Dike";
public const string WaterCategory = "Water levels";
public const string DesignCategory = "Design";
- private const double BoezemLevelNotSetValue = -987654321.0;
private const double newDikeTopWidthMinValue = 0.1;
private const double newDikeSlopeInsideMinValue = 0.01;
private const double newDikeSlopeOutsideMinValue = 0.01;
private const double penetrationLenghtMinValue = 0.00;
private static DamProjectType damProjectType = DamProjectType.Calamity;
private readonly List scenarios = new List();
private bool areLocalXZObjectsCreated = false;
- private double boezemLevelHbp = BoezemLevelNotSetValue;
- private double boezemLevelLbp = BoezemLevelNotSetValue;
- private double boezemLevelTp = BoezemLevelNotSetValue;
-
+
// ATTENTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//
// When adding properties below do not forget to add these properties to SetParameterFromNameValuePair and GetParametersAsNameValuePairs
@@ -175,14 +151,11 @@
private double dampingFactorPL3 = 0;
private double dampingFactorPL4 = 0;
private string description = "";
- private double detrimentFactor = 0.95;
private string dikeEmbankmentMaterial = "";
- private SoilType dikeMaterialType = SoilType.Clay;
private string dikeRingId = "";
private double dikeTableHeight = 0.0;
private double direction = 0;
private double distanceToEntryPoint = 0;
- private double dredgingDepth = 0;
private double forbiddenZoneFactor = 1.0;
private IList gaugePLLines = new List();
private IList gauges = new List();
@@ -197,7 +170,6 @@
private double levelReductionInside = 0;
private double levelReductionOutside = 0;
private PL1Line localXZPL1Line;
- private GeometryPoint localXZSheetPilePoint;
private SurfaceLine2 localXzSurfaceLine;
private string mapForSoilGeometries2D = "";
private double minimalCircleDepth = 0;
@@ -219,22 +191,14 @@
private double pLLineOffsetBelowDikeTopAtPolder = 1.5;
private double pLLineOffsetBelowDikeTopAtRiver = 0.5;
private double pLLineOffsetBelowShoulderBaseInside = 0.1;
- private double pLLineOffsetDryBelowDikeToeAtPolder = 0.1;
- private double pLLineOffsetDryBelowDikeTopAtPolder = 1.5;
- private double pLLineOffsetDryBelowDikeTopAtRiver = 0.5;
- private double pLLineOffsetDryBelowShoulderBaseInside = 0.1;
private double penetrationLength = 0;
private double polderLevel = 0;
- private double polderLevelLow = 0;
private bool redesignDikeHeight = true;
private bool redesignDikeShoulder = true;
- private double rwBankProtectionBottomLevel = 0;
private double scenarioRiverLevel = 0;
private double? scenarioRiverLevelLow = null;
private Segment segment;
private SensorLocation sensorLocation;
- private double sheetPileLength = 0;
- private GeometryPoint sheetPilePoint = new GeometryPoint();
private string shoulderEmbankmentMaterial = "";
private double slopeAdaptionEndCotangent = 6.0;
private double slopeAdaptionStartCotangent = 3.0;
@@ -267,9 +231,7 @@
private double? plLineOffsetFactorBelowShoulderCrest;
private double? plLineOffsetBelowDikeCrestMiddle;
- private double? plLineOffsetDryFactorBelowShoulderCrest;
- private double? plLineOffsetDryBelowDikeCrestMiddle;
-
+
private IntrusionVerticalWaterPressureType? intrusionVerticalWaterPressure = IntrusionVerticalWaterPressureType.Standard;
@@ -479,140 +441,7 @@
}
}
- [Unit(UnitType.Length)]
- [Label("Dredging depth")]
- [Description("Dredging depth in storage basin")]
- [Format("F3")]
- [Category(DikeCategory)]
- [PropertyOrder(4, 1)]
- public virtual double DredgingDepth
- {
- get
- {
- return dredgingDepth;
- }
- set
- {
- DataEventPublisher.BeforeChange(this, "DredgingDepth");
- dredgingDepth = value;
- DataEventPublisher.AfterChange(this, "DredgingDepth");
- }
- }
-
- [Unit(UnitType.None)]
- [Label("Dike material type")]
- [Category(DikeCategory)]
- [Description("Dike material type")]
- [PropertyOrder(1, 6)]
- public virtual SoilType DikeMaterialType
- {
- get
- {
- return dikeMaterialType;
- }
- set
- {
- DataEventPublisher.BeforeChange(this, "dikeMaterialType");
- dikeMaterialType = value;
- DataEventPublisher.AfterChange(this, "dikeMaterialType");
- }
- }
-
[Browsable(false)]
- public virtual GeometryPoint SheetPilePoint
- {
- get
- {
- return sheetPilePoint;
- }
- set
- {
- DataEventPublisher.BeforeChange(this, "SheetPilePoint");
- sheetPilePoint = value;
- DataEventPublisher.AfterChange(this, "SheetPilePoint");
- }
- }
-
- [Browsable(false)]
- public virtual double SheetPilePointX
- {
- get
- {
- return SheetPilePoint.X;
- }
- set
- {
- SheetPilePoint.X = value;
- }
- }
-
- [Browsable(false)]
- public virtual double SheetPilePointY
- {
- get
- {
- return SheetPilePoint.Y;
- }
- set
- {
- SheetPilePoint.Y = value;
- }
- }
-
- [Browsable(false)]
- public virtual double SheetPilePointZ
- {
- get
- {
- return SheetPilePoint.Z;
- }
- set
- {
- SheetPilePoint.Z = value;
- }
- }
-
- [Unit(UnitType.Length)]
- [Label("Sheet pile length")]
- [Description("Sheet pile length")]
- [Format("F2")]
- [PropertyOrder(4, 2)]
- [Category(DikeCategory)]
- public virtual double SheetPileLength
- {
- get
- {
- return sheetPileLength;
- }
- set
- {
- DataEventPublisher.BeforeChange(this, "SheetPileLength");
- sheetPileLength = value;
- DataEventPublisher.AfterChange(this, "SheetPileLength");
- }
- }
-
- [Unit(UnitType.Length)]
- [Label("Sheet pile bottom level")]
- [Description("Sheet pile bottom level")]
- [Format("F2")]
- [PropertyOrder(4, 3)]
- [Category(DikeCategory)]
- public virtual double RwBankProtectionBottomLevel
- {
- get
- {
- return rwBankProtectionBottomLevel;
- }
- set
- {
- DataEventPublisher.BeforeChange(this, this.GetMemberName(x => x.RwBankProtectionBottomLevel));
- rwBankProtectionBottomLevel = value;
- DataEventPublisher.AfterChange(this, this.GetMemberName(x => x.RwBankProtectionBottomLevel));
- }
- }
-
- [Browsable(false)]
public virtual bool IsUseOriginalPLLineAssignments
{
get
@@ -675,21 +504,6 @@
}
}
- [Browsable(false)]
- public virtual GeometryPoint LocalXZSheetPilePoint
- {
- get
- {
- return localXZSheetPilePoint;
- }
- set
- {
- DataEventPublisher.BeforeChange(this, "LocalXZSheetPilePoint");
- localXZSheetPilePoint = value;
- DataEventPublisher.AfterChange(this, "LocalXZSheetPilePoint");
- }
- }
-
///
/// Gets or sets the Segment
///
@@ -902,25 +716,6 @@
}
}
- [Label("Detriment factor")]
- [Description("Detriment factor")]
- [Format("F3")]
- [Category(DikeCategory)]
- [PropertyOrder(1, 9)]
- public virtual double DetrimentFactor
- {
- get
- {
- return detrimentFactor;
- }
- set
- {
- DataEventPublisher.BeforeChange(this, "DetrimentFactor");
- detrimentFactor = value;
- DataEventPublisher.AfterChange(this, "DetrimentFactor");
- }
- }
-
[Label("Slope damping factor")]
[Description("The tangent of the slope damping for piezometric height polderSide (for PL3 and PL4)")]
[Format("F3")]
@@ -1629,21 +1424,6 @@
}
///
- /// Ensure proper Safety Factors for zone type areas by always using the detriment factor.
- ///
- public void EnsureProperZoneSafetyFactors()
- {
- if (modelFactors != null)
- {
- // For regional assessment, automatically fill with the detriment factor instead of error message and repairer (MWDAM-748)
- if (DamType == DamType.Regional && DamProjectType == DamProjectType.Assessment)
- {
- modelFactors.RequiredSafetyFactorStabilityInnerSlope = detrimentFactor;
- }
- }
- }
-
- ///
/// Checks whether the required safety (stability inner slope) is given as that is needed to work with zone areas.
///
///
@@ -1821,47 +1601,7 @@
}
}
- ///
- /// Validates the location has valid essential assessment values.
- ///
- ///
[Validate]
- public ValidationResult[] ValidateLocationHasValidEssentialAssessmentValues()
- {
- if (DamProjectType == DamProjectType.Assessment)
- {
- if (Math.Abs(BoezemLevelTp - BoezemLevelNotSetValue) < Double.Epsilon)
- {
- return new[]
- {
- new ValidationResult(ValidationResultType.Error,
- LocalizationManager.GetTranslatedText(this, "LocationInvalidBoezemLevelTp"),
- this)
- };
- }
- if (Math.Abs(boezemLevelHbp - BoezemLevelNotSetValue) < Double.Epsilon)
- {
- return new[]
- {
- new ValidationResult(ValidationResultType.Error,
- LocalizationManager.GetTranslatedText(this, "LocationInvalidBoezemLevelHbp"),
- this)
- };
- }
- if (Math.Abs(boezemLevelLbp - BoezemLevelNotSetValue) < Double.Epsilon)
- {
- return new[]
- {
- new ValidationResult(ValidationResultType.Error,
- LocalizationManager.GetTranslatedText(this, "LocationInvalidBoezemLevelLbp"),
- this)
- };
- }
- }
- return new ValidationResult[0];
- }
-
- [Validate]
public ValidationResult[] ValidateDikeEmbankmentMaterialDefinedIfSurfacelineAboveSoilProfile()
{
if (IsSurfaceLineAboveSoilProfile() && !HasValidDikeEmbankmentMaterial())
@@ -2355,110 +2095,6 @@
}
///
- /// Gets or sets the pl line offset dry below dike top at river.
- ///
- ///
- /// The pl line offset dry below dike top at river.
- ///
- [Unit(UnitType.Length)]
- [Label("PL1 below top dike (river) in dry situation")]
- [Description("PL1 below top dike (riverside) in dry situation")]
- [Format("F3")]
- [Category(WaterCategory)]
- [PropertyOrder(3, 6)]
- public virtual double PLLineOffsetDryBelowDikeTopAtRiver
- {
- get
- {
- return pLLineOffsetDryBelowDikeTopAtRiver;
- }
- set
- {
- DataEventPublisher.BeforeChange(this, "PLLineOffsetDryBelowDikeTopAtRiver");
- pLLineOffsetDryBelowDikeTopAtRiver = value;
- DataEventPublisher.AfterChange(this, "PLLineOffsetDryBelowDikeTopAtRiver");
- }
- }
-
- ///
- /// Gets or sets the pl line offset dry below dike top at polder.
- ///
- ///
- /// The pl line offset dry below dike top at polder.
- ///
- [Unit(UnitType.Length)]
- [Label("PL1 below top dike (polder) in dry situation")]
- [Description("PL1 below top dike (polderside) in dry situation")]
- [Format("F3")]
- [Category(WaterCategory)]
- [PropertyOrder(3, 7)]
- public virtual double PLLineOffsetDryBelowDikeTopAtPolder
- {
- get
- {
- return pLLineOffsetDryBelowDikeTopAtPolder;
- }
- set
- {
- DataEventPublisher.BeforeChange(this, "PLLineOffsetDryBelowDikeTopAtPolder");
- pLLineOffsetDryBelowDikeTopAtPolder = value;
- DataEventPublisher.AfterChange(this, "PLLineOffsetDryBelowDikeTopAtPolder");
- }
- }
-
- ///
- /// Gets or sets the pl line offset dry below shoulder base inside.
- ///
- ///
- /// The pl line offset dry below shoulder base inside.
- ///
- [Unit(UnitType.Length)]
- [Label("PL1 below shoulder base (polder) in dry situation")]
- [Description("PL1 below shoulder base (polderside) in dry situation")]
- [Format("F3")]
- [Category(WaterCategory)]
- [PropertyOrder(3, 8)]
- public virtual double PLLineOffsetDryBelowShoulderBaseInside
- {
- get
- {
- return pLLineOffsetDryBelowShoulderBaseInside;
- }
- set
- {
- DataEventPublisher.BeforeChange(this, "PLLineOffsetDryBelowShoulderBaseInside");
- pLLineOffsetDryBelowShoulderBaseInside = value;
- DataEventPublisher.AfterChange(this, "PLLineOffsetDryBelowShoulderBaseInside");
- }
- }
-
- ///
- /// Gets or sets the pl line offset dry below dike toe at polder.
- ///
- ///
- /// The pl line offset dry below dike toe at polder.
- ///
- [Unit(UnitType.Length)]
- [Label("PL1 below toe of dike (polder) in dry situation")]
- [Description("PL1 below toe of dike (polderside) in dry situation")]
- [Format("F3")]
- [Category(WaterCategory)]
- [PropertyOrder(3, 9)]
- public virtual double PLLineOffsetDryBelowDikeToeAtPolder
- {
- get
- {
- return pLLineOffsetDryBelowDikeToeAtPolder;
- }
- set
- {
- DataEventPublisher.BeforeChange(this, "PLLineOffsetDryBelowDikeToeAtPolder");
- pLLineOffsetDryBelowDikeToeAtPolder = value;
- DataEventPublisher.AfterChange(this, "PLLineOffsetDryBelowDikeToeAtPolder");
- }
- }
-
- ///
/// Gets or sets the use pl line offset below dike crest middle.
///
///
@@ -2524,73 +2160,7 @@
}
}
- ///
- /// Gets or sets the use pl line offset dry below dike crest middle.
- ///
- ///
- /// The use pl line offset dry below dike crest middle.
- ///
- [Unit(UnitType.None)]
- [Category(WaterCategory)]
- [Clearable]
- [PropertyOrder(3, 14)]
- public bool? UsePlLineOffsetDryBelowDikeCrestMiddle { get; set; }
-
- ///
- /// Gets or sets the pl line offset dry below dike crest middle.
- ///
- ///
- /// The pl line offset dry below dike crest middle.
- ///
- [Unit(UnitType.Length)]
- [Format("F2")]
- [Category(WaterCategory)]
- [PropertyOrder(3, 15)]
- public double? PlLineOffsetDryBelowDikeCrestMiddle
- {
- get { return plLineOffsetDryBelowDikeCrestMiddle; }
- set
- {
- DataEventPublisher.BeforeChange(this, x => x.PlLineOffsetDryBelowDikeCrestMiddle);
- plLineOffsetDryBelowDikeCrestMiddle = value;
- DataEventPublisher.AfterChange(this, x => x.PlLineOffsetDryBelowDikeCrestMiddle);
- }
- }
-
- ///
- /// Gets or sets the use pl line offset dry factor below shoulder crest.
- ///
- ///
- /// The use pl line offset dry factor below shoulder crest.
- ///
- [Unit(UnitType.None)]
- [Category(WaterCategory)]
- [Clearable]
- [PropertyOrder(3, 16)]
- public bool? UsePlLineOffsetDryFactorBelowShoulderCrest { get; set; }
-
- ///
- /// Gets or sets the pl line offset dry factor below shoulder crest.
- ///
- ///
- /// The pl line offset dry factor below shoulder crest.
- ///
- [Unit(UnitType.Fractions)]
- [Format("F2")]
- [Category(WaterCategory)]
- [PropertyOrder(3, 17)]
- public double? PlLineOffsetDryFactorBelowShoulderCrest
- {
- get { return plLineOffsetDryFactorBelowShoulderCrest; }
- set
- {
- DataEventPublisher.BeforeChange(this, x => x.PlLineOffsetDryFactorBelowShoulderCrest);
- plLineOffsetDryFactorBelowShoulderCrest = value;
- DataEventPublisher.AfterChange(this, x => x.PlLineOffsetDryFactorBelowShoulderCrest);
- }
- }
-
- ///
+ //
/// Gets or sets the intrusion vertical water pressure.
///
///
@@ -2613,69 +2183,6 @@
#region Waterlevels
[Unit(UnitType.Length)]
- [Label("BP-TP")]
- [Description("Normative storage basin level")]
- [Format("F3")]
- [Category(WaterCategory)]
- [PropertyOrder(2, 1)]
- [XmlOldName("BoezemLevelNormative")]
- public virtual double BoezemLevelTp
- {
- get
- {
- return boezemLevelTp;
- }
- set
- {
- DataEventPublisher.BeforeChange(this, "BoezemLevelTp");
- boezemLevelTp = value;
- DataEventPublisher.AfterChange(this, "BoezemLevelTp");
- }
- }
-
- [Unit(UnitType.Length)]
- [Label("BP-HBP")]
- [Description("High storage basin water level (exceedance probability 1/yr)")]
- [Format("F3")]
- [Category(WaterCategory)]
- [PropertyOrder(2, 2)]
- [XmlOldName("BoezemLevelGws")]
- public virtual double BoezemLevelHbp
- {
- get
- {
- return boezemLevelHbp;
- }
- set
- {
- DataEventPublisher.BeforeChange(this, "BoezemLevelHbp");
- boezemLevelHbp = value;
- DataEventPublisher.AfterChange(this, "BoezemLevelHbp");
- }
- }
-
- [Unit(UnitType.Length)]
- [Label("BP-LBP")]
- [Description("Low storage basin water level")]
- [Format("F3")]
- [Category(WaterCategory)]
- [PropertyOrder(2, 3)]
- [XmlOldName("BoezemLevelGlw")]
- public virtual double BoezemLevelLbp
- {
- get
- {
- return boezemLevelLbp;
- }
- set
- {
- DataEventPublisher.BeforeChange(this, "BoezemLevelLbp");
- boezemLevelLbp = value;
- DataEventPublisher.AfterChange(this, "BoezemLevelLbp");
- }
- }
-
- [Unit(UnitType.Length)]
[Label("Polder level")]
[Description("Water level in polder")]
[Format("F3")]
@@ -2696,26 +2203,6 @@
}
[Unit(UnitType.Length)]
- [Label("Polder level low")]
- [Description("Water level in polder (summer)")]
- [Format("F3")]
- [Category(WaterCategory)]
- [PropertyOrder(2, 5)]
- public virtual double PolderLevelLow
- {
- get
- {
- return polderLevelLow;
- }
- set
- {
- DataEventPublisher.BeforeChange(this, "PolderLevelLow");
- polderLevelLow = value;
- DataEventPublisher.AfterChange(this, "PolderLevelLow");
- }
- }
-
- [Unit(UnitType.Length)]
[Label("River level")]
[Description("Water level in river")]
[Format("F3")]
@@ -2767,16 +2254,9 @@
/// Type of the dam project.
// TODO fix hiding parameter (e.g. use field instead of parameter)
// TODO possibly set this when setting a damType and damProjectType for this location
- public void SetDefaultValues(DamType damType, DamProjectType damProjectType)
+ public void SetDefaultValues()
{
- if ((damType == DamType.Regional) && (damProjectType == DamProjectType.Assessment))
- {
- zoneAreaRestSlopeCrestWidth = 1.5;
- }
- else
- {
- zoneAreaRestSlopeCrestWidth = 3.0;
- }
+ zoneAreaRestSlopeCrestWidth = 3.0;
}
///
@@ -2810,9 +2290,7 @@
{
nameValuePairs.Add(LocationParameterNames.PL1LineId, PL1Line.Name);
}
- nameValuePairs.Add(LocationParameterNames.DredgingDepth, DredgingDepth.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.PolderLevel, PolderLevel.ToString(numberFormatInfo));
- nameValuePairs.Add(LocationParameterNames.PolderLevelLow, PolderLevelLow.ToString(numberFormatInfo));
if (HeadPL2.HasValue)
{
nameValuePairs.Add(LocationParameterNames.HeadPL2, HeadPL2.Value.ToString(numberFormatInfo));
@@ -2828,24 +2306,16 @@
nameValuePairs.Add(LocationParameterNames.GrassQuality, GrassQuality.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.Direction, Direction.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.XSoilGeometry2DOrigin, XSoilGeometry2DOrigin.ToString(numberFormatInfo));
- nameValuePairs.Add(LocationParameterNames.DikeMaterialType, DikeMaterialType.ToString());
nameValuePairs.Add(LocationParameterNames.DikeEmbankmentMaterial, DikeEmbankmentMaterial);
nameValuePairs.Add(LocationParameterNames.ShoulderEmbankmentMaterial, ShoulderEmbankmentMaterial);
nameValuePairs.Add(LocationParameterNames.DampingFactorPL3, DampingFactorPL3.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.DampingFactorPL4, DampingFactorPL4.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.PenetrationLength, PenetrationLength.ToString(numberFormatInfo));
- nameValuePairs.Add(LocationParameterNames.BoezemLevelTp, BoezemLevelTp.ToString(numberFormatInfo));
- nameValuePairs.Add(LocationParameterNames.BoezemlevelHbp, BoezemLevelHbp.ToString(numberFormatInfo));
- nameValuePairs.Add(LocationParameterNames.BoezemLevelLbp, BoezemLevelLbp.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.PLLineCreationMethod, PLLineCreationMethod.ToString());
nameValuePairs.Add(LocationParameterNames.PLLineOffsetBelowDikeTopAtRiver, PlLineOffsetBelowDikeTopAtRiver.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.PLLineOffsetBelowDikeTopAtPolder, PlLineOffsetBelowDikeTopAtPolder.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.PLLineOffsetBelowShoulderBaseInside, PlLineOffsetBelowShoulderBaseInside.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.PLLineOffsetBelowDikeToeAtPolder, PlLineOffsetBelowDikeToeAtPolder.ToString(numberFormatInfo));
- nameValuePairs.Add(LocationParameterNames.PLLineOffsetDryBelowDikeTopAtRiver, PLLineOffsetDryBelowDikeTopAtRiver.ToString(numberFormatInfo));
- nameValuePairs.Add(LocationParameterNames.PLLineOffsetDryBelowDikeTopAtPolder, PLLineOffsetDryBelowDikeTopAtPolder.ToString(numberFormatInfo));
- nameValuePairs.Add(LocationParameterNames.PLLineOffsetDryBelowShoulderBaseInside, PLLineOffsetDryBelowShoulderBaseInside.ToString(numberFormatInfo));
- nameValuePairs.Add(LocationParameterNames.PLLineOffsetDryBelowDikeToeAtPolder, PLLineOffsetDryBelowDikeToeAtPolder.ToString(numberFormatInfo));
if (PlLineOffsetBelowDikeCrestMiddle.HasValue)
{
nameValuePairs.Add(LocationParameterNames.PlLineOffsetBelowDikeCrestMiddle,
@@ -2856,16 +2326,6 @@
nameValuePairs.Add(LocationParameterNames.PlLineOffsetFactorBelowShoulderCrest,
PlLineOffsetFactorBelowShoulderCrest.Value.ToString(numberFormatInfo));
}
- if (PlLineOffsetDryBelowDikeCrestMiddle.HasValue)
- {
- nameValuePairs.Add(LocationParameterNames.PlLineOffsetDryBelowDikeCrestMiddle,
- PlLineOffsetDryBelowDikeCrestMiddle.Value.ToString(numberFormatInfo));
- }
- if (PlLineOffsetDryFactorBelowShoulderCrest.HasValue)
- {
- nameValuePairs.Add(LocationParameterNames.PlLineOffsetDryFactorBelowShoulderCrest,
- PlLineOffsetDryFactorBelowShoulderCrest.Value.ToString(numberFormatInfo));
- }
if (UsePlLineOffsetBelowDikeCrestMiddle.HasValue)
{
nameValuePairs.Add(LocationParameterNames.UsePlLineOffsetBelowDikeCrestMiddle,
@@ -2876,16 +2336,6 @@
nameValuePairs.Add(LocationParameterNames.UsePlLineOffsetFactorBelowShoulderCrest,
UsePlLineOffsetFactorBelowShoulderCrest.Value.ToString());
}
- if (UsePlLineOffsetDryBelowDikeCrestMiddle.HasValue)
- {
- nameValuePairs.Add(LocationParameterNames.UsePlLineOffsetDryBelowDikeCrestMiddle,
- UsePlLineOffsetDryBelowDikeCrestMiddle.Value.ToString());
- }
- if (UsePlLineOffsetDryFactorBelowShoulderCrest.HasValue)
- {
- nameValuePairs.Add(LocationParameterNames.UsePlLineOffsetDryFactorBelowShoulderCrest,
- UsePlLineOffsetDryFactorBelowShoulderCrest.Value.ToString());
- }
if (IntrusionVerticalWaterPressure.HasValue)
{
nameValuePairs.Add(LocationParameterNames.IntrusionVerticalWaterPressure,
@@ -2894,11 +2344,6 @@
nameValuePairs.Add(LocationParameterNames.StabilityShoulderGrowSlope, StabilityShoulderGrowSlope.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.StabilityShoulderGrowDeltaX, StabilityShoulderGrowDeltaX.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.StabilitySlopeAdaptionDeltaX, StabilitySlopeAdaptionDeltaX.ToString(numberFormatInfo));
- nameValuePairs.Add(LocationParameterNames.SheetPilePointX, SheetPilePoint.X.ToString(numberFormatInfo));
- nameValuePairs.Add(LocationParameterNames.SheetPilePointY, SheetPilePoint.Y.ToString(numberFormatInfo));
- nameValuePairs.Add(LocationParameterNames.SheetPilePointZ, SheetPilePoint.Z.ToString(numberFormatInfo));
- nameValuePairs.Add(LocationParameterNames.SheetPileLength, SheetPileLength.ToString(numberFormatInfo));
- nameValuePairs.Add(LocationParameterNames.RwBankProtectionBottomLevel, RwBankProtectionBottomLevel.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.IsUseOriginalPLLineAssignments, IsUseOriginalPLLineAssignments.ToString());
nameValuePairs.Add(LocationParameterNames.TrafficLoad, TrafficLoad.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.MinimalCircleDepth, MinimalCircleDepth.ToString(numberFormatInfo));
@@ -2939,7 +2384,6 @@
{
nameValuePairs.Add(LocationParameterNames.UpliftCriterionStability, ModelFactors.UpliftCriterionStability.Value.ToString(numberFormatInfo));
}
- nameValuePairs.Add(LocationParameterNames.DetrimentFactor, DetrimentFactor.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.StabilityZoneType, StabilityZoneType.ToString());
nameValuePairs.Add(LocationParameterNames.ForbiddenZoneFactor, ForbiddenZoneFactor.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.ZoneAreaRestSlopeCrestWidth, ZoneAreaRestSlopeCrestWidth.ToString(numberFormatInfo));
@@ -3193,20 +2637,10 @@
{
SurfaceLineId = parameterValue;
}
- //if (parameterName.Equals(LocationParameterNames.PL1LineId))
- // this.PL1LineId = Convert.ToDouble(parameterValue, numberFormatInfo);
- if (parameterName.Equals(LocationParameterNames.DredgingDepth))
- {
- DredgingDepth = Convert.ToDouble(parameterValue, numberFormatInfo);
- }
if (parameterName.Equals(LocationParameterNames.PolderLevel))
{
PolderLevel = Convert.ToDouble(parameterValue, numberFormatInfo);
}
- if (parameterName.Equals(LocationParameterNames.PolderLevelLow))
- {
- PolderLevelLow = Convert.ToDouble(parameterValue, numberFormatInfo);
- }
if (parameterName.Equals(LocationParameterNames.HeadPL2))
{
HeadPL2 = Convert.ToDouble(parameterValue, numberFormatInfo);
@@ -3231,10 +2665,6 @@
{
XSoilGeometry2DOrigin = Convert.ToDouble(parameterValue, numberFormatInfo);
}
- if (parameterName.Equals(LocationParameterNames.DikeMaterialType))
- {
- DikeMaterialType = (SoilType) Enum.Parse(typeof(SoilType), parameterValue);
- }
if (parameterName.Equals(LocationParameterNames.DikeEmbankmentMaterial))
{
DikeEmbankmentMaterial = parameterValue;
@@ -3255,18 +2685,6 @@
{
PenetrationLength = Convert.ToDouble(parameterValue, numberFormatInfo);
}
- if (parameterName.Equals(LocationParameterNames.BoezemLevelTp))
- {
- BoezemLevelTp = Convert.ToDouble(parameterValue, numberFormatInfo);
- }
- if (parameterName.Equals(LocationParameterNames.BoezemlevelHbp))
- {
- BoezemLevelHbp = Convert.ToDouble(parameterValue, numberFormatInfo);
- }
- if (parameterName.Equals(LocationParameterNames.BoezemLevelLbp))
- {
- BoezemLevelLbp = Convert.ToDouble(parameterValue, numberFormatInfo);
- }
if (parameterName.Equals(LocationParameterNames.PLLineCreationMethod))
{
PLLineCreationMethod = (PLLineCreationMethod) Enum.Parse(typeof(PLLineCreationMethod), parameterValue);
@@ -3287,22 +2705,6 @@
{
PlLineOffsetBelowDikeToeAtPolder = Convert.ToDouble(parameterValue, numberFormatInfo);
}
- if (parameterName.Equals(LocationParameterNames.PLLineOffsetDryBelowDikeTopAtRiver))
- {
- PLLineOffsetDryBelowDikeTopAtRiver = Convert.ToDouble(parameterValue, numberFormatInfo);
- }
- if (parameterName.Equals(LocationParameterNames.PLLineOffsetDryBelowDikeTopAtPolder))
- {
- PLLineOffsetDryBelowDikeTopAtPolder = Convert.ToDouble(parameterValue, numberFormatInfo);
- }
- if (parameterName.Equals(LocationParameterNames.PLLineOffsetDryBelowShoulderBaseInside))
- {
- PLLineOffsetDryBelowShoulderBaseInside = Convert.ToDouble(parameterValue, numberFormatInfo);
- }
- if (parameterName.Equals(LocationParameterNames.PLLineOffsetDryBelowDikeToeAtPolder))
- {
- PLLineOffsetDryBelowDikeToeAtPolder = Convert.ToDouble(parameterValue, numberFormatInfo);
- }
if (parameterName.Equals(LocationParameterNames.PlLineOffsetBelowDikeCrestMiddle))
{
PlLineOffsetBelowDikeCrestMiddle = Convert.ToDouble(parameterValue, numberFormatInfo);
@@ -3311,14 +2713,6 @@
{
PlLineOffsetFactorBelowShoulderCrest = Convert.ToDouble(parameterValue, numberFormatInfo);
}
- if (parameterName.Equals(LocationParameterNames.PlLineOffsetDryBelowDikeCrestMiddle))
- {
- PlLineOffsetDryBelowDikeCrestMiddle = Convert.ToDouble(parameterValue, numberFormatInfo);
- }
- if (parameterName.Equals(LocationParameterNames.PlLineOffsetDryFactorBelowShoulderCrest))
- {
- PlLineOffsetDryFactorBelowShoulderCrest = Convert.ToDouble(parameterValue, numberFormatInfo);
- }
if (parameterName.Equals(LocationParameterNames.UsePlLineOffsetBelowDikeCrestMiddle))
{
UsePlLineOffsetBelowDikeCrestMiddle = Convert.ToBoolean(parameterValue);
@@ -3327,14 +2721,6 @@
{
UsePlLineOffsetFactorBelowShoulderCrest = Convert.ToBoolean(parameterValue);
}
- if (parameterName.Equals(LocationParameterNames.UsePlLineOffsetDryBelowDikeCrestMiddle))
- {
- UsePlLineOffsetDryBelowDikeCrestMiddle = Convert.ToBoolean(parameterValue);
- }
- if (parameterName.Equals(LocationParameterNames.UsePlLineOffsetDryFactorBelowShoulderCrest))
- {
- UsePlLineOffsetDryFactorBelowShoulderCrest = Convert.ToBoolean(parameterValue);
- }
if (parameterName.Equals(LocationParameterNames.IntrusionVerticalWaterPressure))
{
IntrusionVerticalWaterPressure =
@@ -3354,26 +2740,6 @@
{
StabilitySlopeAdaptionDeltaX = Convert.ToDouble(parameterValue, numberFormatInfo);
}
- if (parameterName.Equals(LocationParameterNames.SheetPileLength))
- {
- SheetPileLength = Convert.ToDouble(parameterValue, numberFormatInfo);
- }
- if (parameterName.Equals(LocationParameterNames.RwBankProtectionBottomLevel))
- {
- RwBankProtectionBottomLevel = Convert.ToDouble(parameterValue, numberFormatInfo);
- }
- if (parameterName.Equals(LocationParameterNames.SheetPilePointX))
- {
- SheetPilePointX = Convert.ToDouble(parameterValue, numberFormatInfo);
- }
- if (parameterName.Equals(LocationParameterNames.SheetPilePointY))
- {
- SheetPilePointY = Convert.ToDouble(parameterValue, numberFormatInfo);
- }
- if (parameterName.Equals(LocationParameterNames.SheetPilePointZ))
- {
- SheetPilePointZ = Convert.ToDouble(parameterValue, numberFormatInfo);
- }
if (parameterName.Equals(LocationParameterNames.IsUseOriginalPLLineAssignments))
{
IsUseOriginalPLLineAssignments = Convert.ToBoolean(parameterValue, numberFormatInfo);
@@ -3439,11 +2805,6 @@
{
ModelFactors.UpliftCriterionStability = Convert.ToDouble(parameterValue, numberFormatInfo);
}
-
- if (parameterName.Equals(LocationParameterNames.DetrimentFactor))
- {
- DetrimentFactor = Convert.ToDouble(parameterValue, numberFormatInfo);
- }
if (parameterName.Equals(LocationParameterNames.StabilityZoneType))
{
StabilityZoneType = (MStabZonesType) Enum.Parse(typeof(MStabZonesType), parameterValue);
@@ -3577,32 +2938,12 @@
public bool IsVisible(string property)
{
- bool isPrimaryCalamity = (DamType == DamType.Primary && DamProjectType == DamProjectType.Calamity);
- // bool isPrimaryDesign = (this.DamType == DamType.Primary && Location.DamProjectType == Data.DamProjectType.Design);
- bool isRegionalCalamity = (DamType == DamType.Regional && DamProjectType == DamProjectType.Calamity);
- bool isRegionalAssesment = (DamType == DamType.Regional && DamProjectType == DamProjectType.Assessment);
- bool isRegionalDesign = (DamType == DamType.Regional && DamProjectType == DamProjectType.Design);
var arePlLineCreationExpertKnowledgeParametersNeeded = ArePlLineCreationExpertKnowledgeParametersNeeded();
- bool arePlLineCreationExpertKnowledgeParametersDrySituationNeeded = (PLLineCreationMethod == PLLineCreationMethod.ExpertKnowledgeRRD ||
- PLLineCreationMethod == PLLineCreationMethod.GaugesWithFallbackToExpertKnowledgeRRD) && isRegionalAssesment;
var isDesign = IsDesign();
- bool isRegional = (DamType == DamType.Regional);
-
- // TODO: These string literals below should be replaced with the constants define in LocationParameterNames
+
+ // TODO: These string literals below should be replaced with the constants defined in LocationParameterNames
switch (property)
{
- case "DikeMaterialType":
- return isRegional;
- case "DetrimentFactor":
- return isPrimaryCalamity || isRegionalCalamity || isRegionalDesign || isRegionalAssesment;
-
- case "BoezemLevelTp":
- return isRegionalAssesment; // formerly known as MBP
- case "BoezemLevelHbp":
- return isRegionalAssesment; // formerly known as BP-GWS
- case "BoezemLevelLbp":
- return isRegionalAssesment; // formerly known as BP-GLW
-
case "ShoulderEmbankmentMaterial":
return isDesign;
case "StabilityShoulderGrowSlope":
@@ -3623,55 +2964,31 @@
return !isDesign && arePlLineCreationExpertKnowledgeParametersNeeded;
case "PlLineOffsetBelowShoulderBaseInside":
return !isDesign && arePlLineCreationExpertKnowledgeParametersNeeded;
- case "PLLineOffsetDryBelowDikeToeAtPolder":
- return arePlLineCreationExpertKnowledgeParametersDrySituationNeeded;
- case "PLLineOffsetDryBelowDikeTopAtPolder":
- return arePlLineCreationExpertKnowledgeParametersDrySituationNeeded;
- case "PLLineOffsetDryBelowDikeTopAtRiver":
- return arePlLineCreationExpertKnowledgeParametersDrySituationNeeded;
- case "PLLineOffsetDryBelowShoulderBaseInside":
- return arePlLineCreationExpertKnowledgeParametersDrySituationNeeded;
case "PlLineOffsetBelowDikeCrestMiddle":
return !isDesign && arePlLineCreationExpertKnowledgeParametersNeeded;
case "PlLineOffsetFactorBelowShoulderCrest":
return !isDesign && arePlLineCreationExpertKnowledgeParametersNeeded;
- case "PlLineOffsetDryBelowDikeCrestMiddle":
- return !isDesign && arePlLineCreationExpertKnowledgeParametersNeeded;
- case "PlLineOffsetDryFactorBelowShoulderCrest":
- return !isDesign && arePlLineCreationExpertKnowledgeParametersNeeded;
case "UsePlLineOffsetBelowDikeCrestMiddle":
return !isDesign && arePlLineCreationExpertKnowledgeParametersNeeded;
case "UsePlLineOffsetFactorBelowShoulderCrest":
return !isDesign && arePlLineCreationExpertKnowledgeParametersNeeded;
- case "UsePlLineOffsetDryBelowDikeCrestMiddle":
- return !isDesign && arePlLineCreationExpertKnowledgeParametersNeeded;
- case "UsePlLineOffsetDryFactorBelowShoulderCrest":
- return !isDesign && arePlLineCreationExpertKnowledgeParametersNeeded;
case "IntrusionVerticalWaterPressure": return true;
- case "PolderLevelLow":
- return isRegionalAssesment;
- case "DredgingDepth":
- return isRegionalAssesment;
- case "SheetPileLength":
- return isRegionalAssesment;
- case "RwBankProtectionBottomLevel":
- return isRegionalAssesment;
case "RedesignDikeHeight":
return isDesign;
case "DikeTableHeight":
return false;
case "RedesignDikeShoulder":
return isDesign;
+
+ // these will always be shown
case "StabilityDesignMethod":
- return !isRegionalAssesment;
+ return true;
case "SlopeAdaptionStartCotangent":
- return !isRegionalAssesment;
+ return true;
case "SlopeAdaptionEndCotangent":
- return !isRegionalAssesment;
+ return true;
case "SlopeAdaptionStepCotangent":
- return !isRegionalAssesment;
-
- // these will always be shown
+ return true;
case "Name":
return true;
case "XRd":
@@ -3856,10 +3173,6 @@
{
if (subject is Location)
{
- if (id == "ZoneTypeSafety" && property == "StabilityZoneType")
- {
- modelFactors.RequiredSafetyFactorStabilityInnerSlope = detrimentFactor;
- }
if (id == "AssignMinValue" && property == "NewDikeTopWidth")
{
NewDikeTopWidth = newDikeTopWidthMinValue;
Index: DamClients/DamUI/trunk/src/Dam/Forms/DamProjectCalculationSpecificationPropertyControl.cs
===================================================================
diff -u -r2088 -r2135
--- DamClients/DamUI/trunk/src/Dam/Forms/DamProjectCalculationSpecificationPropertyControl.cs (.../DamProjectCalculationSpecificationPropertyControl.cs) (revision 2088)
+++ DamClients/DamUI/trunk/src/Dam/Forms/DamProjectCalculationSpecificationPropertyControl.cs (.../DamProjectCalculationSpecificationPropertyControl.cs) (revision 2135)
@@ -89,19 +89,16 @@
if (data != null)
{
damProjectData = data;
- if (damProjectData.DamProjectType != DamProjectType.Assessment)
+ damProjectCalculationSpecification = damProjectData.DamProjectCalculationSpecification;
+ BindSupport.Assign(this, damProjectCalculationSpecification);
+ // enable other Stability kernel options (WTI and converted .NET)
+ BindSupport.Assign(stabilityKernelTypeSpecificationsControl1, damProjectData.DamProjectCalculationSpecification);
+ // for now, always set first specification
+ SetSelectedDamCalculationSpecification();
+ if (damProjectData.DamProjectType == DamProjectType.Design)
{
- damProjectCalculationSpecification = damProjectData.DamProjectCalculationSpecification;
- BindSupport.Assign(this, damProjectCalculationSpecification);
- // enable other Stability kernel options (WTI and converted .NET)
- BindSupport.Assign(stabilityKernelTypeSpecificationsControl1, damProjectData.DamProjectCalculationSpecification);
- // for now, always set first specification
- SetSelectedDamCalculationSpecification();
- if (damProjectData.DamProjectType == DamProjectType.Design)
- {
- Grid.ShowToolbar = false;
- }
- }
+ Grid.ShowToolbar = false;
+ }
}
}
}
Fisheye: Tag 2135 refers to a dead (removed) revision in file `DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Exporters/ScenarioExporter.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 2135 refers to a dead (removed) revision in file `DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Exporters/IScenarioExporter.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 2135 refers to a dead (removed) revision in file `DamClients/DamUI/trunk/src/Dam/Tests/Exporters/ScenarioExporterTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 2135 refers to a dead (removed) revision in file `DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/RWScenarios/RWScenariosResult.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 2135 refers to a dead (removed) revision in file `DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/RWScenarios/EvaluationJob.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 2135 refers to a dead (removed) revision in file `DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/RWScenarios/RWResult.cs'.
Fisheye: No comparison available. Pass `N' to diff?