Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MacroStabilityInwardsTests.cs =================================================================== diff -u -r5745 -r5767 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MacroStabilityInwardsTests.cs (.../MacroStabilityInwardsTests.cs) (revision 5745) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/MacroStabilityInwardsTests.cs (.../MacroStabilityInwardsTests.cs) (revision 5767) @@ -392,7 +392,6 @@ [Test] [Category(Categories.Slow)] - [Category(Categories.WorkInProgress)] // Xml is created with DAM Tutorial Design.damx // Select 1st location (DWP_1) // Set location scenario, Required safety factor stability inner slope to 1.4 Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/OperationalStabilityProfile1DTests.cs =================================================================== diff -u -r5761 -r5767 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/OperationalStabilityProfile1DTests.cs (.../OperationalStabilityProfile1DTests.cs) (revision 5761) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/OperationalStabilityProfile1DTests.cs (.../OperationalStabilityProfile1DTests.cs) (revision 5767) @@ -43,8 +43,9 @@ [TestCase("CalculateStabilityInsideBishopGrid1")] // This tests if the sensor location data is used in the calculation by changing the source type of Pl1 offset below diketop to // use the specified location data - [TestCase("CalculateStabilityInsideBishopGrid1", true, 22.562, -1.7)] - // TODO The correct value for Z-Value should be -1.2, but now it is -1.7. This is a known issue and will be fixed in the future (MWDAM-2649). + // Expected X-value is location of DikeTopAtPolder = 22.562 + // Expected Z-value is WaterLevelOutside - PlLineOffsetBelowDikeTopAtPolder = -0.2 - 1.0 = -1.2 + [TestCase("CalculateStabilityInsideBishopGrid1", true, 22.562, -1.2)] // Following testcase based on the DamLive test Deltares.DamLive.Tests.StabilityInsideUpliftVanBeeSwarmTest // "Deltares.DamLive.Tests\TestData\IntegrationTests\StabilityInsideUpliftVanBeeSwarm\DAMLive.damx" // with DamLive rev.4860 @@ -87,7 +88,7 @@ if (isUseSensorLocationData) { // Change the source type of Pl1 offset below diketop location data (=1) - inputString = XmlAdapter.ChangeValueInXml(inputString, "SourceTypePl1PlLineOffsetBelowDikeTopAtPolder", "1"); + inputString = XmlAdapter.ChangeValueInXml(inputString, "PlLineOffsetBelowDikeTopAtPolder", "1"); } // When // Run calculation Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Design/DesignScenario.cs =================================================================== diff -u -r5388 -r5767 --- DamEngine/trunk/src/Deltares.DamEngine.Data/Design/DesignScenario.cs (.../DesignScenario.cs) (revision 5388) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/Design/DesignScenario.cs (.../DesignScenario.cs) (revision 5767) @@ -197,31 +197,31 @@ } } - public double PlLineOffsetBelowDikeTopAtRiver { get; set; } + public double PlLineOffsetBelowDikeTopAtRiver { get; set; } = 0.5; /// /// Gets or sets the pl line offset below dike top at polder. /// /// /// The pl line offset below dike top at polder. /// - public double PlLineOffsetBelowDikeTopAtPolder { get; set; } + public double PlLineOffsetBelowDikeTopAtPolder { get; set; } = 1.5; /// /// Gets or sets the pl line offset below shoulder base inside. /// /// /// The pl line offset below shoulder base inside. /// - public double PlLineOffsetBelowShoulderBaseInside { get; set; } + public double PlLineOffsetBelowShoulderBaseInside { get; set; } = 0.1; /// /// Gets or sets the pl line offset below dike toe at polder. /// /// /// The pl line offset below dike toe at polder. /// - public double PlLineOffsetBelowDikeToeAtPolder { get; set; } + public double PlLineOffsetBelowDikeToeAtPolder { get; set; } = 0.1; /// /// Gets or sets the use pl line offset below dike crest middle. Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/IssuesTests.cs =================================================================== diff -u -r5762 -r5767 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/IssuesTests.cs (.../IssuesTests.cs) (revision 5762) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/IssuesTests.cs (.../IssuesTests.cs) (revision 5767) @@ -80,7 +80,7 @@ { Assert.That(errorCount, Is.EqualTo(0), "There should be no errors during the calculation."); Assert.That(engineInterface.DamProjectData.DesignCalculations, Has.Count.EqualTo(1), "There should be one design calculation."); - Assert.That(engineInterface.DamProjectData.DesignCalculations[0].SafetyFactor, Is.EqualTo(safetyFactor).Within(0.001), "The safety factor should be 1.110."); + Assert.That(engineInterface.DamProjectData.DesignCalculations[0].SafetyFactor, Is.EqualTo(safetyFactor).Within(0.001), "The safety factor is incorrect."); }); } } \ No newline at end of file Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/Sensors/SensorLocationTests.cs =================================================================== diff -u -r4627 -r5767 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/Sensors/SensorLocationTests.cs (.../SensorLocationTests.cs) (revision 4627) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/Sensors/SensorLocationTests.cs (.../SensorLocationTests.cs) (revision 5767) @@ -107,7 +107,7 @@ } }; SensorLocation sensorLocation = CreateValidSensorLocation(); - location.PlLineOffsetBelowDikeToeAtPolder = testValue; + location.CurrentScenario.PlLineOffsetBelowDikeToeAtPolder = testValue; sensorLocation.SourceTypePl1PlLineOffsetBelowDikeToeAtPolder = DataSourceTypeSensors.LocationData; @@ -177,7 +177,7 @@ } }; SensorLocation sensorLocation = CreateValidSensorLocation(); - location.PlLineOffsetBelowDikeTopAtPolder = testValue; + location.CurrentScenario.PlLineOffsetBelowDikeTopAtPolder = testValue; sensorLocation.SourceTypePl1PlLineOffsetBelowDikeTopAtPolder = DataSourceTypeSensors.LocationData; @@ -247,7 +247,7 @@ } }; SensorLocation sensorLocation = CreateValidSensorLocation(); - location.PlLineOffsetBelowDikeTopAtRiver = testValue; + location.CurrentScenario.PlLineOffsetBelowDikeTopAtRiver = testValue; sensorLocation.SourceTypePl1PlLineOffsetBelowDikeTopAtRiver = DataSourceTypeSensors.LocationData; @@ -317,7 +317,7 @@ } }; SensorLocation sensorLocation = CreateValidSensorLocation(); - location.PlLineOffsetBelowShoulderBaseInside = testValue; + location.CurrentScenario.PlLineOffsetBelowShoulderBaseInside = testValue; sensorLocation.SourceTypePl1PlLineOffsetBelowShoulderBaseInside = DataSourceTypeSensors.LocationData; Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/PlLinesHelper.cs =================================================================== diff -u -r5404 -r5767 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/PlLinesHelper.cs (.../PlLinesHelper.cs) (revision 5404) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/PlLinesHelper.cs (.../PlLinesHelper.cs) (revision 5767) @@ -172,8 +172,8 @@ GaugePlLines = null, // TODO: Operational Gauges = null, // TODO: Operational IsAdjustPL3AndPL4SoNoUpliftWillOccurEnabled = false, // for piping this must be set to false - PlLineOffsetBelowDikeTopAtRiver = location.PlLineOffsetBelowDikeTopAtRiver, - PlLineOffsetBelowDikeTopAtPolder = location.PlLineOffsetBelowDikeTopAtPolder, + PlLineOffsetBelowDikeTopAtRiver = location.CurrentScenario.PlLineOffsetBelowDikeTopAtRiver, + PlLineOffsetBelowDikeTopAtPolder = location.CurrentScenario.PlLineOffsetBelowDikeTopAtPolder, DikeEmbankmentMaterial = location.GetDikeEmbankmentSoil(), XSoilGeometry2DOrigin = location.XSoilGeometry2DOrigin }; Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculator.cs =================================================================== diff -u -r5535 -r5767 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculator.cs (.../DesignCalculator.cs) (revision 5535) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculator.cs (.../DesignCalculator.cs) (revision 5767) @@ -381,31 +381,7 @@ location.CurrentScenario = designScenario.CloneInput(); location.CurrentScenario.LocationName = location.Name; location.Scenarios.Clear(); - location.PlLineOffsetBelowDikeToeAtPolder = designScenario.PlLineOffsetBelowDikeToeAtPolder; - location.PlLineOffsetBelowDikeTopAtPolder = designScenario.PlLineOffsetBelowDikeTopAtPolder; - location.PlLineOffsetBelowDikeTopAtRiver = designScenario.PlLineOffsetBelowDikeTopAtRiver; - location.PlLineOffsetBelowShoulderBaseInside = designScenario.PlLineOffsetBelowShoulderBaseInside; - location.RiverLevel = designScenario.RiverLevel; - if (designScenario.PlLineOffsetBelowDikeCrestMiddle.HasValue) - { - location.PlLineOffsetBelowDikeCrestMiddle = designScenario.PlLineOffsetBelowDikeCrestMiddle; - } - if (designScenario.PlLineOffsetFactorBelowShoulderCrest.HasValue) - { - location.PlLineOffsetFactorBelowShoulderCrest = designScenario.PlLineOffsetFactorBelowShoulderCrest; - } - - if (designScenario.UsePlLineOffsetBelowDikeCrestMiddle.HasValue) - { - location.UsePlLineOffsetBelowDikeCrestMiddle = designScenario.UsePlLineOffsetBelowDikeCrestMiddle; - } - - if (designScenario.UsePlLineOffsetFactorBelowShoulderCrest.HasValue) - { - location.UsePlLineOffsetFactorBelowShoulderCrest = designScenario.UsePlLineOffsetFactorBelowShoulderCrest; - } - // Synchronize piping design parameters location.UpliftCriterionPiping = designScenario.UpliftCriterionPiping; location.ModelFactors.RequiredSafetyFactorPiping = designScenario.RequiredSafetyFactorPiping; Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/Sensors/SensorPLLineCreatorTest.cs =================================================================== diff -u -r5745 -r5767 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/Sensors/SensorPLLineCreatorTest.cs (.../SensorPLLineCreatorTest.cs) (revision 5745) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/Sensors/SensorPLLineCreatorTest.cs (.../SensorPLLineCreatorTest.cs) (revision 5767) @@ -1289,6 +1289,7 @@ PolderLevel = polderLevel }; location.Scenarios.Add(scenario); + location.CurrentScenario = scenario; return location; } Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/Operational/Profile1DTests/CalculateStabilityInsideBishopGrid1_UseLocationDataOutputFile.xml =================================================================== diff -u -r5653 -r5767 Binary files differ Index: DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/GeneralHelper.cs =================================================================== diff -u -r5758 -r5767 --- DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/GeneralHelper.cs (.../GeneralHelper.cs) (revision 5758) +++ DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/GeneralHelper.cs (.../GeneralHelper.cs) (revision 5767) @@ -52,19 +52,19 @@ return errorCount; } - public static Output RunAfterInputValidation(string inputString, bool areResultsExpected = true, string outputXml = "") + public static Output RunAfterInputValidation(string inputString, bool areResultsExpected = true, string outputFilename = "") { var engineInterface = new EngineInterface(inputString); - return RunAfterInputValidation(engineInterface, areResultsExpected, outputXml); + return RunAfterInputValidation(engineInterface, areResultsExpected, outputFilename); } - public static Output RunAfterInputValidation(EngineInterface engineInterface, bool areResultsExpected = true, string outputXml = "") + public static Output RunAfterInputValidation(EngineInterface engineInterface, bool areResultsExpected = true, string outputFilename = "") { // Validate input Assert.That(engineInterface.DamProjectData, Is.Not.Null); string validationMessages = engineInterface.Validate(); var extraValidationMessage = ""; - if (outputXml != "") + if (outputFilename != "") { extraValidationMessage = ", see output xml in debugger"; } @@ -75,9 +75,9 @@ string outputString = engineInterface.Run(); Assert.That(outputString, Is.Not.Null); Output output = DamXmlSerialization.LoadOutputFromXmlString(outputString); - if (outputXml != "") + if (outputFilename != "") { - File.WriteAllText(outputXml, outputString, Encoding.Unicode); + File.WriteAllText(outputFilename, outputString, Encoding.Unicode); } // Evaluate results Index: DamEngine/trunk/src/Deltares.DamEngine.Data/General/Location.cs =================================================================== diff -u -r5627 -r5767 --- DamEngine/trunk/src/Deltares.DamEngine.Data/General/Location.cs (.../Location.cs) (revision 5627) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/General/Location.cs (.../Location.cs) (revision 5767) @@ -612,70 +612,6 @@ public DikeSoilScenario DikeSoilScenario { get; set; } /// - /// Gets or sets the pl line offset below dike top at river. - /// - /// - /// The pl line offset below dike top at river. - /// - public virtual double PlLineOffsetBelowDikeTopAtRiver { get; set; } = 0.5; - - /// - /// Gets or sets the pl line offset below dike top at polder. - /// - /// - /// The pl line offset below dike top at polder. - /// - public virtual double PlLineOffsetBelowDikeTopAtPolder { get; set; } = 1.5; - - /// - /// Gets or sets the pl line offset below shoulder base inside. - /// - /// - /// The pl line offset below shoulder base inside. - /// - public virtual double PlLineOffsetBelowShoulderBaseInside { get; set; } = 0.1; - - /// - /// Gets or sets the pl line offset below dike toe at polder. - /// - /// - /// The pl line offset below dike toe at polder. - /// - public virtual double PlLineOffsetBelowDikeToeAtPolder { get; set; } = 0.1; - - /// - /// Gets or sets the use pl line offset below dike crest middle. - /// - /// - /// The use pl line offset below dike crest middle. - /// - public bool? UsePlLineOffsetBelowDikeCrestMiddle { get; set; } - - /// - /// Gets or sets the pl line offset below dike crest middle. - /// - /// - /// The pl line offset below dike crest middle. - /// - public double? PlLineOffsetBelowDikeCrestMiddle { get; set; } - - /// - /// Gets or sets the use pl line offset factor below shoulder crest. - /// - /// - /// The use pl line offset factor below shoulder crest. - /// - public bool? UsePlLineOffsetFactorBelowShoulderCrest { get; set; } - - /// - /// Gets or sets the pl line offset factor below shoulder crest. - /// - /// - /// The pl line offset factor below shoulder crest. - /// - public double? PlLineOffsetFactorBelowShoulderCrest { get; set; } - - /// /// Gets or sets the intrusion vertical water pressure. /// /// Index: DamEngine/trunk/src/Deltares.DamEngine.Data/General/Sensors/SensorLocation.cs =================================================================== diff -u -r4540 -r5767 --- DamEngine/trunk/src/Deltares.DamEngine.Data/General/Sensors/SensorLocation.cs (.../SensorLocation.cs) (revision 4540) +++ DamEngine/trunk/src/Deltares.DamEngine.Data/General/Sensors/SensorLocation.cs (.../SensorLocation.cs) (revision 5767) @@ -53,7 +53,7 @@ { get { - return Location.PlLineOffsetBelowDikeTopAtRiver; + return Location.CurrentScenario.PlLineOffsetBelowDikeTopAtRiver; } } @@ -64,7 +64,7 @@ { get { - return Location.PlLineOffsetBelowDikeTopAtPolder; + return Location.CurrentScenario.PlLineOffsetBelowDikeTopAtPolder; } } @@ -75,7 +75,7 @@ { get { - return Location.PlLineOffsetBelowDikeToeAtPolder; + return Location.CurrentScenario.PlLineOffsetBelowDikeToeAtPolder; } } @@ -86,7 +86,7 @@ { get { - return Location.PlLineOffsetBelowShoulderBaseInside; + return Location.CurrentScenario.PlLineOffsetBelowShoulderBaseInside; } } @@ -410,31 +410,31 @@ { if (SourceTypePl1PlLineOffsetBelowDikeToeAtPolder == DataSourceTypeSensors.LocationData) { - return Location.PlLineOffsetBelowDikeToeAtPolder; + return Location.CurrentScenario.PlLineOffsetBelowDikeToeAtPolder; } } if (memberName == MemberNames.OffsetBelowDikeTopAtPolder) { if (SourceTypePl1PlLineOffsetBelowDikeTopAtPolder == DataSourceTypeSensors.LocationData) { - return Location.PlLineOffsetBelowDikeTopAtPolder; + return Location.CurrentScenario.PlLineOffsetBelowDikeTopAtPolder; } } if (memberName == MemberNames.OffsetBelowDikeTopAtRiver) { if (SourceTypePl1PlLineOffsetBelowDikeTopAtRiver == DataSourceTypeSensors.LocationData) { - return Location.PlLineOffsetBelowDikeTopAtRiver; + return Location.CurrentScenario.PlLineOffsetBelowDikeTopAtRiver; } } if (memberName == MemberNames.OffsetBelowShoulderBaseInside) { if (SourceTypePl1PlLineOffsetBelowShoulderBaseInside == DataSourceTypeSensors.LocationData) { - return Location.PlLineOffsetBelowShoulderBaseInside; + return Location.CurrentScenario.PlLineOffsetBelowShoulderBaseInside; } }