Index: dam engine/trunk/src/Deltares.DamEngine.Interface/FillXmlInputFromDam.cs =================================================================== diff -u -r540 -r545 --- dam engine/trunk/src/Deltares.DamEngine.Interface/FillXmlInputFromDam.cs (.../FillXmlInputFromDam.cs) (revision 540) +++ dam engine/trunk/src/Deltares.DamEngine.Interface/FillXmlInputFromDam.cs (.../FillXmlInputFromDam.cs) (revision 545) @@ -104,9 +104,11 @@ for (int i = 0; i < locationCount; i++) { var location = dikeLocations[i]; + var inputLocation = new Io.XmlInput.Location(); - var waternetOptions = new LocationWaternetOptions(); inputLocation.SurfaceLineName = location.SurfaceLine2.Name; + + var waternetOptions = new LocationWaternetOptions(); waternetOptions.PhreaticLineCreationMethod = ConversionHelper.ConvertToInputPhreaticLineCreationMethod(location.ModelParametersForPLLines.PLLineCreationMethod); waternetOptions.IntrusionVerticalWaterPressure = ConversionHelper.ConvertToInputIntrusionVerticalWaterPressure(location.IntrusionVerticalWaterPressure ?? IntrusionVerticalWaterPressureType.Standard); waternetOptions.PolderLevel = location.PolderLevel; @@ -133,6 +135,47 @@ waternetOptions.Pl1BelowShoulderCrestPolderside = location.PlLineOffsetBelowShoulderBaseInside; waternetOptions.Pl1BelowToeDikePolderside = location.PlLineOffsetBelowDikeToeAtPolder; inputLocation.WaternetOptions = waternetOptions; + + inputLocation.DesignScenarios = new LocationDesignScenario[location.Scenarios.Count]; + for (int j = 0; j < location.Scenarios.Count; j++) + { + var designScenario = location.Scenarios[j]; + var inputDesignScenario = new LocationDesignScenario(); + inputDesignScenario.RiverLevel = designScenario.RiverLevel; + + inputDesignScenario.RiverLevelLowSpecified = designScenario.RiverLevelLow.HasValue; + inputDesignScenario.RiverLevelLow = designScenario.RiverLevelLow ?? 0.0; + inputDesignScenario.DikeTableHeightSpecified = designScenario.DikeTableHeight.HasValue; + inputDesignScenario.DikeTableHeight = designScenario.DikeTableHeight ?? 0.0; + inputDesignScenario.PlLineOffsetBelowDikeTopAtRiverSpecified = designScenario.PlLineOffsetBelowDikeTopAtRiver.HasValue; + inputDesignScenario.PlLineOffsetBelowDikeTopAtRiver = designScenario.PlLineOffsetBelowDikeTopAtRiver ?? 0.0; + inputDesignScenario.PlLineOffsetBelowDikeTopAtPolderSpecified = designScenario.PlLineOffsetBelowDikeTopAtPolder.HasValue; + inputDesignScenario.PlLineOffsetBelowDikeTopAtPolder = designScenario.PlLineOffsetBelowDikeTopAtPolder ?? 0.0; + inputDesignScenario.PlLineOffsetBelowShoulderBaseInsideSpecified = designScenario.PlLineOffsetBelowShoulderBaseInside.HasValue; + inputDesignScenario.PlLineOffsetBelowShoulderBaseInside = designScenario.PlLineOffsetBelowShoulderBaseInside ?? 0.0; + inputDesignScenario.PlLineOffsetBelowDikeToeAtPolderSpecified = designScenario.PlLineOffsetBelowDikeToeAtPolder.HasValue; + inputDesignScenario.PlLineOffsetBelowDikeToeAtPolder = designScenario.PlLineOffsetBelowDikeToeAtPolder ?? 0.0; + inputDesignScenario.PlLineOffsetBelowDikeCrestMiddleSpecified = designScenario.UsePlLineOffsetBelowDikeCrestMiddle.Value; + inputDesignScenario.PlLineOffsetBelowDikeCrestMiddle = designScenario.PlLineOffsetBelowDikeCrestMiddle.Value; + inputDesignScenario.PlLineOffsetFactorBelowShoulderCrestSpecified = designScenario.UsePlLineOffsetFactorBelowShoulderCrest.Value; + inputDesignScenario.PlLineOffsetFactorBelowShoulderCrest = designScenario.PlLineOffsetFactorBelowShoulderCrest.Value; + inputDesignScenario.HeadPl3Specified = designScenario.HeadPl3.HasValue; + inputDesignScenario.HeadPl3 = designScenario.HeadPl3 ?? 0.0; + inputDesignScenario.HeadPl4Specified = designScenario.HeadPl4.HasValue; + inputDesignScenario.HeadPl4 = designScenario.HeadPl4 ?? 0.0; + inputDesignScenario.UpliftCriterionStabilitySpecified = designScenario.UpliftCriterionStability.HasValue; + inputDesignScenario.UpliftCriterionStability = designScenario.UpliftCriterionStability ?? 0.0; + inputDesignScenario.UpliftCriterionPipingSpecified = designScenario.UpliftCriterionPiping.HasValue; + inputDesignScenario.UpliftCriterionPiping = designScenario.UpliftCriterionPiping ?? 0.0; + inputDesignScenario.RequiredSafetyFactorStabilityInnerSlopeSpecified = designScenario.RequiredSafetyFactorStabilityInnerSlope.HasValue; + inputDesignScenario.RequiredSafetyFactorStabilityInnerSlope = designScenario.RequiredSafetyFactorStabilityInnerSlope ?? 0.0; + inputDesignScenario.RequiredSafetyFactorStabilityOuterSlopeSpecified = designScenario.RequiredSafetyFactorStabilityOuterSlope.HasValue; + inputDesignScenario.RequiredSafetyFactorStabilityOuterSlope = designScenario.RequiredSafetyFactorStabilityOuterSlope ?? 0.0; + inputDesignScenario.RequiredSafetyFactorPipingSpecified = designScenario.RequiredSafetyFactorPiping.HasValue; + inputDesignScenario.RequiredSafetyFactorPiping = designScenario.RequiredSafetyFactorPiping ?? 0.0; + + inputLocation.DesignScenarios[j] = inputDesignScenario; + } inputLocations[i] = inputLocation; } }