Index: DamEngine/trunk/src/Deltares.DamEngine.Data/General/Sensors/SensorLocation.cs
===================================================================
diff -u -r1619 -r1649
--- DamEngine/trunk/src/Deltares.DamEngine.Data/General/Sensors/SensorLocation.cs (.../SensorLocation.cs) (revision 1619)
+++ DamEngine/trunk/src/Deltares.DamEngine.Data/General/Sensors/SensorLocation.cs (.../SensorLocation.cs) (revision 1649)
@@ -20,7 +20,6 @@
// All rights reserved.
using System;
-using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
@@ -352,6 +351,18 @@
}
///
+ /// Holds a reference to a dictionary of output date time entries
+ /// The keys represent the time step and the value part of the dictionary represents
+ /// the argument for the calculation
+ ///
+ /// TimeStep -> Location -> (Sensor, Value)
+ ///
+ /// Cardinality:
+ /// 1 -> N -> M
+ ///
+ public IDictionary>> SensorValues { get; set; }
+
+ ///
/// Gets the PiezometricHead type sensors sorted by relative location along profile.
///
/// Type of the pl line.
Index: DamEngine/trunk/src/Deltares.DamEngine.Data/Deltares.DamEngine.Data.csproj
===================================================================
diff -u -r1616 -r1649
--- DamEngine/trunk/src/Deltares.DamEngine.Data/Deltares.DamEngine.Data.csproj (.../Deltares.DamEngine.Data.csproj) (revision 1616)
+++ DamEngine/trunk/src/Deltares.DamEngine.Data/Deltares.DamEngine.Data.csproj (.../Deltares.DamEngine.Data.csproj) (revision 1649)
@@ -77,6 +77,7 @@
+
Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs
===================================================================
diff -u -r1390 -r1649
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs (.../DamMacroStabilityInwardsKernelWrapper.cs) (revision 1390)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs (.../DamMacroStabilityInwardsKernelWrapper.cs) (revision 1649)
@@ -335,6 +335,7 @@
requiredSafetyFactor.Value,
kernelDataInput.FailureMechanismParametersMStab,
damKernelInput.DamFailureMechanismeCalculationSpecification.AssessmentScenarioJobSettings,
+ damKernelInput.TimeStepDateTime,
out errorMessages);
mstabXml.Save(stabilityProjectFilename + ".xml");
@@ -606,6 +607,7 @@
location.ModelFactors.RequiredSafetyFactorStabilityInnerSlope.Value,
damMacroStabilityInput.FailureMechanismParametersMStab,
damKernelInput.DamFailureMechanismeCalculationSpecification.AssessmentScenarioJobSettings,
+ damKernelInput.TimeStepDateTime,
out errorMessages);
mstabXML.Save(mstabProjectFilename + ".xml");
Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesOperational/OperationalCalculator.cs
===================================================================
diff -u -r1648 -r1649
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesOperational/OperationalCalculator.cs (.../OperationalCalculator.cs) (revision 1648)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesOperational/OperationalCalculator.cs (.../OperationalCalculator.cs) (revision 1649)
@@ -57,6 +57,7 @@
{
}
}
+
///
/// Holds a reference to a dictionary of output date time entries
/// The keys represent the time step and the value part of the dictionary represents
@@ -98,6 +99,8 @@
var locations = damProjectData.Dike.Locations.GetBySpecification(new LocationsWithSensorData());
foreach (var location in locations)
{
+ location.ModelParametersForPlLines.PlLineCreationMethod = PlLineCreationMethod.Sensors;
+
PrepareSensorDataLookup(location);
InitializeOutputSeries(location);
locationCount++;
@@ -174,6 +177,7 @@
damKernelInput.CalculationDir = Path.Combine(projectPath, calculationMap);
damKernelInput.Location = location;
damKernelInput.SubSoilScenario = soiProfileProbability;
+ damKernelInput.TimeStepDateTime = timeSerieEntry.DateTime;
damKernelInput.DamFailureMechanismeCalculationSpecification = damFailureMechanismeCalculationSpecification;
damKernelInput.RiverLevelHigh = Double.NaN;
damKernelInput.RiverLevelLow = null;
@@ -390,6 +394,7 @@
}
hasFirstSeriesEntries = true;
}
+ location.SensorLocation.SensorValues = values;
}
///
Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamMacroStabilityCommon/MStabXmlDocTests.cs
===================================================================
diff -u -r1464 -r1649
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamMacroStabilityCommon/MStabXmlDocTests.cs (.../MStabXmlDocTests.cs) (revision 1464)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators.Tests/KernelWrappers/DamMacroStabilityCommon/MStabXmlDocTests.cs (.../MStabXmlDocTests.cs) (revision 1649)
@@ -19,6 +19,7 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
+using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
@@ -86,6 +87,7 @@
null, requiredSafetyFactor,
failureMechanismParametersMStab,
new RegionalAssessmentScenarioJobSettings(),
+ DateTime.Now,
out errorMessages);
mstabXml.Save(xmlFileName);
Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityHorizontalBalance/DamMacroStabilityHorizontalBalanceKernelWrapper.cs
===================================================================
diff -u -r1329 -r1649
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityHorizontalBalance/DamMacroStabilityHorizontalBalanceKernelWrapper.cs (.../DamMacroStabilityHorizontalBalanceKernelWrapper.cs) (revision 1329)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityHorizontalBalance/DamMacroStabilityHorizontalBalanceKernelWrapper.cs (.../DamMacroStabilityHorizontalBalanceKernelWrapper.cs) (revision 1649)
@@ -272,6 +272,7 @@
null, requiredSafetyFactor,
kernelDataInput.FailureMechanismParametersMStab,
damKernelInput.DamFailureMechanismeCalculationSpecification.AssessmentScenarioJobSettings,
+ damKernelInput.TimeStepDateTime,
out errorMessages);
mstabXml.Save(stabilityProjectFilename + ".xml");
Index: DamEngine/trunk/src/Deltares.DamEngine.Data/General/DamFailureMechanismeCalculationSpecification.cs
===================================================================
diff -u -r1575 -r1649
--- DamEngine/trunk/src/Deltares.DamEngine.Data/General/DamFailureMechanismeCalculationSpecification.cs (.../DamFailureMechanismeCalculationSpecification.cs) (revision 1575)
+++ DamEngine/trunk/src/Deltares.DamEngine.Data/General/DamFailureMechanismeCalculationSpecification.cs (.../DamFailureMechanismeCalculationSpecification.cs) (revision 1649)
@@ -20,6 +20,7 @@
// All rights reserved.
using System;
+using Deltares.DamEngine.Data.General.Sensors;
using Deltares.DamEngine.Data.Standard.Validation;
namespace Deltares.DamEngine.Data.General
@@ -36,7 +37,10 @@
private static DamProjectType damProjectType;
private StabilityKernelType stabilityKernelType = StabilityKernelType.DamClassic;
private RegionalAssessmentScenarioJobSettings regionalAssessmentScenarioJobSettings;
-
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
public DamFailureMechanismeCalculationSpecification()
{
//Todo interface
@@ -45,16 +49,26 @@
CalculationModel = failureMechanismParametersMStab.MStabParameters.Model;
FailureMechanismParametersMStab.MStabParameters.GridPosition = MStabGridPosition.Right;
regionalAssessmentScenarioJobSettings = new RegionalAssessmentScenarioJobSettings();
- ReadUserSettingsSlipCircleDefinition();
}
- [Validate]
+ ///
+ /// Gets or sets the failure mechanism parameters MStab.
+ ///
+ ///
+ /// The failure mechanism parameters for MStab.
+ ///
public FailureMechanismParametersMStab FailureMechanismParametersMStab
{
get { return failureMechanismParametersMStab; }
set { failureMechanismParametersMStab = value; }
}
+ ///
+ /// Gets or sets the type of the failure mechanism system.
+ ///
+ ///
+ /// The type of the failure mechanism system.
+ ///
public FailureMechanismSystemType FailureMechanismSystemType
{
get { return failureMechanismSystemType; }
@@ -87,7 +101,13 @@
}
}
-
+
+ ///
+ /// Gets or sets the type of the piping model.
+ ///
+ ///
+ /// The type of the piping model.
+ ///
public PipingModelType PipingModelType
{
get { return pipingModelType; }
@@ -101,6 +121,12 @@
}
}
+ ///
+ /// Gets or sets the type of the dam project.
+ ///
+ ///
+ /// The type of the dam project.
+ ///
public static DamProjectType DamProjectType
{
get { return damProjectType; }
@@ -129,6 +155,12 @@
}
}
+ ///
+ /// Gets or sets the type of the stability model.
+ ///
+ ///
+ /// The type of the stability model.
+ ///
public MStabModelType StabilityModelType
{
get { return failureMechanismParametersMStab.MStabParameters.Model; }
@@ -142,6 +174,12 @@
}
}
+ ///
+ /// Gets or sets the type of the stability kernel.
+ ///
+ ///
+ /// The type of the stability kernel.
+ ///
public StabilityKernelType StabilityKernelType
{
get { return stabilityKernelType; }
@@ -166,13 +204,21 @@
}
}
+ ///
+ /// Assigns the specified dam failure mechanisme calculation.
+ ///
+ /// The dam failure mechanisme calculation.
public void Assign(DamFailureMechanismeCalculationSpecification damFailureMechanismeCalculation)
{
this.FailureMechanismSystemType = damFailureMechanismeCalculation.failureMechanismSystemType;
this.FailureMechanismParametersMStab.Assign(damFailureMechanismeCalculation.FailureMechanismParametersMStab.Clone());
//assign interface
}
+ ///
+ /// Clones this instance.
+ ///
+ ///
public DamFailureMechanismeCalculationSpecification Clone()
{
DamFailureMechanismeCalculationSpecification damFailureMechanismeCalculation = new DamFailureMechanismeCalculationSpecification();
@@ -182,6 +228,12 @@
return damFailureMechanismeCalculation;
}
+ ///
+ /// Returns a that represents this instance.
+ ///
+ ///
+ /// A that represents this instance.
+ ///
public override string ToString()
{
string description = "";
@@ -213,32 +265,5 @@
return isSlipCircleDefinitionUndefined;
}
- ///
- /// Reads the user settings.
- ///
- public void ReadUserSettingsSlipCircleDefinition()
- {
-// if (failureMechanismParametersMStab.MStabParameters.SlipCircleDefinition == null)
-// {
-// failureMechanismParametersMStab.MStabParameters.SlipCircleDefinition = new SlipCircleDefinition();
-// }
-// failureMechanismParametersMStab.MStabParameters.SlipCircleDefinition.UpliftVanTangentLinesDefinition = Properties.Settings.Default.SlipCircleUpliftVanTangentLinesDefinition;
-// failureMechanismParametersMStab.MStabParameters.SlipCircleDefinition.UpliftVanTangentLinesDistance = Properties.Settings.Default.SlipCircleUpliftVanTangentLinesDistance;
-// failureMechanismParametersMStab.MStabParameters.SlipCircleDefinition.BishopTangentLinesDefinition = Properties.Settings.Default.SlipCircleBishopTangentLinesDefinition;
-// failureMechanismParametersMStab.MStabParameters.SlipCircleDefinition.BishopTangentLinesDistance = Properties.Settings.Default.SlipCircleBishopTangentLinesDistance;
-// failureMechanismParametersMStab.MStabParameters.SlipCircleDefinition.GridSizeDetermination = Properties.Settings.Default.SlipCircleGridSizeDetermination;
-// failureMechanismParametersMStab.MStabParameters.SlipCircleDefinition.UpliftVanLeftGridVerticalPointCount = Properties.Settings.Default.SlipCircleUpliftVanLeftGridVerticalPointCount;
-// failureMechanismParametersMStab.MStabParameters.SlipCircleDefinition.UpliftVanLeftGridVerticalPointDistance = Properties.Settings.Default.SlipCircleUpliftVanLeftGridVerticalPointDistance;
-// failureMechanismParametersMStab.MStabParameters.SlipCircleDefinition.UpliftVanLeftGridHorizontalPointCount = Properties.Settings.Default.SlipCircleUpliftVanLeftGridHorizontalPointCount;
-// failureMechanismParametersMStab.MStabParameters.SlipCircleDefinition.UpliftVanLeftGridHorizontalPointDistance = Properties.Settings.Default.SlipCircleUpliftVanLeftGridHorizontalPointDistance;
-// failureMechanismParametersMStab.MStabParameters.SlipCircleDefinition.UpliftVanRightGridVerticalPointCount = Properties.Settings.Default.SlipCircleUpliftVanRightGridVerticalPointCount;
-// failureMechanismParametersMStab.MStabParameters.SlipCircleDefinition.UpliftVanRightGridVerticalPointDistance = Properties.Settings.Default.SlipCircleUpliftVanRightGridVerticalPointDistance;
-// failureMechanismParametersMStab.MStabParameters.SlipCircleDefinition.UpliftVanRightGridHorizontalPointCount = Properties.Settings.Default.SlipCircleUpliftVanRightGridHorizontalPointCount;
-// failureMechanismParametersMStab.MStabParameters.SlipCircleDefinition.UpliftVanRightGridHorizontalPointDistance = Properties.Settings.Default.SlipCircleUpliftVanRightGridHorizontalPointDistance;
-// failureMechanismParametersMStab.MStabParameters.SlipCircleDefinition.BishopGridVerticalPointCount = Properties.Settings.Default.SlipCircleBishopGridVerticalPointCount;
-// failureMechanismParametersMStab.MStabParameters.SlipCircleDefinition.BishopGridVerticalPointDistance = Properties.Settings.Default.SlipCircleBishopGridVerticalPointDistance;
-// failureMechanismParametersMStab.MStabParameters.SlipCircleDefinition.BishopGridHorizontalPointCount = Properties.Settings.Default.SlipCircleBishopGridHorizontalPointCount;
-// failureMechanismParametersMStab.MStabParameters.SlipCircleDefinition.BishopGridHorizontalPointDistance = Properties.Settings.Default.SlipCircleBishopGridHorizontalPointDistance;
- }
}
}
Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityCommon/MStabXmlDoc.cs
===================================================================
diff -u -r1486 -r1649
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityCommon/MStabXmlDoc.cs (.../MStabXmlDoc.cs) (revision 1486)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityCommon/MStabXmlDoc.cs (.../MStabXmlDoc.cs) (revision 1649)
@@ -27,6 +27,7 @@
using Deltares.DamEngine.Calculators.KernelWrappers.DamMacroStabilityCommon.Assemblers;
using Deltares.DamEngine.Calculators.Properties;
using Deltares.DamEngine.Data.General;
+using Deltares.DamEngine.Data.General.Sensors;
using Deltares.DamEngine.Data.Geotechnics;
using Deltares.DamEngine.Data.Standard.Logging;
@@ -77,6 +78,7 @@
EmbankmentDesignParameters embankmentDesignParameters,
double requiredSafetyFactor, FailureMechanismParametersMStab inputFailureMechanismParametersMStab,
RegionalAssessmentScenarioJobSettings regionalAssessmentScenarioJobSettings,
+ DateTime timeStepDateTime,
out List errorMessages)
{
@@ -202,8 +204,12 @@
var waterLevel = riverLevelHigh;
UpliftSituation upliftSituation;
+ SensorPlLineCreatorSettings sensorPlLineCreatorSettings = new SensorPlLineCreatorSettings();
+ sensorPlLineCreatorSettings.SensorLocation = location.SensorLocation;
+ sensorPlLineCreatorSettings.DateTime = timeStepDateTime;
failureMechanismParametersMStab.PlLines = PlLinesHelper.CreatePlLinesForStability(
- location, subSoilScenario, waterLevel, soilGeometry2DName, riverLevelLow, regionalAssessmentScenarioJobSettings, out upliftSituation);
+ location, subSoilScenario, waterLevel, soilGeometry2DName, riverLevelLow,
+ regionalAssessmentScenarioJobSettings, sensorPlLineCreatorSettings, out upliftSituation);
// Slip circle definition for Uplift Van;
if (failureMechanismParametersMStab.MStabParameters.Model == MStabModelType.UpliftVan)
Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityOutwards/DamMacroStabilityOutwardsKernelWrapper.cs
===================================================================
diff -u -r1329 -r1649
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityOutwards/DamMacroStabilityOutwardsKernelWrapper.cs (.../DamMacroStabilityOutwardsKernelWrapper.cs) (revision 1329)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityOutwards/DamMacroStabilityOutwardsKernelWrapper.cs (.../DamMacroStabilityOutwardsKernelWrapper.cs) (revision 1649)
@@ -208,6 +208,7 @@
null, requiredSafetyFactor.Value,
kernelDataInput.FailureMechanismParametersMStab,
damKernelInput.DamFailureMechanismeCalculationSpecification.AssessmentScenarioJobSettings,
+ damKernelInput.TimeStepDateTime,
out errorMessages);
mstabXml.Save(stabilityProjectFilename + ".xml");
return mstabXml;
Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/DamKernelInput.cs
===================================================================
diff -u -r1137 -r1649
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/DamKernelInput.cs (.../DamKernelInput.cs) (revision 1137)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/DamKernelInput.cs (.../DamKernelInput.cs) (revision 1649)
@@ -19,6 +19,7 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
+using System;
using Deltares.DamEngine.Data.Design;
using Deltares.DamEngine.Data.General;
@@ -69,6 +70,14 @@
public SoilGeometryProbability SubSoilScenario { get; set; }
///
+ /// Gets or sets the date time (for operational calculation)
+ ///
+ ///
+ /// The date time.
+ ///
+ public DateTime TimeStepDateTime { get; set; }
+
+ ///
/// The high river level
///
public double RiverLevelHigh;
Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/UpliftHelper.cs
===================================================================
diff -u -r1212 -r1649
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/UpliftHelper.cs (.../UpliftHelper.cs) (revision 1212)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/UpliftHelper.cs (.../UpliftHelper.cs) (revision 1649)
@@ -22,6 +22,7 @@
using Deltares.DamEngine.Calculators.Uplift;
using Deltares.DamEngine.Data.General;
using Deltares.DamEngine.Data.General.PlLines;
+using Deltares.DamEngine.Data.General.Sensors;
using Deltares.DamEngine.Data.Geotechnics;
namespace Deltares.DamEngine.Calculators.KernelWrappers.Common
@@ -43,8 +44,12 @@
}
var soilGeometry2DName = damKernelInput.SubSoilScenario.FullStiFileName;
UpliftSituation upliftSituation;
+ SensorPlLineCreatorSettings sensorPlLineCreatorSettings = new SensorPlLineCreatorSettings();
+ sensorPlLineCreatorSettings.SensorLocation = location.SensorLocation;
var plLines = PlLinesHelper.CreatePlLinesForStability(location, damKernelInput.SubSoilScenario, riverLevel,
- soilGeometry2DName, riverLevelLow, damKernelInput.DamFailureMechanismeCalculationSpecification.AssessmentScenarioJobSettings,
+ soilGeometry2DName, riverLevelLow,
+ damKernelInput.DamFailureMechanismeCalculationSpecification.AssessmentScenarioJobSettings,
+ sensorPlLineCreatorSettings,
out upliftSituation);
if (plLines != null)
{
Index: DamEngine/trunk/src/Deltares.DamEngine.Data/General/Sensors/SensorPlLineCreatorSettings.cs
===================================================================
diff -u
--- DamEngine/trunk/src/Deltares.DamEngine.Data/General/Sensors/SensorPlLineCreatorSettings.cs (revision 0)
+++ DamEngine/trunk/src/Deltares.DamEngine.Data/General/Sensors/SensorPlLineCreatorSettings.cs (revision 1649)
@@ -0,0 +1,32 @@
+// Copyright (C) Stichting Deltares 2018. All rights reserved.
+//
+// This file is part of the Dam Engine.
+//
+// The Dam Engine is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using System.Collections.Generic;
+
+namespace Deltares.DamEngine.Data.General.Sensors
+{
+ public class SensorPlLineCreatorSettings
+ {
+ public SensorLocation SensorLocation;
+ public DateTime DateTime { get; set; }
+ }
+}
Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/PlLinesHelper.cs
===================================================================
diff -u -r1285 -r1649
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/PlLinesHelper.cs (.../PlLinesHelper.cs) (revision 1285)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Common/PlLinesHelper.cs (.../PlLinesHelper.cs) (revision 1649)
@@ -19,9 +19,12 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
+using System;
+using System.Linq;
using Deltares.DamEngine.Calculators.PlLinesCreator;
using Deltares.DamEngine.Data.General;
using Deltares.DamEngine.Data.General.PlLines;
+using Deltares.DamEngine.Data.General.Sensors;
using Deltares.DamEngine.Data.Geotechnics;
namespace Deltares.DamEngine.Calculators.KernelWrappers.Common
@@ -35,15 +38,81 @@
/// Creates the pl lines.
///
/// The location.
- ///
+ /// The sub soil scenario.
/// The water level.
- ///
- ///
- ///
+ /// Name of the soil geometry2 d.
+ /// The water level river low.
+ /// The regional assessment scenario job settings.
+ /// The sensor pl line creator settings.
/// The uplift situation.
+ /// The created Pl-lines
+ public static PlLines CreatePlLinesForStability(Location location, SoilGeometryProbability subSoilScenario,
+ double waterLevel, string soilGeometry2DName, double? waterLevelRiverLow,
+ RegionalAssessmentScenarioJobSettings regionalAssessmentScenarioJobSettings,
+ SensorPlLineCreatorSettings sensorPlLineCreatorSettings,
+ out UpliftSituation upliftSituation)
+ {
+ PlLines plLines = null;
+ upliftSituation = new UpliftSituation();
+ switch (location.ModelParametersForPlLines.PlLineCreationMethod)
+ {
+ case PlLineCreationMethod.ExpertKnowledgeLinearInDike:
+ case PlLineCreationMethod.ExpertKnowledgeRRD:
+ plLines = CreatePlLinesForStabilityExpertKnowledge(location, subSoilScenario,
+ waterLevel, soilGeometry2DName, waterLevelRiverLow,
+ regionalAssessmentScenarioJobSettings, out upliftSituation);
+ break;
+ case PlLineCreationMethod.Sensors:
+ plLines = CreatePlLinesForStabilitySensors(location, subSoilScenario, sensorPlLineCreatorSettings);
+ break;
+ default:
+ throw new NotImplementedException(string.Format(@"Pl-line creation method '{0}' is not implemented",
+ location.ModelParametersForPlLines.PlLineCreationMethod));
+ }
+ return plLines;
+ }
+
+ ///
+ /// Creates the pl lines for stability sensors.
+ ///
+ /// The location.
+ /// The sub soil scenario.
+ /// The sensor pl-line creator settings.
///
- public static PlLines CreatePlLinesForStability(Location location, SoilGeometryProbability subSoilScenario,
- double waterLevel, string soilGeometry2DName, double? waterLevelRiverLow, RegionalAssessmentScenarioJobSettings regionalAssessmentScenarioJobSettings,
+ public static PlLines CreatePlLinesForStabilitySensors(Location location, SoilGeometryProbability subSoilScenario,
+ SensorPlLineCreatorSettings sensorPlLineCreatorSettings)
+ {
+ PlLines plLines = null;
+
+ var actualSensorValues = location.SensorLocation.SensorValues[sensorPlLineCreatorSettings.DateTime][location];
+ var lineTypes = sensorPlLineCreatorSettings.SensorLocation.Sensors.SelectMany(s => s.PlLineMappings).Distinct().ToList();
+ var creator = SensorPlLineCreator.CreateInstance(sensorPlLineCreatorSettings.SensorLocation,
+ actualSensorValues, lineTypes);
+ try
+ {
+ plLines = creator.CreateAllPlLines();
+ }
+ catch (InvalidOperationException e)
+ {
+ throw new SensorPlLineCreatorException(e.Message, e);
+ }
+ return plLines;
+ }
+
+ ///
+ /// Creates the pl lines.
+ ///
+ /// The location.
+ /// The sub soil scenario.
+ /// The water level.
+ /// Name of the soil geometry2 d.
+ /// The water level river low.
+ /// The regional assessment scenario job settings.
+ /// The uplift situation.
+ /// The created Pl-lines
+ public static PlLines CreatePlLinesForStabilityExpertKnowledge(Location location, SoilGeometryProbability subSoilScenario,
+ double waterLevel, string soilGeometry2DName, double? waterLevelRiverLow,
+ RegionalAssessmentScenarioJobSettings regionalAssessmentScenarioJobSettings,
out UpliftSituation upliftSituation)
{
var plLinesCreator = new PlLinesCreator.PlLinesCreator
@@ -75,7 +144,7 @@
IsUseOvenDryUnitWeight = (regionalAssessmentScenarioJobSettings.DikeDrySensitivity == DikeDrySensitivity.Dry),
SoilList = location.SoilList
};
- if ((regionalAssessmentScenarioJobSettings.DikeDrySensitivity == DikeDrySensitivity.Dry) &&
+ if ((regionalAssessmentScenarioJobSettings.DikeDrySensitivity == DikeDrySensitivity.Dry) &&
(regionalAssessmentScenarioJobSettings.LoadSituation == LoadSituation.Dry))
{
// For dry situation other offsets have to be used as in normal situation