Index: dam engine/trunk/src/Deltares.DamEngine.Data/General/MStabParameters.cs =================================================================== diff -u -r835 -r838 --- dam engine/trunk/src/Deltares.DamEngine.Data/General/MStabParameters.cs (.../MStabParameters.cs) (revision 835) +++ dam engine/trunk/src/Deltares.DamEngine.Data/General/MStabParameters.cs (.../MStabParameters.cs) (revision 838) @@ -442,14 +442,12 @@ public class MStabCalculationOptions : IAssignable, ICloneable { public double MinimalCircleDepth { get; set; } - public double RequiredSafetyFactor { get; set; } public MStabZonesType ZonesType { get; set; } public void Assign(MStabCalculationOptions mstabCalculationOptions) { this.MinimalCircleDepth = mstabCalculationOptions.MinimalCircleDepth; - this.RequiredSafetyFactor = mstabCalculationOptions.RequiredSafetyFactor; this.ZonesType = mstabCalculationOptions.ZonesType; } Index: dam engine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs =================================================================== diff -u -r837 -r838 --- dam engine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs (.../DamMacroStabilityInwardsKernelWrapper.cs) (revision 837) +++ dam engine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs (.../DamMacroStabilityInwardsKernelWrapper.cs) (revision 838) @@ -22,7 +22,6 @@ using System; using System.Collections.Generic; using System.Data; -using System.IO; using System.Xml.Linq; using Deltares.DamEngine.Calculators.KernelWrappers.Common; using Deltares.DamEngine.Calculators.KernelWrappers.DamMacroStabilityCommon; @@ -237,12 +236,15 @@ var riverLevel = scenario.RiverLevel; var surfaceLine = scenario.Location.SurfaceLine; var trafficLoad = scenario.Location.StabilityOptions.TrafficLoad; - var requiredSafetyFactor = - FailureMechanismeParamatersMStab.MStabParameters.CalculationOptions.RequiredSafetyFactor; + var requiredSafetyFactor = scenario.RequiredSafetyFactorStabilityInnerSlope?? scenario.Location.ModelFactors.RequiredSafetyFactorStabilityInnerSlope; + if (requiredSafetyFactor == null) + { + throw new MacroStabilityException("Required safety factor must be specified"); + } List errorMessages; XDocument mstabXml = MStabXmlDoc.CreateMStabXmlDoc(stabilityProjectFilename, scenario, subSoilScenario, - riverLevel, null, surfaceLine, trafficLoad, requiredSafetyFactor, + riverLevel, null, surfaceLine, trafficLoad, requiredSafetyFactor.Value, kernelDataInput.FailureMechanismeParamatersMStab, out errorMessages); mstabXml.Save(stabilityProjectFilename + ".xml"); Index: dam engine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapperTests.cs =================================================================== diff -u -r834 -r838 --- dam engine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapperTests.cs (.../DamMacroStabilityInwardsKernelWrapperTests.cs) (revision 834) +++ dam engine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapperTests.cs (.../DamMacroStabilityInwardsKernelWrapperTests.cs) (revision 838) @@ -70,6 +70,7 @@ scenario.Location.StabilityOptions = new StabilityOptions(); scenario.Location.StabilityOptions.TrafficLoad = 10.0; scenario.Location.StabilityOptions.MapForSoilGeometries2D = TestFolder; + scenario.ModelFactors.RequiredSafetyFactorStabilityInnerSlope = 1.1; var subSoilScenario = new SoilGeometryProbability(); subSoilScenario.StiFileName = soilGeometry2DName; @@ -80,7 +81,6 @@ failureMechanismeParamatersMStab.MStabParameters.GridPosition = MStabGridPosition.Right; failureMechanismeParamatersMStab.MStabParameters.SearchMethod = MStabSearchMethod.GeneticAlgorithm; failureMechanismeParamatersMStab.MStabParameters.CalculationOptions.MinimalCircleDepth = 1.0; - failureMechanismeParamatersMStab.MStabParameters.CalculationOptions.RequiredSafetyFactor = 1.1; failureMechanismeParamatersMStab.DGeoStabilityExePath = exeName; failureMechanismeParamatersMStab.ProjectWorkingPath = workingDir; Index: dam engine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamMacroStabilityCommon/MStabXmlDocTests.cs =================================================================== diff -u -r830 -r838 --- dam engine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamMacroStabilityCommon/MStabXmlDocTests.cs (.../MStabXmlDocTests.cs) (revision 830) +++ dam engine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamMacroStabilityCommon/MStabXmlDocTests.cs (.../MStabXmlDocTests.cs) (revision 838) @@ -26,9 +26,7 @@ using System.Xml.Linq; using Deltares.DamEngine.Calculators.KernelWrappers.DamMacroStabilityCommon; using Deltares.DamEngine.Calculators.KernelWrappers.DamMacroStabilityCommon.Assemblers; -using Deltares.DamEngine.Data.Design; using Deltares.DamEngine.Data.General; -using Deltares.DamEngine.Data.Geotechnics; using Deltares.DamEngine.Data.Standard.Logging; using Deltares.DamEngine.TestHelpers; using NUnit.Framework; Index: dam engine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityCommon/MStabXmlDoc.cs =================================================================== diff -u -r826 -r838 --- dam engine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityCommon/MStabXmlDoc.cs (.../MStabXmlDoc.cs) (revision 826) +++ dam engine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityCommon/MStabXmlDoc.cs (.../MStabXmlDoc.cs) (revision 838) @@ -145,8 +145,8 @@ failureMechanismeParamatersMStab.MStabParameters.ZoneAreas = new MStabZoneAreas { DikeTableHeight = dikeTableHeight.Value, - SafetyFactorZone1A = scenario.ModelFactors.RequiredSafetyFactorStabilityInnerSlope ?? requiredSafetyFactor, - SafetyFactorZone1B = scenario.ModelFactors.RequiredSafetyFactorStabilityInnerSlope ?? requiredSafetyFactor, + SafetyFactorZone1A = requiredSafetyFactor, + SafetyFactorZone1B = requiredSafetyFactor, XCoordinateDikeTopAtPolder = dikeTopAtPolder.X, XCoordinateDikeTopAtRiver = surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtRiver).X, XCoordinateStartRestProfile = surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtRiver).X Index: dam engine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityOutwards/DamMacroStabilityOutwardsKernelWrapper.cs =================================================================== diff -u -r830 -r838 --- dam engine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityOutwards/DamMacroStabilityOutwardsKernelWrapper.cs (.../DamMacroStabilityOutwardsKernelWrapper.cs) (revision 830) +++ dam engine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityOutwards/DamMacroStabilityOutwardsKernelWrapper.cs (.../DamMacroStabilityOutwardsKernelWrapper.cs) (revision 838) @@ -176,28 +176,19 @@ internal XDocument CreateMstabDamXmlDocument(DamKernelInput damKernelInput, DamMacroStabilityInput kernelDataInput) { - const string testFolder = @"..\..\Deltares.DamEngine.Calculators.Tests\Files\MacroStability"; - // var stabilityProjectFilename = Path.Combine(testFolder, "test.sti"); - // var soilDbName = - var stabilityProjectFilename = kernelDataInput.DGeoStabilityInputFileName; var scenario = damKernelInput.DesignScenario; var subSoilScenario = damKernelInput.SubSoilScenario; var riverLevel = scenario.RiverLevel; var surfaceLine = scenario.Location.SurfaceLine; var trafficLoad = scenario.Location.StabilityOptions.TrafficLoad; - var requiredSafetyFactor = scenario.RequiredSafetyFactorStabilityOuterSlope; + var requiredSafetyFactor = scenario.RequiredSafetyFactorStabilityOuterSlope?? scenario.Location.ModelFactors.RequiredSafetyFactorStabilityOuterSlope; if (requiredSafetyFactor == null) { throw new MacroStabilityException("Required safety factor must be specified"); } List errorMessages; - // ToDo zant - scenario.Location.StabilityOptions.MapForSoilGeometries2D = testFolder; - scenario.Location.SoildatabaseName = Path.Combine(testFolder, "DAM Tutorial Design0.soilmaterials.mdb"); - scenario.Location.DikeEmbankmentMaterial = "dijksmateriaal_klei"; - XDocument mstabXml = MStabXmlDoc.CreateMStabXmlDoc(stabilityProjectFilename, scenario, subSoilScenario, riverLevel, null, surfaceLine, trafficLoad, requiredSafetyFactor.Value, kernelDataInput.FailureMechanismeParamatersMStab, out errorMessages);