Index: DamEngine/branches/DamEngine 19.3/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/PlLinesHelper.cs
===================================================================
diff -u -r3737 -r4225
--- DamEngine/branches/DamEngine 19.3/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/PlLinesHelper.cs (.../PlLinesHelper.cs) (revision 3737)
+++ DamEngine/branches/DamEngine 19.3/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/PlLinesHelper.cs (.../PlLinesHelper.cs) (revision 4225)
@@ -109,6 +109,10 @@
public static PlLines CreatePlLinesForStabilityExpertKnowledge(Location location, SoilGeometryProbability subSoilScenario,
double waterLevel, double? waterLevelRiverLow, out UpliftSituation upliftSituation)
{
+ if (location.CurrentScenario == null)
+ {
+ location.CurrentScenario = location.Scenarios[0];
+ }
var plLinesCreator = new PlLinesCreator.PlLinesCreator
{
WaterLevelRiverLow = waterLevelRiverLow,
@@ -117,8 +121,8 @@
SurfaceLine = location.SurfaceLine,
WaterLevelPolder = location.PolderLevel,
HeadInPlLine2 = location.HeadPl2,
- HeadInPlLine3 = location.HeadPl3,
- HeadInPlLine4 = location.HeadPl4,
+ HeadInPlLine3 = location.CurrentScenario.HeadPl3,
+ HeadInPlLine4 = location.CurrentScenario.HeadPl4,
ModelParametersForPlLines = location.ModelParametersForPlLines,
SoilProfile = subSoilScenario.SoilProfile1D,
SoilProfileType = subSoilScenario.SoilProfileType,
@@ -160,14 +164,18 @@
public static PlLines CreatePlLinesForPiping(Location location, SoilProfile1D soilProfile, double waterLevel,
out UpliftSituation upliftSituation)
{
+ if (location.CurrentScenario == null)
+ {
+ location.CurrentScenario = location.Scenarios[0];
+ }
var plLinesCreator = new PlLinesCreator.PlLinesCreator
{
WaterLevelRiverHigh = waterLevel,
SurfaceLine = location.SurfaceLine,
WaterLevelPolder = location.PolderLevel,
HeadInPlLine2 = location.HeadPl2,
- HeadInPlLine3 = location.HeadPl3,
- HeadInPlLine4 = location.HeadPl4,
+ HeadInPlLine3 = location.CurrentScenario.HeadPl3,
+ HeadInPlLine4 = location.CurrentScenario.HeadPl4,
ModelParametersForPlLines = location.ModelParametersForPlLines,
SoilProfile = soilProfile,
GaugePlLines = null, // TODO: Operational
Index: DamEngine/branches/DamEngine 19.3/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculator.cs
===================================================================
diff -u -r3737 -r4225
--- DamEngine/branches/DamEngine 19.3/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculator.cs (.../DesignCalculator.cs) (revision 3737)
+++ DamEngine/branches/DamEngine 19.3/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculator.cs (.../DesignCalculator.cs) (revision 4225)
@@ -321,6 +321,7 @@
private void SynchronizeScenarioDataWithLocationData(DesignScenario designScenario, Location location)
{
// Synchronize PlLine parameters
+ location.CurrentScenario = designScenario;
location.PlLineOffsetBelowDikeToeAtPolder = designScenario.PlLineOffsetBelowDikeToeAtPolder;
location.PlLineOffsetBelowDikeTopAtPolder = designScenario.PlLineOffsetBelowDikeTopAtPolder;
location.PlLineOffsetBelowDikeTopAtRiver = designScenario.PlLineOffsetBelowDikeTopAtRiver;
Index: DamEngine/branches/DamEngine 19.3/src/Deltares.DamEngine.Data/General/Location.cs
===================================================================
diff -u -r3737 -r4225
--- DamEngine/branches/DamEngine 19.3/src/Deltares.DamEngine.Data/General/Location.cs (.../Location.cs) (revision 3737)
+++ DamEngine/branches/DamEngine 19.3/src/Deltares.DamEngine.Data/General/Location.cs (.../Location.cs) (revision 4225)
@@ -841,6 +841,14 @@
return scenarios;
}
}
+
+ ///
+ /// Gets and sets the current scenario.
+ ///
+ ///
+ /// The current scenario.
+ ///
+ public DesignScenario CurrentScenario { get; set; }
///
/// Gets or sets the type of the dam project.