Index: dam clients/DamUI/trunk/src/Dam/Tests/DamEngineIo/ConversionHelperTests.cs
===================================================================
diff -u -r736 -r790
--- dam clients/DamUI/trunk/src/Dam/Tests/DamEngineIo/ConversionHelperTests.cs (.../ConversionHelperTests.cs) (revision 736)
+++ dam clients/DamUI/trunk/src/Dam/Tests/DamEngineIo/ConversionHelperTests.cs (.../ConversionHelperTests.cs) (revision 790)
@@ -370,5 +370,20 @@
Assert.AreEqual(dilatancyType, ConversionHelper.ConvertToDilatancyType(soilDilatancyType));
}
+ [Test]
+ [TestCase(LocationDesignOptionsStabilityDesignMethod.SlopeAdaptionBeforeShoulderAdaption, StabilityDesignMethod.SlopeAdaptionBeforeShoulderAdaption)]
+ [TestCase(LocationDesignOptionsStabilityDesignMethod.OptimizedSlopeAndShoulderAdaption, StabilityDesignMethod.OptimizedSlopeAndShoulderAdaption)]
+ public void CanConvertToInputStabilityDesignMethod(LocationDesignOptionsStabilityDesignMethod inputStabilityDesignMethod, StabilityDesignMethod stabilityDesignMethod)
+ {
+ Assert.AreEqual(stabilityDesignMethod, ConversionHelper.ConvertToDamStabilityDesignMethod(inputStabilityDesignMethod));
+ }
+
+ [Test]
+ [TestCase(StabilityDesignMethod.SlopeAdaptionBeforeShoulderAdaption, LocationDesignOptionsStabilityDesignMethod.SlopeAdaptionBeforeShoulderAdaption)]
+ [TestCase(StabilityDesignMethod.OptimizedSlopeAndShoulderAdaption, LocationDesignOptionsStabilityDesignMethod.OptimizedSlopeAndShoulderAdaption)]
+ public void CanConvertToDamStabilityDesignMethod(StabilityDesignMethod stabilityDesignMethod, LocationDesignOptionsStabilityDesignMethod inputStabilityDesignMethod)
+ {
+ Assert.AreEqual(inputStabilityDesignMethod, ConversionHelper.ConvertToInputStabilityDesignMethod(stabilityDesignMethod));
+ }
}
}
Index: dam clients/DamUI/trunk/src/Dam/Data/DamEngineIo/ConversionHelper.cs
===================================================================
diff -u -r736 -r790
--- dam clients/DamUI/trunk/src/Dam/Data/DamEngineIo/ConversionHelper.cs (.../ConversionHelper.cs) (revision 736)
+++ dam clients/DamUI/trunk/src/Dam/Data/DamEngineIo/ConversionHelper.cs (.../ConversionHelper.cs) (revision 790)
@@ -756,6 +756,36 @@
return translationTable[soilDilatancyType];
}
+ ///
+ /// Converts the input StabilityDesignMethod to the Dam StabilityDesignMethod.
+ ///
+ /// The stability design method.
+ ///
+ public static StabilityDesignMethod ConvertToDamStabilityDesignMethod(LocationDesignOptionsStabilityDesignMethod stabilityDesignMethod)
+ {
+ var translationTable = new Dictionary()
+ {
+ {LocationDesignOptionsStabilityDesignMethod.OptimizedSlopeAndShoulderAdaption, StabilityDesignMethod.OptimizedSlopeAndShoulderAdaption},
+ {LocationDesignOptionsStabilityDesignMethod.SlopeAdaptionBeforeShoulderAdaption, StabilityDesignMethod.SlopeAdaptionBeforeShoulderAdaption}
+ };
+ return translationTable[stabilityDesignMethod];
+ }
+ ///
+ /// Converts the Dam StabilityDesignMethod to the input StabilityDesignMethod.
+ ///
+ /// The stability design method.
+ ///
+ public static LocationDesignOptionsStabilityDesignMethod ConvertToInputStabilityDesignMethod(StabilityDesignMethod stabilityDesignMethod)
+ {
+ var translationTable = new Dictionary()
+ {
+ {StabilityDesignMethod.OptimizedSlopeAndShoulderAdaption, LocationDesignOptionsStabilityDesignMethod.OptimizedSlopeAndShoulderAdaption},
+ {StabilityDesignMethod.SlopeAdaptionBeforeShoulderAdaption, LocationDesignOptionsStabilityDesignMethod.SlopeAdaptionBeforeShoulderAdaption}
+ };
+ return translationTable[stabilityDesignMethod];
+ }
+
+
}
}
Index: dam clients/DamUI/trunk/src/Dam/Data/DamProjectData.cs
===================================================================
diff -u -r743 -r790
--- dam clients/DamUI/trunk/src/Dam/Data/DamProjectData.cs (.../DamProjectData.cs) (revision 743)
+++ dam clients/DamUI/trunk/src/Dam/Data/DamProjectData.cs (.../DamProjectData.cs) (revision 790)
@@ -50,7 +50,7 @@
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 designCalculations = new List();
private List schematizationFactors = null;
private List dataSources = new List();
private string dataSourceEsriProjection = null;
Index: dam clients/DamUI/trunk/src/Dam/Data/DamEngineIo/FillDamUiFromXmlInput.cs
===================================================================
diff -u -r759 -r790
--- dam clients/DamUI/trunk/src/Dam/Data/DamEngineIo/FillDamUiFromXmlInput.cs (.../FillDamUiFromXmlInput.cs) (revision 759)
+++ dam clients/DamUI/trunk/src/Dam/Data/DamEngineIo/FillDamUiFromXmlInput.cs (.../FillDamUiFromXmlInput.cs) (revision 790)
@@ -340,6 +340,31 @@
location.MinimalCircleDepth = inputLocation.StabilityOptions.MinimumCircleDepth;
}
}
+
+ // Design options
+ var designOptions = inputLocation.DesignOptions;
+ location.RedesignDikeHeight = designOptions.RedesignDikeHeight;
+ location.RedesignDikeShoulder = designOptions.RedesignDikeShoulder;
+ location.ShoulderEmbankmentMaterial = designOptions.ShoulderEmbankmentMaterial;
+ location.StabilityShoulderGrowSlope = designOptions.StabilityShoulderGrowSlope;
+ location.StabilityShoulderGrowDeltaX = designOptions.StabilityShoulderGrowDeltaX;
+ location.StabilitySlopeAdaptionDeltaX = designOptions.StabilitySlopeAdaptionDeltaX;
+ location.SlopeAdaptionStartCotangent = designOptions.SlopeAdaptionStartCotangent;
+ location.SlopeAdaptionEndCotangent = designOptions.SlopeAdaptionEndCotangent;
+ location.SlopeAdaptionStepCotangent = designOptions.SlopeAdaptionStepCotangent;
+ if (designOptions.NewDikeTopWidthSpecified) location.NewDikeTopWidth = designOptions.NewDikeTopWidth;
+ if (designOptions.NewDikeSlopeInsideSpecified) location.NewDikeSlopeInside = designOptions.NewDikeSlopeInside;
+ if (designOptions.NewDikeSlopeOutsideSpecified) location.NewDikeSlopeOutside = designOptions.NewDikeSlopeOutside;
+ if (designOptions.NewShoulderTopSlopeSpecified) location.NewShoulderTopSlope = designOptions.NewShoulderTopSlope;
+ if (designOptions.NewShoulderBaseSlopeSpecified) location.NewShoulderBaseSlope = designOptions.NewShoulderBaseSlope;
+ if (designOptions.NewMaxHeightShoulderAsFractionSpecified) location.NewMaxHeightShoulderAsFraction = designOptions.NewMaxHeightShoulderAsFraction;
+ if (designOptions.NewMinDistanceDikeToeStartDitchSpecified) location.NewMinDistanceDikeToeStartDitch = designOptions.NewMinDistanceDikeToeStartDitch;
+ location.UseNewDitchDefinition = designOptions.UseNewDitchDefinition;
+ if (designOptions.NewWidthDitchBottomSpecified) location.NewWidthDitchBottom = designOptions.NewWidthDitchBottom;
+ if (designOptions.NewSlopeAngleDitchSpecified) location.NewSlopeAngleDitch = designOptions.NewSlopeAngleDitch;
+ if (designOptions.NewDepthDitchSpecified) location.NewDepthDitch = designOptions.NewDepthDitch;
+ location.StabilityDesignMethod = ConversionHelper.ConvertToDamStabilityDesignMethod(designOptions.StabilityDesignMethod);
+
dikeLocations.Add(location);
}
}
Index: dam clients/DamUI/trunk/src/Dam/Tests/DamEngineIo/FillXmlInputFromDamUiTests.cs
===================================================================
diff -u -r736 -r790
--- dam clients/DamUI/trunk/src/Dam/Tests/DamEngineIo/FillXmlInputFromDamUiTests.cs (.../FillXmlInputFromDamUiTests.cs) (revision 736)
+++ dam clients/DamUI/trunk/src/Dam/Tests/DamEngineIo/FillXmlInputFromDamUiTests.cs (.../FillXmlInputFromDamUiTests.cs) (revision 790)
@@ -216,7 +216,29 @@
location.ZoneAreaRestSlopeCrestWidth = 8.23;
location.TrafficLoad = 11.11;
location.MinimalCircleDepth = 1.21;
-
+
+ location.RedesignDikeHeight = false;
+ location.RedesignDikeShoulder = false;
+ location.ShoulderEmbankmentMaterial = "ShoulderMat" + (i + 1).ToString(); ;
+ location.StabilityShoulderGrowSlope = 10.0 * i + 0.10;
+ location.StabilityShoulderGrowDeltaX = 10.0 * i + 0.11;
+ location.StabilitySlopeAdaptionDeltaX = 10.0 * i + 0.12;
+ location.SlopeAdaptionStartCotangent = 10.0 * i + 0.13;
+ location.SlopeAdaptionEndCotangent = 10.0 * i + 0.14;
+ location.SlopeAdaptionStepCotangent = 10.0 * i + 0.15;
+ location.NewDikeTopWidth = 10.0 * i + 0.16;
+ location.NewDikeSlopeInside = 10.0 * i + 0.17;
+ location.NewDikeSlopeOutside = 10.0 * i + 0.18;
+ location.NewShoulderTopSlope = 10.0 * i + 0.19;
+ location.NewShoulderBaseSlope = 10.0 * i + 0.20;
+ location.NewMaxHeightShoulderAsFraction = 10.0 * i + 0.21;
+ location.NewMinDistanceDikeToeStartDitch = 10.0 * i + 0.22;
+ location.UseNewDitchDefinition = true;
+ location.NewWidthDitchBottom = 10.0 * i + 0.23;
+ location.NewSlopeAngleDitch = 10.0 * i + 0.24;
+ location.NewDepthDitch = 10.0 * i + 0.25;
+ location.StabilityDesignMethod = StabilityDesignMethod.SlopeAdaptionBeforeShoulderAdaption;
+
dike.Locations.Add(location);
dike.Locations.Add(location);
}
Index: dam clients/DamUI/trunk/src/Dam/Data/DamEngineIo/FillXmlInputFromDamUi.cs
===================================================================
diff -u -r736 -r790
--- dam clients/DamUI/trunk/src/Dam/Data/DamEngineIo/FillXmlInputFromDamUi.cs (.../FillXmlInputFromDamUi.cs) (revision 736)
+++ dam clients/DamUI/trunk/src/Dam/Data/DamEngineIo/FillXmlInputFromDamUi.cs (.../FillXmlInputFromDamUi.cs) (revision 790)
@@ -380,6 +380,43 @@
MinimumCircleDepthSpecified = true,
MinimumCircleDepth = location.MinimalCircleDepth
};
+
+ // Design options
+ var designOptions = new LocationDesignOptions();
+ designOptions.RedesignDikeHeight = location.RedesignDikeHeight;
+ designOptions.RedesignDikeShoulder = location.RedesignDikeShoulder;
+ designOptions.ShoulderEmbankmentMaterial = location.ShoulderEmbankmentMaterial;
+ designOptions.StabilityShoulderGrowSlope = location.StabilityShoulderGrowSlope;
+ designOptions.StabilityShoulderGrowDeltaX = location.StabilityShoulderGrowDeltaX;
+ designOptions.StabilitySlopeAdaptionDeltaX = location.StabilitySlopeAdaptionDeltaX;
+ designOptions.SlopeAdaptionStartCotangent = location.SlopeAdaptionStartCotangent;
+ designOptions.SlopeAdaptionEndCotangent = location.SlopeAdaptionEndCotangent;
+ designOptions.SlopeAdaptionStepCotangent = location.SlopeAdaptionStepCotangent;
+ designOptions.NewDikeTopWidthSpecified = true;
+ designOptions.NewDikeTopWidth = location.NewDikeTopWidth;
+ designOptions.NewDikeSlopeInsideSpecified = true;
+ designOptions.NewDikeSlopeInside = location.NewDikeSlopeInside;
+ designOptions.NewDikeSlopeInsideSpecified = true;
+ designOptions.NewDikeSlopeOutside = location.NewDikeSlopeOutside;
+ designOptions.NewDikeSlopeOutsideSpecified = true;
+ designOptions.NewShoulderTopSlope = location.NewShoulderTopSlope;
+ designOptions.NewShoulderTopSlopeSpecified = true;
+ designOptions.NewShoulderBaseSlope = location.NewShoulderBaseSlope;
+ designOptions.NewShoulderBaseSlopeSpecified = true;
+ designOptions.NewMaxHeightShoulderAsFraction = location.NewMaxHeightShoulderAsFraction;
+ designOptions.NewMaxHeightShoulderAsFractionSpecified = true;
+ designOptions.NewMinDistanceDikeToeStartDitch = location.NewMinDistanceDikeToeStartDitch;
+ designOptions.NewMinDistanceDikeToeStartDitchSpecified = true;
+ designOptions.UseNewDitchDefinition = location.UseNewDitchDefinition;
+ designOptions.NewWidthDitchBottomSpecified = true;
+ designOptions.NewWidthDitchBottom = location.NewWidthDitchBottom;
+ designOptions.NewSlopeAngleDitchSpecified = true;
+ designOptions.NewSlopeAngleDitch = location.NewSlopeAngleDitch;
+ designOptions.NewDepthDitchSpecified = true;
+ designOptions.NewDepthDitch = location.NewDepthDitch;
+ designOptions.StabilityDesignMethod = ConversionHelper.ConvertToInputStabilityDesignMethod(location.StabilityDesignMethod);
+ inputLocation.DesignOptions = designOptions;
+
inputLocations[i] = inputLocation;
}
}