// Copyright (C) Stichting Deltares 2017. 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;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.Xml.Serialization;
using Deltares.DamEngine.Data.Design;
using Deltares.DamEngine.Data.General.Gauges;
using Deltares.DamEngine.Data.General.PlLines;
using Deltares.DamEngine.Data.General.Sensors;
using Deltares.DamEngine.Data.Geometry;
using Deltares.DamEngine.Data.Geotechnics;
using Deltares.DamEngine.Data.Probabilistic;
using Deltares.DamEngine.Data.Standard.Language;
using Deltares.DamEngine.Data.Standard.Validation;
namespace Deltares.DamEngine.Data.General
{
internal static class LocationParameterNames
{
public const string DamType = "DamType";
public const string DikeRingId = "DikeRingId";
public const string Description = "Description";
public const string XRd = "XRd";
public const string YRd = "YRd";
public const string SegmentId = "SegmentId";
public const string SurfaceLineId = "SurfaceLineId";
public const string PL1LineId = "PL1LineId";
public const string DredgingDepth = "DredgingDepth";
public const string PolderLevel = "PolderLevel";
public const string PolderLevelLow = "PolderLevelLow";
public const string HeadPL2 = "HeadPL2";
public const string HeadPL3 = "HeadPL3";
public const string HeadPL4 = "HeadPL4";
public const string GrassQuality = "GrassQuality";
public const string Direction = "Direction";
public const string XSoilGeometry2DOrigin = "XSoilGeometry2DOrigin";
public const string DikeMaterialType = "DikeMaterialType";
public const string DikeEmbankmentMaterial = "DikeEmbankmentMaterial";
public const string ShoulderEmbankmentMaterial = "ShoulderEmbankmentMaterial";
public const string DampingFactorPL3 = "DampingFactorPL3";
public const string DampingFactorPL4 = "DampingFactorPL4";
public const string SheetPilePointX = "SheetPilePointX";
public const string SheetPilePointY = "SheetPilePointY";
public const string SheetPilePointZ = "SheetPilePointZ";
public const string SheetPileLength = "SheetPileLength";
public const string RwBankProtectionBottomLevel = "RwBankProtectionBottomLevel";
public const string IsUseOriginalPLLineAssignments = "IsUseOriginalPLLineAssignments";
public const string PenetrationLength = "PenetrationLength";
public const string TrafficLoad = "TrafficLoad";
public const string PLLineCreationMethod = "PLLineCreationMethod";
public const string PLLineOffsetBelowDikeTopAtRiver = "PLLineOffsetBelowDikeTopAtRiver";
public const string PLLineOffsetBelowDikeTopAtPolder = "PLLineOffsetBelowDikeTopAtPolder";
public const string PLLineOffsetBelowShoulderBaseInside = "PLLineOffsetBelowShoulderBaseInside";
public const string PLLineOffsetBelowDikeToeAtPolder = "PLLineOffsetBelowDikeToeAtPolder";
public const string PLLineOffsetDryBelowDikeTopAtRiver = "PLLineOffsetDryBelowDikeTopAtRiver";
public const string PLLineOffsetDryBelowDikeTopAtPolder = "PLLineOffsetDryBelowDikeTopAtPolder";
public const string PLLineOffsetDryBelowShoulderBaseInside = "PLLineOffsetDryBelowShoulderBaseInside";
public const string PLLineOffsetDryBelowDikeToeAtPolder = "PLLineOffsetDryBelowDikeToeAtPolder";
public const string PlLineOffsetBelowDikeCrestMiddle = "PlLineOffsetBelowDikeCrestMiddle";
public const string PlLineOffsetFactorBelowShoulderCrest = "PlLineOffsetFactorBelowShoulderCrest";
public const string PlLineOffsetDryBelowDikeCrestMiddle = "PlLineOffsetDryBelowDikeCrestMiddle";
public const string PlLineOffsetDryFactorBelowShoulderCrest = "PlLineOffsetDryFactorBelowShoulderCrest";
public const string UsePlLineOffsetBelowDikeCrestMiddle = "UsePlLineOffsetBelowDikeCrestMiddle";
public const string UsePlLineOffsetFactorBelowShoulderCrest = "UsePlLineOffsetFactorBelowShoulderCrest";
public const string UsePlLineOffsetDryBelowDikeCrestMiddle = "UsePlLineOffsetDryBelowDikeCrestMiddle";
public const string UsePlLineOffsetDryFactorBelowShoulderCrest = "UsePlLineOffsetDryFactorBelowShoulderCrest";
public const string StabilityShoulderGrowSlope = "StabilityShoulderGrowSlope";
public const string StabilityShoulderGrowDeltaX = "StabilityShoulderGrowDeltaX";
public const string StabilitySlopeAdaptionDeltaX = "StabilitySlopeAdaptionDeltaX";
public const string BoezemLevelTp = "BoezemLevelTp";
public const string BoezemlevelHbp = "BoezemLevelHbp";
public const string BoezemLevelLbp = "BoezemLevelLbp";
public const string MinimalCircleDepth = "MinimalCircleDepth";
public const string LevelReductionInside = "LevelReductionInside";
public const string LevelReductionOutside = "LevelReductionOutside";
public const string LayerHeightDistribution = "LayerHeightDistribution";
public const string LayerHeightDeviation = "LayerHeightDeviation";
public const string DistanceToEntryPoint = "DistanceToEntryPoint";
public const string RequiredSafetyFactorStabilityInnerSlope = "RequiredSafetyFactorStabilityInnerSlope";
public const string RequiredSafetyFactorStabilityOuterSlope = "RequiredSafetyFactorStabilityOuterSlope";
public const string RequiredSafetyFactorPiping = "RequiredSafetyFactorPiping";
public const string RequiredProbabilityOfFailureStabilityInnerslope = "RequiredProbabilityOfFailureStabilityInnerslope";
public const string RequiredProbabilityOfFailureStabilityOuterslope = "RequiredProbabilityOfFailureStabilityOuterslope";
public const string RequiredProbabilityOfFailurePiping = "RequiredProbabilityOfFailurePiping";
public const string UpliftCriterionPiping = "UpliftCriterionPiping";
public const string UpliftCriterionStability = "UpliftCriterionStability";
public const string DetrimentFactor = "DetrimentFactor";
public const string StabilityZoneType = "StabilityZoneType";
public const string ForbiddenZoneFactor = "ForbiddenZoneFactor";
public const string ZoneAreaRestSlopeCrestWidth = "ZoneAreaRestSlopeCrestWidth";
public const string DikeTableHeight = "DikeTableHeight";
public const string StabilityDesignMethod = "StabilityDesignMethod";
public const string SlopeAdaptionStartCotangent = "SlopeAdaptionStartCotangent";
public const string SlopeAdaptionEndCotangent = "SlopeAdaptionEndCotangent";
public const string SlopeAdaptionStepCotangent = "SlopeAdaptionStepCotangent";
public const string SlopeDampingPiezometricHeightPolderSide = "SlopeDampingPiezometricHeightPolderSide";
public const string NewDepthDitch = "NewDepthDitch";
public const string NewDikeSlopeInside = "NewDikeSlopeInside";
public const string NewDikeSlopeOutside = "NewDikeSlopeOutside";
public const string NewDikeTopWidth = "NewDikeTopWidth";
public const string NewMaxHeightShoulderAsFraction = "NewMaxHeightShoulderAsFraction";
public const string NewMinDistanceDikeToeStartDitch = "NewMinDistanceDikeToeStartDitch";
public const string NewShoulderBaseSlope = "NewShoulderBaseSlope";
public const string NewShoulderTopSlope = "NewShoulderTopSlope";
public const string NewSlopeAngleDitch = "NewSlopeAngleDitch";
public const string NewWidthDitchBottom = "NewWidthDitchBottom";
public const string UseNewDikeSlopeInside = "UseNewDikeSlopeInside";
public const string UseNewDikeSlopeOutside = "UseNewDikeSlopeOutside";
public const string UseNewDikeTopWidth = "UseNewDikeTopWidth";
public const string UseNewDitchDefinition = "UseNewDitchDefinition";
public const string UseNewMaxHeightShoulderAsFraction = "UseNewMaxHeightShoulderAsFraction";
public const string UseNewMinDistanceDikeToeStartDitch = "UseNewMinDistanceDikeToeStartDitch";
public const string UseNewShoulderBaseSlope = "UseNewShoulderBaseSlope";
public const string UseNewShoulderTopSlope = "UseNewShoulderTopSlope";
public const string IntrusionVerticalWaterPressure = "IntrusionVerticalWaterPressure";
}
public class Location
{
// Added initial value as these properties must be tested for real values on import
public const string AllCategory = "MainItems";
public const string DikeCategory = "Dike";
public const string WaterCategory = "Water levels";
public const string DesignCategory = "Design";
private const double BoezemLevelNotSetValue = -987654321.0;
private const double newDikeTopWidthMinValue = 0.1;
private const double newDikeSlopeInsideMinValue = 0.01;
private const double newDikeSlopeOutsideMinValue = 0.01;
private const double penetrationLenghtMinValue = 0.00;
private static DamProjectType damProjectType = DamProjectType.Calamity;
private readonly List scenarios = new List();
private bool areLocalXZObjectsCreated = false;
private double boezemLevelHbp = BoezemLevelNotSetValue;
private double boezemLevelLbp = BoezemLevelNotSetValue;
private double boezemLevelTp = BoezemLevelNotSetValue;
// ATTENTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//
// When adding properties below do not forget to add these properties to SetParameterFromNameValuePair and GetParametersAsNameValuePairs
//
// ATTENTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
private DamType damType = DamType.Primary;
private double dampingFactorPL3 = 0;
private double dampingFactorPL4 = 0;
private string description = "";
private double detrimentFactor = 0.95;
private string dikeEmbankmentMaterial = "";
private SoilType dikeMaterialType = SoilType.Clay;
private string dikeRingId = "";
private double dikeTableHeight = 0.0;
private double direction = 0;
private double distanceToEntryPoint = 0;
private double dredgingDepth = 0;
private double forbiddenZoneFactor = 1.0;
private IList gaugePLLines = new List();
private IList gauges = new List();
private double grassQuality = 0;
private double? headPL2 = null;
private double? headPL3 = null;
private double? headPL4 = null;
private bool isUseOriginalPLLineAssignments = false;
private double layerHeightDeviation = 0;
private DistributionType layerHeightDistribution = 0;
// Start of parameters that are also defined in modelparameters
private double levelReductionInside = 0;
private double levelReductionOutside = 0;
private PL1Line localXZPL1Line;
private GeometryPoint localXZSheetPilePoint;
private SurfaceLine2 localXzSurfaceLine;
private string mapForSoilGeometries2D = "";
private double minimalCircleDepth = 0;
private ModelFactors modelFactors = new ModelFactors();
private string name = "";
private double newDepthDitch = 1.0;
private double newDikeSlopeInside = 1.0/3.0; // as tangent
private double newDikeSlopeOutside = 1.0/3.0; // as tangent
private double newDikeTopWidth = 5.0;
private double newMaxHeightShoulderAsFraction = 2.0/3.0; // as tangent
private double newMinDistanceDikeToeStartDitch = 5.0;
private double newShoulderBaseSlope = 1.0/3.0; // as tangent
private double newShoulderTopSlope = 1.0/20.0; // as tangent
private double newSlopeAngleDitch = 1.0/0.5; // as tangent
private double newWidthDitchBottom = 1.0;
private PL1Line pL1Line;
private PLLineCreationMethod pLLineCreationMethod = PLLineCreationMethod.ExpertKnowledgeRRD;
private double pLLineOffsetBelowDikeToeAtPolder = 0.1;
private double pLLineOffsetBelowDikeTopAtPolder = 1.5;
private double pLLineOffsetBelowDikeTopAtRiver = 0.5;
private double pLLineOffsetBelowShoulderBaseInside = 0.1;
private double pLLineOffsetDryBelowDikeToeAtPolder = 0.1;
private double pLLineOffsetDryBelowDikeTopAtPolder = 1.5;
private double pLLineOffsetDryBelowDikeTopAtRiver = 0.5;
private double pLLineOffsetDryBelowShoulderBaseInside = 0.1;
private double penetrationLength = 0;
private double polderLevel = 0;
private double polderLevelLow = 0;
private bool redesignDikeHeight = true;
private bool redesignDikeShoulder = true;
private double rwBankProtectionBottomLevel = 0;
private double scenarioRiverLevel = 0;
private Segment segment;
private SensorLocation sensorData;
private double sheetPileLength = 0;
private GeometryPoint sheetPilePoint = new GeometryPoint();
private string shoulderEmbankmentMaterial = "";
private double slopeAdaptionEndCotangent = 6.0;
private double slopeAdaptionStartCotangent = 3.0;
private double slopeAdaptionStepCotangent = 0.5;
private double slopeDampingPiezometricHeightPolderSide = 0.0;
private SoilSurfaceProfile soilSurfaceProfile = null;
private string soildatabaseName = "";
private StabilityDesignMethod stabilityDesignMethod = StabilityDesignMethod.OptimizedSlopeAndShoulderAdaption;
private double stabilityShoulderGrowDeltaX = 2.0;
private double stabilityShoulderGrowSlope = 1.0/3;
private double stabilitySlopeAdaptionDeltaX = 2.0;
private MStabZonesType stabilityZoneType = MStabZonesType.NoZones;
private SurfaceLine2 surfaceLine2;
private string surfaceLineId = "";
private double trafficLoad = 0;
private bool useNewDikeSlopeInside;
private bool useNewDikeSlopeOutside;
private bool useNewDikeTopWidth;
private bool useNewDitchDefinition;
private bool useNewMaxHeightShoulderAsFraction;
private bool useNewMinDistanceDikeToeStartDitch;
private bool useNewShoulderBaseSlope;
private bool useNewShoulderTopSlope;
private double xRdDikeLine;
private double xSoilGeometry2DOrigin = 0;
private double xrd = 0;
private double yrd = 0;
private double zoneAreaRestSlopeCrestWidth = 3.0;
private double? plLineOffsetFactorBelowShoulderCrest;
private double? plLineOffsetBelowDikeCrestMiddle;
private double? plLineOffsetDryFactorBelowShoulderCrest;
private double? plLineOffsetDryBelowDikeCrestMiddle;
private IntrusionVerticalWaterPressureType? intrusionVerticalWaterPressure = IntrusionVerticalWaterPressureType.Standard;
public Location()
{
SoilList = null;
}
///
/// Initializes a new instance of the class.
///
/// The name.
public Location(string name) : this()
{
this.name = name;
}
public bool HasSensorData
{
get
{
return sensorData != null;
}
}
public virtual SensorLocation SensorData
{
get
{
return sensorData;
}
set
{
sensorData = value;
sensorData.Location = this;
}
}
public virtual bool AreLocalXZObjectsCreated
{
get
{
return areLocalXZObjectsCreated;
}
set
{
areLocalXZObjectsCreated = value;
}
}
public virtual string Name
{
get
{
return name;
}
set
{
name = value;
}
}
public virtual string Description
{
get
{
return description;
}
set
{
description = value;
}
}
public virtual double XRd
{
get
{
return xrd;
}
set
{
xrd = value;
}
}
public virtual double YRd
{
get
{
return yrd;
}
set
{
yrd = value;
}
}
public virtual double XRdDikeLine
{
get
{
return xRdDikeLine;
}
set
{
xRdDikeLine = value;
}
}
public virtual double GrassQuality
{
get
{
return grassQuality;
}
set
{
grassQuality = value;
}
}
public virtual double Direction
{
get
{
return direction;
}
set
{
direction = value;
}
}
public virtual double XSoilGeometry2DOrigin
{
get
{
return xSoilGeometry2DOrigin;
}
set
{
xSoilGeometry2DOrigin = value;
}
}
public virtual double TrafficLoad
{
get
{
return trafficLoad;
}
set
{
trafficLoad = value;
}
}
public virtual double DredgingDepth
{
get
{
return dredgingDepth;
}
set
{
dredgingDepth = value;
}
}
public virtual SoilType DikeMaterialType
{
get
{
return dikeMaterialType;
}
set
{
dikeMaterialType = value;
}
}
public virtual GeometryPoint SheetPilePoint
{
get
{
return sheetPilePoint;
}
set
{
sheetPilePoint = value;
}
}
public virtual double SheetPilePointX
{
get
{
return SheetPilePoint.X;
}
set
{
SheetPilePoint.X = value;
}
}
public virtual double SheetPilePointY
{
get
{
return SheetPilePoint.Y;
}
set
{
SheetPilePoint.Y = value;
}
}
[Browsable(false)]public virtual double SheetPilePointZ
{
get
{
return SheetPilePoint.Z;
}
set
{
SheetPilePoint.Z = value;
}
}
public virtual double SheetPileLength
{
get
{
return sheetPileLength;
}
set
{
sheetPileLength = value;
}
}
public virtual double RwBankProtectionBottomLevel
{
get
{
return rwBankProtectionBottomLevel;
}
set
{
rwBankProtectionBottomLevel = value;
}
}
public virtual bool IsUseOriginalPLLineAssignments
{
get
{
return isUseOriginalPLLineAssignments;
}
set
{
isUseOriginalPLLineAssignments = value;
}
}
public virtual PL1Line PL1Line
{
get
{
return pL1Line;
}
set
{
pL1Line = value;
}
}
public virtual PL1Line LocalXZPL1Line
{
get
{
return localXZPL1Line;
}
set
{
localXZPL1Line = value;
}
}
///
/// TODO
///
/// Composite relationship.
[Validate]
public virtual SurfaceLine2 LocalXZSurfaceLine2
{
get
{
return localXzSurfaceLine;
}
set
{
localXzSurfaceLine = value;
}
}
public virtual GeometryPoint LocalXZSheetPilePoint
{
get
{
return localXZSheetPilePoint;
}
set
{
localXZSheetPilePoint = value;
}
}
///
/// Gets or sets the Segment
///
public virtual string SegmentId { get; set; }
///
/// Gets or sets the Segment
///
public virtual Segment Segment
{
get
{
return segment;
}
set
{
segment = value;
}
}
///
/// Gets or sets the surface line
///
public virtual SurfaceLine2 SurfaceLine2
{
get
{
return surfaceLine2;
}
set
{
surfaceLine2 = value;
}
}
///
///
///
public virtual double MinimalCircleDepth
{
get
{
return minimalCircleDepth;
}
set
{
minimalCircleDepth = value;
}
}
public virtual double LevelReductionInside
{
get
{
return levelReductionInside;
}
set
{
levelReductionInside = value;
}
}
public virtual double LevelReductionOutside
{
get
{
return levelReductionOutside;
}
set
{
levelReductionOutside = value;
}
}
public virtual ModelFactors ModelFactors
{
get
{
return modelFactors;
}
set
{
modelFactors = value;
}
}
[XmlIgnore]
public virtual double? UpliftCriterionStability
{
get
{
return ModelFactors.UpliftCriterionStability;
}
set
{
ModelFactors.UpliftCriterionStability = value;
}
}
[XmlIgnore]
public virtual double? UpliftCriterionPiping
{
get
{
return ModelFactors.UpliftCriterionPiping;
}
set
{
ModelFactors.UpliftCriterionPiping = value;
}
}
public virtual DistributionType LayerHeightDistribution
{
get
{
return layerHeightDistribution;
}
set
{
layerHeightDistribution = value;
}
}
public virtual double LayerHeightDeviation
{
get
{
return layerHeightDeviation;
}
set
{
layerHeightDeviation = value;
}
}
public virtual double DistanceToEntryPoint
{
get
{
return distanceToEntryPoint;
}
set
{
distanceToEntryPoint = value;
}
}
public virtual double DetrimentFactor
{
get
{
return detrimentFactor;
}
set
{
detrimentFactor = value;
}
}
public virtual double SlopeDampingPiezometricHeightPolderSide
{
get
{
return slopeDampingPiezometricHeightPolderSide;
}
set
{
slopeDampingPiezometricHeightPolderSide = value;
}
}
public virtual double DikeTableHeight
{
get
{
return dikeTableHeight;
}
set
{
dikeTableHeight = value;
}
}
public DamType DamType
{
get
{
return damType;
}
set
{
damType = value;
}
}
public string DikeRingId
{
get
{
return dikeRingId;
}
set
{
dikeRingId = value;
}
}
public string SurfaceLineId
{
get
{
return surfaceLineId;
}
set
{
surfaceLineId = value;
}
}
public string SoildatabaseName
{
get
{
return soildatabaseName;
}
set
{
soildatabaseName = value;
}
}
public SoilList SoilList { get; set; }
public string MapForSoilGeometries2D
{
get
{
return mapForSoilGeometries2D;
}
set
{
mapForSoilGeometries2D = value;
}
}
public virtual IList Gauges
{
get
{
return gauges;
}
set
{
gauges = value;
}
}
public virtual IList GaugePLLines
{
get
{
return gaugePLLines;
}
set
{
gaugePLLines = value;
}
}
public bool UsesGauges
{
get
{
return GaugePLLines != null && GaugePLLines.Count > 0 && Gauges != null;
}
}
public double GaugeMissVal { get; set; }
public bool RedesignDikeHeight
{
get
{
return redesignDikeHeight;
}
set
{
redesignDikeHeight = value;
}
}
public bool RedesignDikeShoulder
{
get
{
return redesignDikeShoulder;
}
set
{
redesignDikeShoulder = value;
}
}
public StabilityDesignMethod StabilityDesignMethod
{
get
{
return stabilityDesignMethod;
}
set
{
stabilityDesignMethod = value;
}
}
public double SlopeAdaptionStartCotangent
{
get
{
return slopeAdaptionStartCotangent;
}
set
{
slopeAdaptionStartCotangent = value;
}
}
public double SlopeAdaptionEndCotangent
{
get
{
return slopeAdaptionEndCotangent;
}
set
{
slopeAdaptionEndCotangent = value;
}
}
public double SlopeAdaptionStepCotangent
{
get
{
return slopeAdaptionStepCotangent;
}
set
{
slopeAdaptionStepCotangent = value;
}
}
public bool UseNewDikeTopWidth
{
get
{
return useNewDikeTopWidth;
}
set
{
useNewDikeTopWidth = value;
}
}
public double NewDikeTopWidth
{
get
{
return newDikeTopWidth;
}
set
{
newDikeTopWidth = value;
}
}
public bool UseNewDikeSlopeInside
{
get
{
return useNewDikeSlopeInside;
}
set
{
useNewDikeSlopeInside = value;
}
}
public double NewDikeSlopeInside
{
get
{
return newDikeSlopeInside;
}
set
{
newDikeSlopeInside = value;
}
}
public bool UseNewDikeSlopeOutside
{
get
{
return useNewDikeSlopeOutside;
}
set
{
useNewDikeSlopeOutside = value;
}
}
public double NewDikeSlopeOutside
{
get
{
return newDikeSlopeOutside;
}
set
{
newDikeSlopeOutside = value;
}
}
public bool UseNewShoulderTopSlope
{
get
{
return useNewShoulderTopSlope;
}
set
{
useNewShoulderTopSlope = value;
}
}
public double NewShoulderTopSlope
{
get
{
return newShoulderTopSlope;
}
set
{
newShoulderTopSlope = value;
}
}
public bool UseNewShoulderBaseSlope
{
get
{
return useNewShoulderBaseSlope;
}
set
{
useNewShoulderBaseSlope = value;
}
}
public double NewShoulderBaseSlope
{
get
{
return newShoulderBaseSlope;
}
set
{
newShoulderBaseSlope = value;
}
}
public bool UseNewMaxHeightShoulderAsFraction
{
get
{
return useNewMaxHeightShoulderAsFraction;
}
set
{
useNewMaxHeightShoulderAsFraction = value;
}
}
public double NewMaxHeightShoulderAsFraction
{
get
{
return newMaxHeightShoulderAsFraction;
}
set
{
newMaxHeightShoulderAsFraction = value;
}
}
public bool UseNewMinDistanceDikeToeStartDitch
{
get
{
return useNewMinDistanceDikeToeStartDitch;
}
set
{
useNewMinDistanceDikeToeStartDitch = value;
}
}
public double NewMinDistanceDikeToeStartDitch
{
get
{
return newMinDistanceDikeToeStartDitch;
}
set
{
newMinDistanceDikeToeStartDitch = value;
}
}
public bool UseNewDitchDefinition
{
get
{
return useNewDitchDefinition;
}
set
{
useNewDitchDefinition = value;
}
}
public double NewWidthDitchBottom
{
get
{
return newWidthDitchBottom;
}
set
{
newWidthDitchBottom = value;
}
}
public double NewSlopeAngleDitch
{
get
{
return newSlopeAngleDitch;
}
set
{
newSlopeAngleDitch = value;
}
}
public double NewDepthDitch
{
get
{
return newDepthDitch;
}
set
{
newDepthDitch = value;
}
}
[Validate]
public List Scenarios
{
get
{
return scenarios;
}
}
[XmlIgnore]
public static DamProjectType DamProjectType
{
get
{
return damProjectType;
}
set
{
damProjectType = value;
}
}
#region IGeographic Members
public MStabZonesType StabilityZoneType
{
get
{
return stabilityZoneType;
}
set
{
stabilityZoneType = value;
}
}
public double ForbiddenZoneFactor
{
get
{
return forbiddenZoneFactor;
}
set
{
forbiddenZoneFactor = value;
}
}
public double ZoneAreaRestSlopeCrestWidth
{
get
{
return zoneAreaRestSlopeCrestWidth;
}
set
{
zoneAreaRestSlopeCrestWidth = value;
}
}
[XmlIgnore]
public double X
{
get
{
return XRd;
}
set
{
XRd = value;
}
}
[XmlIgnore]
public double Y
{
get
{
return YRd;
}
set
{
YRd = value;
}
}
///
/// Ensure proper Safety Factors for zone type areas by always using the detriment factor.
///
public void EnsureProperZoneSafetyFactors()
{
if (modelFactors != null)
{
// For regional assessment, automatically fill with the detriment factor instead of error message and repairer (MWDAM-748)
if (DamType == DamType.Regional && DamProjectType == DamProjectType.Assessment)
{
modelFactors.RequiredSafetyFactorStabilityInnerSlope = detrimentFactor;
}
}
}
///
/// Checks whether the required safety (stability inner slope) is given as that is needed to work with zone areas.
///
///
[Validate]
public ValidationResult[] IsRequiredSafetySetForZoneTypeArea()
{
if (stabilityZoneType == MStabZonesType.ZoneAreas)
{
// For design projects, the safetey must be defined per scenario, not per location
if (DamProjectType == DamProjectType.Design && scenarios != null && scenarios.Count > 0)
{
foreach (var scenario in scenarios)
{
if (scenario.ModelFactors.RequiredProbabilityOfFailureStabilityInnerslope == null)
{
return new[]
{
new ValidationResult(ValidationResultType.Error, LocalizationManager.GetTranslatedText(
this, "NoRequiredSafetyForZonesScenario"), scenario)
};
}
}
}
else
{
if (modelFactors.RequiredSafetyFactorStabilityInnerSlope == null)
{
return new[]
{
new ValidationResult(ValidationResultType.Error, LocalizationManager.GetTranslatedText(
this, "NoRequiredSafetyForZones"), this)
};
}
}
}
return new ValidationResult[0];
}
[Validate]
public ValidationResult[] ValidateDikeEmbankmentMaterial()
{
if (DamProjectType == DamProjectType.Design && !HasValidDikeEmbankmentMaterial())
{
return new[]
{
new ValidationResult(ValidationResultType.Error, LocalizationManager.GetTranslatedText(
this, "NoDikeEmbankmentMaterial"), this)
};
}
else
{
return new ValidationResult[0];
}
}
[Validate]
public ValidationResult[] ValidateLocationNewDikeTopWidth()
{
if (DamProjectType == DamProjectType.Design)
{
if ((UseNewDikeTopWidth) && (NewDikeTopWidth < newDikeTopWidthMinValue))
{
return new[]
{
new ValidationResult(ValidationResultType.Error, String.Format(
LocalizationManager.GetTranslatedText(this, "NewDikeTopWidthRangeError"),
newDikeTopWidthMinValue), this)
};
}
}
return new ValidationResult[0];
}
[Validate]
public ValidationResult[] ValidateLocationNewDikeSlopeInside()
{
if (DamProjectType == DamProjectType.Design)
{
if ((UseNewDikeSlopeInside) && (NewDikeSlopeInside < newDikeSlopeInsideMinValue))
{
return new[]
{
new ValidationResult(ValidationResultType.Error, String.Format(
LocalizationManager.GetTranslatedText(this, "NewDikeSlopeInsideRangeError"),
newDikeSlopeInsideMinValue), this)
};
}
}
return new ValidationResult[0];
}
[Validate]
public ValidationResult[] ValidateLocationNewDikeSlopeOutside()
{
if (DamProjectType == DamProjectType.Design)
{
if ((UseNewDikeSlopeOutside) && (NewDikeSlopeOutside < newDikeSlopeOutsideMinValue))
{
return new[]
{
new ValidationResult(ValidationResultType.Error, String.Format(LocalizationManager.
GetTranslatedText(this, "NewDikeSlopeOutsideRangeError"),
newDikeSlopeOutsideMinValue), this)
};
}
}
return new ValidationResult[0];
}
///
/// Validates the use of the penetration length.
///
/// Validation result
[Validate]
public ValidationResult[] ValidateLocationUseOfPenetrationLength()
{
if (PenetrationLength > 0)
{
// It may be used on 1D geometries
if (!String.IsNullOrEmpty(this.Segment.GetMostProbableGeometry2DName(FailureMechanismSystemType.StabilityInside)))
{
// It may be used on 2D geometries only if condition below is true
if (this.IntrusionVerticalWaterPressure != IntrusionVerticalWaterPressureType.SemiTimeDependent)
{
return new[]
{
new ValidationResult(ValidationResultType.Error, String.Format(
LocalizationManager.GetTranslatedText(this, "UseOfPenetrationLengthError"),
penetrationLenghtMinValue), this)
};
}
}
}
return new ValidationResult[0];
}
[Validate]
public ValidationResult[] ValidateShoulderEmbankmentMaterial()
{
if (DamProjectType == DamProjectType.Design && !HasValidShoulderEmbankmentMaterial())
{
return new[]
{
new ValidationResult(ValidationResultType.Error, LocalizationManager.GetTranslatedText(
this, "NewDikeTopWidth"), this)
};
}
else
{
return new ValidationResult[0];
}
}
///
/// Validates the location has segment.
///
///
[Validate]
public ValidationResult[] ValidateLocationHasSegment()
{
if (Segment == null)
{
return new[]
{
new ValidationResult(ValidationResultType.Error,
LocalizationManager.GetTranslatedText(this, "LocationHasNoSegment"),
this)
};
}
else
{
return new ValidationResult[0];
}
}
///
/// Validates the location has valid essential assessment values.
///
///
[Validate]
public ValidationResult[] ValidateLocationHasValidEssentialAssessmentValues()
{
if (DamProjectType == DamProjectType.Assessment)
{
if (Math.Abs(BoezemLevelTp - BoezemLevelNotSetValue) < Double.Epsilon)
{
return new[]
{
new ValidationResult(ValidationResultType.Error,
LocalizationManager.GetTranslatedText(this, "LocationInvalidBoezemLevelTp"),
this)
};
}
if (Math.Abs(boezemLevelHbp - BoezemLevelNotSetValue) < Double.Epsilon)
{
return new[]
{
new ValidationResult(ValidationResultType.Error,
LocalizationManager.GetTranslatedText(this, "LocationInvalidBoezemLevelHbp"),
this)
};
}
if (Math.Abs(boezemLevelLbp - BoezemLevelNotSetValue) < Double.Epsilon)
{
return new[]
{
new ValidationResult(ValidationResultType.Error,
LocalizationManager.GetTranslatedText(this, "LocationInvalidBoezemLevelLbp"),
this)
};
}
}
return new ValidationResult[0];
}
[Validate]
public ValidationResult[] ValidateDikeEmbankmentMaterialDefinedIfSurfacelineAboveSoilProfile()
{
if (IsSurfaceLineAboveSoilProfile() && !HasValidDikeEmbankmentMaterial())
{
return new[]
{
new ValidationResult(ValidationResultType.Error,
LocalizationManager.GetTranslatedText(this, "NoDikeEmbankmentMaterialAndNeeded"),
this)
};
}
else
{
return new ValidationResult[0];
}
}
///
/// Determines whether [is pl line offset factor below shoulder crest valid].
///
///
[Validate]
public ValidationResult[] IsPlLineOffsetFactorBelowShoulderCrestValid()
{
if (!IsDesign() && ArePlLineCreationExpertKnowledgeParametersNeeded() && UsePlLineOffsetFactorBelowShoulderCrest.HasValue && UsePlLineOffsetFactorBelowShoulderCrest.Value &&
PlLineOffsetFactorBelowShoulderCrest.HasValue)
{
if (PlLineOffsetFactorBelowShoulderCrest.Value < DamGlobalConstants.PlLineOffsetFactorBelowShoulderCrestMinValue)
{
return new[]
{
new ValidationResult(ValidationResultType.Error,
LocalizationManager.GetTranslatedText(this, "PlLineOffsetFactorBelowShoulderCrestTooSmall"),
this)
};
}
if (PlLineOffsetFactorBelowShoulderCrest.Value > DamGlobalConstants.PlLineOffsetFactorBelowShoulderCrestMaxValue)
{
return new[]
{
new ValidationResult(ValidationResultType.Error,
LocalizationManager.GetTranslatedText(this, "PlLineOffsetFactorBelowShoulderCrestTooLarge"),
this)
};
}
}
return new ValidationResult[0];
}
///
/// Check if DikeEmbankmentMaterial is defined and is available as soil
///
///
private bool HasValidDikeEmbankmentMaterial()
{
return !String.IsNullOrEmpty(DikeEmbankmentMaterial) && GetDikeEmbankmentSoil() != null;
}
///
/// Check if ShoulderEmbankmentMaterial is defined and is available as soil
///
///
private bool HasValidShoulderEmbankmentMaterial()
{
return !String.IsNullOrEmpty(ShoulderEmbankmentMaterial) && GetShoulderEmbankmentSoil() != null;
}
///
/// Determine if surfaceline is higher than any of the 1D soilprofiles
///
///
private bool IsSurfaceLineAboveSoilProfile()
{
bool isSurfaceLineAboveSoilProfile = false;
if (Segment != null)
{
foreach (var soilGeometryProbability in Segment.SoilProfileProbabilities)
{
SoilProfile1D soilProfile = soilGeometryProbability.SoilProfile;
if (soilProfile != null)
{
isSurfaceLineAboveSoilProfile = isSurfaceLineAboveSoilProfile || (LocalXZSurfaceLine2.Geometry.GetMaxZ() > soilGeometryProbability.SoilProfile.TopLevel);
}
}
}
return isSurfaceLineAboveSoilProfile;
}
#endregion
#region Design parameters
public virtual string DikeEmbankmentMaterial
{
get
{
return dikeEmbankmentMaterial;
}
set
{
dikeEmbankmentMaterial = value;
}
}
public virtual string ShoulderEmbankmentMaterial
{
get
{
return shoulderEmbankmentMaterial;
}
set
{
shoulderEmbankmentMaterial = value;
}
}
public virtual double StabilityShoulderGrowSlope
{
get
{
return stabilityShoulderGrowSlope;
}
set
{
stabilityShoulderGrowSlope = value;
}
}
public virtual double StabilityShoulderGrowDeltaX
{
get
{
return stabilityShoulderGrowDeltaX;
}
set
{
stabilityShoulderGrowDeltaX = value;
}
}
public virtual double StabilitySlopeAdaptionDeltaX
{
get
{
return stabilitySlopeAdaptionDeltaX;
}
set
{
stabilitySlopeAdaptionDeltaX = value;
}
}
#endregion
#region PLLine creation parameters
///
/// Gets or sets the pl line creation method.
///
///
/// The pl line creation method.
///
public virtual PLLineCreationMethod PLLineCreationMethod
{
get
{
return pLLineCreationMethod;
}
set
{
pLLineCreationMethod = value;
}
}
///
/// Gets or sets the head pl 2.
///
///
/// The head pl 2.
///
public virtual double? HeadPL2
{
get
{
return headPL2;
}
set
{
headPL2 = value;
}
}
///
/// Gets or sets the head PL3.
///
///
/// The head PL3.
///
public virtual double? HeadPl3
{
get
{
return headPL3;
}
set
{
headPL3 = value;
}
}
///
/// Gets or sets the head PL4.
///
///
/// The head PL4.
///
public virtual double? HeadPl4
{
get
{
return headPL4;
}
set
{
headPL4 = value;
}
}
///
/// Gets or sets the damping factor pl 3.
///
///
/// The damping factor pl 3.
///
public virtual double DampingFactorPL3
{
get
{
return dampingFactorPL3;
}
set
{
dampingFactorPL3 = value;
}
}
///
/// Gets or sets the damping factor pl 4.
///
///
/// The damping factor pl 4.
///
public virtual double DampingFactorPL4
{
get
{
return dampingFactorPL4;
}
set
{
dampingFactorPL4 = value;
}
}
///
/// Gets or sets the length of the penetration.
///
///
/// The length of the penetration.
///
public virtual double PenetrationLength
{
get
{
return penetrationLength;
}
set
{
penetrationLength = value;
}
}
///
/// 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
{
return pLLineOffsetBelowDikeTopAtRiver;
}
set
{
pLLineOffsetBelowDikeTopAtRiver = value;
}
}
///
/// 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
{
return pLLineOffsetBelowDikeTopAtPolder;
}
set
{
pLLineOffsetBelowDikeTopAtPolder = value;
}
}
///
/// Gets or sets the pl line offset below shoulder base inside.
///
///
/// The pl line offset below shoulder base inside.
///
public virtual double PlLineOffsetBelowShoulderBaseInside
{
get
{
return pLLineOffsetBelowShoulderBaseInside;
}
set
{
pLLineOffsetBelowShoulderBaseInside = value;
}
}
///
/// 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
{
return pLLineOffsetBelowDikeToeAtPolder;
}
set
{
pLLineOffsetBelowDikeToeAtPolder = value;
}
}
///
/// Gets or sets the pl line offset dry below dike top at river.
///
///
/// The pl line offset dry below dike top at river.
///
public virtual double PLLineOffsetDryBelowDikeTopAtRiver
{
get
{
return pLLineOffsetDryBelowDikeTopAtRiver;
}
set
{
pLLineOffsetDryBelowDikeTopAtRiver = value;
}
}
///
/// Gets or sets the pl line offset dry below dike top at polder.
///
///
/// The pl line offset dry below dike top at polder.
///
public virtual double PLLineOffsetDryBelowDikeTopAtPolder
{
get
{
return pLLineOffsetDryBelowDikeTopAtPolder;
}
set
{
pLLineOffsetDryBelowDikeTopAtPolder = value;
}
}
///
/// Gets or sets the pl line offset dry below shoulder base inside.
///
///
/// The pl line offset dry below shoulder base inside.
///
public virtual double PLLineOffsetDryBelowShoulderBaseInside
{
get
{
return pLLineOffsetDryBelowShoulderBaseInside;
}
set
{
pLLineOffsetDryBelowShoulderBaseInside = value;
}
}
///
/// Gets or sets the pl line offset dry below dike toe at polder.
///
///
/// The pl line offset dry below dike toe at polder.
///
public virtual double PLLineOffsetDryBelowDikeToeAtPolder
{
get
{
return pLLineOffsetDryBelowDikeToeAtPolder;
}
set
{
pLLineOffsetDryBelowDikeToeAtPolder = value;
}
}
///
/// 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 { return plLineOffsetBelowDikeCrestMiddle; }
set
{
plLineOffsetBelowDikeCrestMiddle = value;
}
}
///
/// 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 { return plLineOffsetFactorBelowShoulderCrest; }
set
{
plLineOffsetFactorBelowShoulderCrest = value;
}
}
///
/// Gets or sets the use pl line offset dry below dike crest middle.
///
///
/// The use pl line offset dry below dike crest middle.
///
public bool? UsePlLineOffsetDryBelowDikeCrestMiddle { get; set; }
///
/// Gets or sets the pl line offset dry below dike crest middle.
///
///
/// The pl line offset dry below dike crest middle.
///
public double? PlLineOffsetDryBelowDikeCrestMiddle
{
get { return plLineOffsetDryBelowDikeCrestMiddle; }
set
{
plLineOffsetDryBelowDikeCrestMiddle = value;
}
}
///
/// Gets or sets the use pl line offset dry factor below shoulder crest.
///
///
/// The use pl line offset dry factor below shoulder crest.
///
public bool? UsePlLineOffsetDryFactorBelowShoulderCrest { get; set; }
///
/// Gets or sets the pl line offset dry factor below shoulder crest.
///
///
/// The pl line offset dry factor below shoulder crest.
///
public double? PlLineOffsetDryFactorBelowShoulderCrest
{
get { return plLineOffsetDryFactorBelowShoulderCrest; }
set
{
plLineOffsetDryFactorBelowShoulderCrest = value;
}
}
///
/// Gets or sets the intrusion vertical water pressure.
///
///
/// The intrusion vertical water pressure.
///
public IntrusionVerticalWaterPressureType? IntrusionVerticalWaterPressure
{
get { return intrusionVerticalWaterPressure; }
set
{
intrusionVerticalWaterPressure = value;
}
}
#endregion
#region Waterlevels
public virtual double BoezemLevelTp
{
get
{
return boezemLevelTp;
}
set
{
boezemLevelTp = value;
}
}
public virtual double BoezemLevelHbp
{
get
{
return boezemLevelHbp;
}
set
{
boezemLevelHbp = value;
}
}
public virtual double BoezemLevelLbp
{
get
{
return boezemLevelLbp;
}
set
{
boezemLevelLbp = value;
}
}
public virtual double PolderLevel
{
get
{
return polderLevel;
}
set
{
polderLevel = value;
}
}
public virtual double PolderLevelLow
{
get
{
return polderLevelLow;
}
set
{
polderLevelLow = value;
}
}
public virtual double RiverLevel
{
get
{
return scenarioRiverLevel;
}
set
{
scenarioRiverLevel = value;
}
}
#endregion
///
/// Sets the default values; taking into account which DamProjectType and DamType is set
///
/// Type of the dam.
/// Type of the dam project.
// TODO fix hiding parameter (e.g. use field instead of parameter)
// TODO possibly set this when setting a damType and damProjectType for this location
public void SetDefaultValues(DamType damType, DamProjectType damProjectType)
{
if ((damType == DamType.Regional) && (damProjectType == DamProjectType.Assessment))
{
zoneAreaRestSlopeCrestWidth = 1.5;
}
else
{
zoneAreaRestSlopeCrestWidth = 3.0;
}
}
///
/// Assemble a list of key/value pairs with the relevant parameters for the location
///
///
public Dictionary GetParametersAsNameValuePairs()
{
var numberFormatInfo = new NumberFormatInfo();
numberFormatInfo.NumberDecimalSeparator = ".";
var nameValuePairs = new Dictionary();
nameValuePairs.Add(LocationParameterNames.DamType, DamType.ToString());
nameValuePairs.Add(LocationParameterNames.DikeRingId, DikeRingId);
nameValuePairs.Add(LocationParameterNames.SurfaceLineId, SurfaceLineId);
nameValuePairs.Add(LocationParameterNames.Description, Description);
nameValuePairs.Add(LocationParameterNames.XRd, XRd.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.YRd, YRd.ToString(numberFormatInfo));
if (Segment != null)
{
nameValuePairs.Add(LocationParameterNames.SegmentId, Segment.Name);
}
else
{
nameValuePairs.Add(LocationParameterNames.SegmentId, SegmentId);
}
if (SurfaceLine2 != null)
{
nameValuePairs[LocationParameterNames.SurfaceLineId] = SurfaceLine2.Name;
}
if (PL1Line != null)
{
nameValuePairs.Add(LocationParameterNames.PL1LineId, PL1Line.Name);
}
nameValuePairs.Add(LocationParameterNames.DredgingDepth, DredgingDepth.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.PolderLevel, PolderLevel.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.PolderLevelLow, PolderLevelLow.ToString(numberFormatInfo));
if (HeadPL2.HasValue)
{
nameValuePairs.Add(LocationParameterNames.HeadPL2, HeadPL2.Value.ToString(numberFormatInfo));
}
if (HeadPl3.HasValue)
{
nameValuePairs.Add(LocationParameterNames.HeadPL3, HeadPl3.Value.ToString(numberFormatInfo));
}
if (HeadPl4.HasValue)
{
nameValuePairs.Add(LocationParameterNames.HeadPL4, HeadPl4.Value.ToString(numberFormatInfo));
}
nameValuePairs.Add(LocationParameterNames.GrassQuality, GrassQuality.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.Direction, Direction.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.XSoilGeometry2DOrigin, XSoilGeometry2DOrigin.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.DikeMaterialType, DikeMaterialType.ToString());
nameValuePairs.Add(LocationParameterNames.DikeEmbankmentMaterial, DikeEmbankmentMaterial);
nameValuePairs.Add(LocationParameterNames.ShoulderEmbankmentMaterial, ShoulderEmbankmentMaterial);
nameValuePairs.Add(LocationParameterNames.DampingFactorPL3, DampingFactorPL3.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.DampingFactorPL4, DampingFactorPL4.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.PenetrationLength, PenetrationLength.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.BoezemLevelTp, BoezemLevelTp.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.BoezemlevelHbp, BoezemLevelHbp.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.BoezemLevelLbp, BoezemLevelLbp.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.PLLineCreationMethod, PLLineCreationMethod.ToString());
nameValuePairs.Add(LocationParameterNames.PLLineOffsetBelowDikeTopAtRiver, PlLineOffsetBelowDikeTopAtRiver.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.PLLineOffsetBelowDikeTopAtPolder, PlLineOffsetBelowDikeTopAtPolder.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.PLLineOffsetBelowShoulderBaseInside, PlLineOffsetBelowShoulderBaseInside.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.PLLineOffsetBelowDikeToeAtPolder, PlLineOffsetBelowDikeToeAtPolder.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.PLLineOffsetDryBelowDikeTopAtRiver, PLLineOffsetDryBelowDikeTopAtRiver.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.PLLineOffsetDryBelowDikeTopAtPolder, PLLineOffsetDryBelowDikeTopAtPolder.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.PLLineOffsetDryBelowShoulderBaseInside, PLLineOffsetDryBelowShoulderBaseInside.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.PLLineOffsetDryBelowDikeToeAtPolder, PLLineOffsetDryBelowDikeToeAtPolder.ToString(numberFormatInfo));
if (PlLineOffsetBelowDikeCrestMiddle.HasValue)
{
nameValuePairs.Add(LocationParameterNames.PlLineOffsetBelowDikeCrestMiddle,
PlLineOffsetBelowDikeCrestMiddle.Value.ToString(numberFormatInfo));
}
if (PlLineOffsetFactorBelowShoulderCrest.HasValue)
{
nameValuePairs.Add(LocationParameterNames.PlLineOffsetFactorBelowShoulderCrest,
PlLineOffsetFactorBelowShoulderCrest.Value.ToString(numberFormatInfo));
}
if (PlLineOffsetDryBelowDikeCrestMiddle.HasValue)
{
nameValuePairs.Add(LocationParameterNames.PlLineOffsetDryBelowDikeCrestMiddle,
PlLineOffsetDryBelowDikeCrestMiddle.Value.ToString(numberFormatInfo));
}
if (PlLineOffsetDryFactorBelowShoulderCrest.HasValue)
{
nameValuePairs.Add(LocationParameterNames.PlLineOffsetDryFactorBelowShoulderCrest,
PlLineOffsetDryFactorBelowShoulderCrest.Value.ToString(numberFormatInfo));
}
if (UsePlLineOffsetBelowDikeCrestMiddle.HasValue)
{
nameValuePairs.Add(LocationParameterNames.UsePlLineOffsetBelowDikeCrestMiddle,
UsePlLineOffsetBelowDikeCrestMiddle.Value.ToString());
}
if (UsePlLineOffsetFactorBelowShoulderCrest.HasValue)
{
nameValuePairs.Add(LocationParameterNames.UsePlLineOffsetFactorBelowShoulderCrest,
UsePlLineOffsetFactorBelowShoulderCrest.Value.ToString());
}
if (UsePlLineOffsetDryBelowDikeCrestMiddle.HasValue)
{
nameValuePairs.Add(LocationParameterNames.UsePlLineOffsetDryBelowDikeCrestMiddle,
UsePlLineOffsetDryBelowDikeCrestMiddle.Value.ToString());
}
if (UsePlLineOffsetDryFactorBelowShoulderCrest.HasValue)
{
nameValuePairs.Add(LocationParameterNames.UsePlLineOffsetDryFactorBelowShoulderCrest,
UsePlLineOffsetDryFactorBelowShoulderCrest.Value.ToString());
}
if (IntrusionVerticalWaterPressure.HasValue)
{
nameValuePairs.Add(LocationParameterNames.IntrusionVerticalWaterPressure,
IntrusionVerticalWaterPressure.Value.ToString());
}
nameValuePairs.Add(LocationParameterNames.StabilityShoulderGrowSlope, StabilityShoulderGrowSlope.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.StabilityShoulderGrowDeltaX, StabilityShoulderGrowDeltaX.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.StabilitySlopeAdaptionDeltaX, StabilitySlopeAdaptionDeltaX.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.SheetPilePointX, SheetPilePoint.X.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.SheetPilePointY, SheetPilePoint.Y.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.SheetPilePointZ, SheetPilePoint.Z.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.SheetPileLength, SheetPileLength.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.RwBankProtectionBottomLevel, RwBankProtectionBottomLevel.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.IsUseOriginalPLLineAssignments, IsUseOriginalPLLineAssignments.ToString());
nameValuePairs.Add(LocationParameterNames.TrafficLoad, TrafficLoad.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.MinimalCircleDepth, MinimalCircleDepth.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.LevelReductionInside, LevelReductionInside.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.LevelReductionOutside, LevelReductionOutside.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.LayerHeightDistribution, LayerHeightDistribution.ToString());
nameValuePairs.Add(LocationParameterNames.LayerHeightDeviation, LayerHeightDeviation.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.DistanceToEntryPoint, DistanceToEntryPoint.ToString(numberFormatInfo));
if (ModelFactors.RequiredSafetyFactorStabilityInnerSlope != null)
{
nameValuePairs.Add(LocationParameterNames.RequiredSafetyFactorStabilityInnerSlope, ModelFactors.RequiredSafetyFactorStabilityInnerSlope.Value.ToString(numberFormatInfo));
}
if (ModelFactors.RequiredSafetyFactorStabilityOuterSlope != null)
{
nameValuePairs.Add(LocationParameterNames.RequiredSafetyFactorStabilityOuterSlope, ModelFactors.RequiredSafetyFactorStabilityOuterSlope.Value.ToString(numberFormatInfo));
}
if (ModelFactors.RequiredSafetyFactorPiping != null)
{
nameValuePairs.Add(LocationParameterNames.RequiredSafetyFactorPiping, ModelFactors.RequiredSafetyFactorPiping.Value.ToString(numberFormatInfo));
}
if (ModelFactors.RequiredProbabilityOfFailureStabilityInnerslope != null)
{
nameValuePairs.Add(LocationParameterNames.RequiredProbabilityOfFailureStabilityInnerslope, ModelFactors.RequiredProbabilityOfFailureStabilityInnerslope.Value.ToString(numberFormatInfo));
}
if (ModelFactors.RequiredProbabilityOfFailureStabilityOuterslope != null)
{
nameValuePairs.Add(LocationParameterNames.RequiredProbabilityOfFailureStabilityOuterslope, ModelFactors.RequiredProbabilityOfFailureStabilityOuterslope.Value.ToString(numberFormatInfo));
}
if (ModelFactors.RequiredProbabilityOfFailurePiping != null)
{
nameValuePairs.Add(LocationParameterNames.RequiredProbabilityOfFailurePiping, ModelFactors.RequiredProbabilityOfFailurePiping.Value.ToString(numberFormatInfo));
}
if (ModelFactors.UpliftCriterionPiping != null)
{
nameValuePairs.Add(LocationParameterNames.UpliftCriterionPiping, ModelFactors.UpliftCriterionPiping.Value.ToString(numberFormatInfo));
}
if (ModelFactors.UpliftCriterionStability != null)
{
nameValuePairs.Add(LocationParameterNames.UpliftCriterionStability, ModelFactors.UpliftCriterionStability.Value.ToString(numberFormatInfo));
}
nameValuePairs.Add(LocationParameterNames.DetrimentFactor, DetrimentFactor.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.StabilityZoneType, StabilityZoneType.ToString());
nameValuePairs.Add(LocationParameterNames.ForbiddenZoneFactor, ForbiddenZoneFactor.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.ZoneAreaRestSlopeCrestWidth, ZoneAreaRestSlopeCrestWidth.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.DikeTableHeight, DikeTableHeight.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.SlopeDampingPiezometricHeightPolderSide, SlopeDampingPiezometricHeightPolderSide.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.StabilityDesignMethod, StabilityDesignMethod.ToString());
nameValuePairs.Add(LocationParameterNames.SlopeAdaptionStartCotangent, SlopeAdaptionStartCotangent.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.SlopeAdaptionEndCotangent, SlopeAdaptionEndCotangent.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.SlopeAdaptionStepCotangent, SlopeAdaptionStepCotangent.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.NewDepthDitch, NewDepthDitch.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.NewDikeSlopeInside, NewDikeSlopeInside.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.NewDikeSlopeOutside, NewDikeSlopeOutside.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.NewDikeTopWidth, NewDikeTopWidth.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.NewMaxHeightShoulderAsFraction, NewMaxHeightShoulderAsFraction.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.NewMinDistanceDikeToeStartDitch, NewMinDistanceDikeToeStartDitch.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.NewShoulderBaseSlope, NewShoulderBaseSlope.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.NewShoulderTopSlope, NewShoulderTopSlope.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.NewSlopeAngleDitch, NewSlopeAngleDitch.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.NewWidthDitchBottom, NewWidthDitchBottom.ToString(numberFormatInfo));
nameValuePairs.Add(LocationParameterNames.UseNewDikeSlopeInside, UseNewDikeSlopeInside.ToString());
nameValuePairs.Add(LocationParameterNames.UseNewDikeSlopeOutside, UseNewDikeSlopeOutside.ToString());
nameValuePairs.Add(LocationParameterNames.UseNewDikeTopWidth, UseNewDikeTopWidth.ToString());
nameValuePairs.Add(LocationParameterNames.UseNewDitchDefinition, UseNewDitchDefinition.ToString());
nameValuePairs.Add(LocationParameterNames.UseNewMaxHeightShoulderAsFraction, UseNewMaxHeightShoulderAsFraction.ToString());
nameValuePairs.Add(LocationParameterNames.UseNewMinDistanceDikeToeStartDitch, UseNewMinDistanceDikeToeStartDitch.ToString());
nameValuePairs.Add(LocationParameterNames.UseNewShoulderBaseSlope, UseNewShoulderBaseSlope.ToString());
nameValuePairs.Add(LocationParameterNames.UseNewShoulderTopSlope, UseNewShoulderTopSlope.ToString());
return nameValuePairs;
}
public void SetParametersByNameValuepairs(Dictionary nameValuePairs)
{
foreach (var nameValuePair in nameValuePairs)
{
SetParameterFromNameValuePair(nameValuePair.Key, nameValuePair.Value);
}
}
[Validate]
public ValidationResult[] AscendingLocalXZSurfaceLine()
{
if (LocalXZSurfaceLine2 != null)
{
return new SurfaceLine2Validator().ValidateCharacteristicPointsAreOrdered(LocalXZSurfaceLine2).ToArray();
}
else
{
return new ValidationResult[0];
}
}
///
/// Gets the dike embankment soil.
///
///
public Soil GetDikeEmbankmentSoil()
{
if (String.IsNullOrEmpty(SoildatabaseName) || String.IsNullOrEmpty(DikeEmbankmentMaterial))
{
return null;
}
else
{
return SoilList.GetSoilByName(DikeEmbankmentMaterial);
}
}
///
/// Gets the shoulder embankment soil.
///
///
public Soil GetShoulderEmbankmentSoil()
{
if (String.IsNullOrEmpty(SoildatabaseName) || String.IsNullOrEmpty(ShoulderEmbankmentMaterial))
{
return null;
}
else
{
return SoilList.GetSoilByName(ShoulderEmbankmentMaterial);
}
}
///
/// Gets the most probable profile. If there are no elements in the it returns null
/// and leave the handling over to the caller
///
/// The soil profile
public SoilProfile1D GetMostProbableProfile(FailureMechanismSystemType? segmentFailureMechanismType)
{
// if (Segment == null)
// {
// throw new ArgumentNullException(String.Format(ThrowHelper.GetResourceString(StringResourceNames.LocationHasNoSegment), Name));
// }
return Segment.GetMostProbableProfile(segmentFailureMechanismType);
}
///
/// Gets the most probable profile. If there are no elements in the it returns null
/// and leave the handling over to the caller
///
/// The soil profile
public string GetMostProbableGeometry2DName(FailureMechanismSystemType? segmentFailureMechanismType)
{
// if (Segment == null)
// {
// throw new ArgumentNullException(String.Format(ThrowHelper.GetResourceString(StringResourceNames.LocationHasNoSegment), Name));
// }
return Segment.GetMostProbableGeometry2DName(segmentFailureMechanismType);
}
public double? GetSoilProfileProbability(SoilProfile1D soilProfile, FailureMechanismSystemType? segmentFailureMechanismType)
{
// if (Segment == null)
// {
// throw new ArgumentNullException(String.Format(ThrowHelper.GetResourceString(StringResourceNames.LocationHasNoSegment), Name));
// }
return Segment.GetSoilProfileProbability(soilProfile, segmentFailureMechanismType);
}
///
/// Gets a sorted list of soil geometry probabilities for a certain failure mechanism type
///
/// The failure mechanism type
/// List of geometry probabilities
public List GetGeometryProbabilities(FailureMechanismSystemType failureMechanismType)
{
var geometryProbabilities = new List();
if (Segment != null)
{
foreach (var existingGeometryProbability in Segment.SoilProfileProbabilities)
{
if (existingGeometryProbability.SegmentFailureMechanismType.HasValue && existingGeometryProbability.SegmentFailureMechanismType.Value == failureMechanismType)
{
geometryProbabilities.Add(existingGeometryProbability);
}
}
geometryProbabilities.Sort();
}
return geometryProbabilities;
}
///
/// Gets the combination of the surface line and soil profile for a given failure mechanism and index
///
/// Failure mechanism type
/// The index indicates the ranking in probability
/// The probability of the soil surface profile
/// The soil surface profile
public SoilSurfaceProfile GetSoilSurfaceProfile(FailureMechanismSystemType failureMechanismType, int index, out double probability)
{
List soilGeometryProbabilities = GetGeometryProbabilities(failureMechanismType);
SoilGeometryProbability soilGeometryProbability = index < soilGeometryProbabilities.Count ? soilGeometryProbabilities[index] : null;
SoilProfile1D originalProfile = soilGeometryProbability != null ? soilGeometryProbability.SoilProfile : null;
probability = soilGeometryProbability != null ? soilGeometryProbability.Probability : 0;
if (soilSurfaceProfile == null || soilSurfaceProfile.SoilProfile != originalProfile || soilSurfaceProfile.SurfaceLine2 != LocalXZSurfaceLine2)
{
Soil dikeSoil = SoilList.GetSoilByName(DikeEmbankmentMaterial);
if (soilSurfaceProfile == null)
{
soilSurfaceProfile = new SoilSurfaceProfile();
}
// Do not assign the orginal soilprofile, because it will be changed in the class SoilSurfaceProfile
SoilProfile1D soilProfile1D;
if (originalProfile == null)
{
soilProfile1D = new SoilProfile1D(SurfaceLine2.Geometry.GetMaxZ(), -10, dikeSoil);
}
else
{
soilProfile1D = new SoilProfile1D();
soilProfile1D.Assign(originalProfile);
}
soilSurfaceProfile.SoilProfile = soilProfile1D;
soilSurfaceProfile.SurfaceLine2 = LocalXZSurfaceLine2;
soilSurfaceProfile.DikeEmbankmentMaterial = GetDikeEmbankmentSoil();
foreach (SoilLayer2D layer in soilSurfaceProfile.Surfaces)
{
if (layer.Soil == null)
{
layer.Soil = dikeSoil;
}
}
}
return soilSurfaceProfile;
}
public void AlignBoundaryPointsOfPL1LineWithAdaptedSurfaceLine(SurfaceLine2 adaptedSurfaceLine)
{
if ((LocalXZPL1Line != null) && (LocalXZPL1Line.Points.Count > 1))
{
GeometryPoint lastPointPL1Line = LocalXZPL1Line.Points.Last();
GeometryPoint lastPointSurfaceLine = adaptedSurfaceLine.Geometry.Points.Last();
lastPointPL1Line.X = lastPointSurfaceLine.X;
GeometryPoint firstPointPL1Line = LocalXZPL1Line.Points.First();
GeometryPoint firstPointSurfaceLine = adaptedSurfaceLine.Geometry.Points.First();
firstPointPL1Line.X = firstPointSurfaceLine.X;
}
}
public void SetParameterFromNameValuePair(string parameterName, string parameterValue)
{
var numberFormatInfo = new NumberFormatInfo();
numberFormatInfo.NumberDecimalSeparator = ".";
if (parameterName.Equals(LocationParameterNames.DamType))
{
DamType = (DamType) Enum.Parse(typeof(DamType), parameterValue);
}
if (parameterName.Equals(LocationParameterNames.DikeRingId))
{
DikeRingId = parameterValue;
}
if (parameterName.Equals(LocationParameterNames.Description))
{
Description = parameterValue;
}
if (parameterName.Equals(LocationParameterNames.XRd))
{
XRd = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.YRd))
{
YRd = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.SegmentId))
{
SegmentId = parameterValue;
}
if (parameterName.Equals(LocationParameterNames.SurfaceLineId))
{
SurfaceLineId = parameterValue;
}
//if (parameterName.Equals(LocationParameterNames.PL1LineId))
// this.PL1LineId = Convert.ToDouble(parameterValue, numberFormatInfo);
if (parameterName.Equals(LocationParameterNames.DredgingDepth))
{
DredgingDepth = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.PolderLevel))
{
PolderLevel = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.PolderLevelLow))
{
PolderLevelLow = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.HeadPL2))
{
HeadPL2 = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.HeadPL3))
{
HeadPl3 = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.HeadPL4))
{
HeadPl4 = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.GrassQuality))
{
GrassQuality = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.Direction))
{
Direction = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.XSoilGeometry2DOrigin))
{
XSoilGeometry2DOrigin = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.DikeMaterialType))
{
DikeMaterialType = (SoilType) Enum.Parse(typeof(SoilType), parameterValue);
}
if (parameterName.Equals(LocationParameterNames.DikeEmbankmentMaterial))
{
DikeEmbankmentMaterial = parameterValue;
}
if (parameterName.Equals(LocationParameterNames.ShoulderEmbankmentMaterial))
{
ShoulderEmbankmentMaterial = parameterValue;
}
if (parameterName.Equals(LocationParameterNames.DampingFactorPL3))
{
DampingFactorPL3 = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.DampingFactorPL4))
{
DampingFactorPL4 = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.PenetrationLength))
{
PenetrationLength = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.BoezemLevelTp))
{
BoezemLevelTp = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.BoezemlevelHbp))
{
BoezemLevelHbp = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.BoezemLevelLbp))
{
BoezemLevelLbp = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.PLLineCreationMethod))
{
PLLineCreationMethod = (PLLineCreationMethod) Enum.Parse(typeof(PLLineCreationMethod), parameterValue);
}
if (parameterName.Equals(LocationParameterNames.PLLineOffsetBelowDikeTopAtRiver))
{
PlLineOffsetBelowDikeTopAtRiver = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.PLLineOffsetBelowDikeTopAtPolder))
{
PlLineOffsetBelowDikeTopAtPolder = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.PLLineOffsetBelowShoulderBaseInside))
{
PlLineOffsetBelowShoulderBaseInside = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.PLLineOffsetBelowDikeToeAtPolder))
{
PlLineOffsetBelowDikeToeAtPolder = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.PLLineOffsetDryBelowDikeTopAtRiver))
{
PLLineOffsetDryBelowDikeTopAtRiver = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.PLLineOffsetDryBelowDikeTopAtPolder))
{
PLLineOffsetDryBelowDikeTopAtPolder = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.PLLineOffsetDryBelowShoulderBaseInside))
{
PLLineOffsetDryBelowShoulderBaseInside = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.PLLineOffsetDryBelowDikeToeAtPolder))
{
PLLineOffsetDryBelowDikeToeAtPolder = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.PlLineOffsetBelowDikeCrestMiddle))
{
PlLineOffsetBelowDikeCrestMiddle = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.PlLineOffsetFactorBelowShoulderCrest))
{
PlLineOffsetFactorBelowShoulderCrest = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.PlLineOffsetDryBelowDikeCrestMiddle))
{
PlLineOffsetDryBelowDikeCrestMiddle = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.PlLineOffsetDryFactorBelowShoulderCrest))
{
PlLineOffsetDryFactorBelowShoulderCrest = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.UsePlLineOffsetBelowDikeCrestMiddle))
{
UsePlLineOffsetBelowDikeCrestMiddle = Convert.ToBoolean(parameterValue);
}
if (parameterName.Equals(LocationParameterNames.UsePlLineOffsetFactorBelowShoulderCrest))
{
UsePlLineOffsetFactorBelowShoulderCrest = Convert.ToBoolean(parameterValue);
}
if (parameterName.Equals(LocationParameterNames.UsePlLineOffsetDryBelowDikeCrestMiddle))
{
UsePlLineOffsetDryBelowDikeCrestMiddle = Convert.ToBoolean(parameterValue);
}
if (parameterName.Equals(LocationParameterNames.UsePlLineOffsetDryFactorBelowShoulderCrest))
{
UsePlLineOffsetDryFactorBelowShoulderCrest = Convert.ToBoolean(parameterValue);
}
if (parameterName.Equals(LocationParameterNames.IntrusionVerticalWaterPressure))
{
IntrusionVerticalWaterPressure =
(IntrusionVerticalWaterPressureType)
Enum.Parse(typeof (IntrusionVerticalWaterPressureType), parameterValue);
}
if (parameterName.Equals(LocationParameterNames.StabilityShoulderGrowSlope))
{
StabilityShoulderGrowSlope = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.StabilityShoulderGrowDeltaX))
{
StabilityShoulderGrowDeltaX = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.StabilitySlopeAdaptionDeltaX))
{
StabilitySlopeAdaptionDeltaX = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.SheetPileLength))
{
SheetPileLength = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.RwBankProtectionBottomLevel))
{
RwBankProtectionBottomLevel = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.SheetPilePointX))
{
SheetPilePointX = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.SheetPilePointY))
{
SheetPilePointY = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.SheetPilePointZ))
{
SheetPilePointZ = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.IsUseOriginalPLLineAssignments))
{
IsUseOriginalPLLineAssignments = Convert.ToBoolean(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.TrafficLoad))
{
TrafficLoad = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.MinimalCircleDepth))
{
MinimalCircleDepth = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.LevelReductionInside))
{
LevelReductionInside = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.LevelReductionOutside))
{
LevelReductionOutside = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.LayerHeightDistribution))
{
LayerHeightDistribution = (DistributionType) Enum.Parse(typeof(DistributionType), parameterValue);
}
if (parameterName.Equals(LocationParameterNames.LayerHeightDeviation))
{
LayerHeightDeviation = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.DistanceToEntryPoint))
{
DistanceToEntryPoint = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.RequiredSafetyFactorStabilityInnerSlope))
{
ModelFactors.RequiredSafetyFactorStabilityInnerSlope = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.RequiredSafetyFactorStabilityOuterSlope))
{
ModelFactors.RequiredSafetyFactorStabilityOuterSlope = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.RequiredSafetyFactorPiping))
{
ModelFactors.RequiredSafetyFactorPiping = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.RequiredProbabilityOfFailureStabilityInnerslope))
{
ModelFactors.RequiredProbabilityOfFailureStabilityInnerslope = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.RequiredProbabilityOfFailureStabilityOuterslope))
{
ModelFactors.RequiredProbabilityOfFailureStabilityOuterslope = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.RequiredProbabilityOfFailurePiping))
{
ModelFactors.RequiredProbabilityOfFailurePiping = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.UpliftCriterionPiping))
{
ModelFactors.UpliftCriterionPiping = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.UpliftCriterionStability))
{
ModelFactors.UpliftCriterionStability = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.DetrimentFactor))
{
DetrimentFactor = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.StabilityZoneType))
{
StabilityZoneType = (MStabZonesType) Enum.Parse(typeof(MStabZonesType), parameterValue);
}
if (parameterName.Equals(LocationParameterNames.ForbiddenZoneFactor))
{
ForbiddenZoneFactor = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.ZoneAreaRestSlopeCrestWidth))
{
ZoneAreaRestSlopeCrestWidth = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.DikeTableHeight))
{
DikeTableHeight = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.SlopeDampingPiezometricHeightPolderSide))
{
SlopeDampingPiezometricHeightPolderSide = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.StabilityDesignMethod))
{
StabilityDesignMethod = (StabilityDesignMethod) Enum.Parse(typeof(StabilityDesignMethod), parameterValue);
}
if (parameterName.Equals(LocationParameterNames.SlopeAdaptionStartCotangent))
{
SlopeAdaptionStartCotangent = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.SlopeAdaptionEndCotangent))
{
SlopeAdaptionEndCotangent = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.SlopeAdaptionStepCotangent))
{
SlopeAdaptionStepCotangent = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.NewDepthDitch))
{
NewDepthDitch = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.NewDikeSlopeInside))
{
NewDikeSlopeInside = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.NewDikeSlopeOutside))
{
NewDikeSlopeOutside = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.NewDikeTopWidth))
{
NewDikeTopWidth = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.NewMaxHeightShoulderAsFraction))
{
NewMaxHeightShoulderAsFraction = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.NewMinDistanceDikeToeStartDitch))
{
NewMinDistanceDikeToeStartDitch = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.NewShoulderBaseSlope))
{
NewShoulderBaseSlope = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.NewShoulderTopSlope))
{
NewShoulderTopSlope = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.NewSlopeAngleDitch))
{
NewSlopeAngleDitch = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.NewWidthDitchBottom))
{
NewWidthDitchBottom = Convert.ToDouble(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.UseNewDikeSlopeInside))
{
UseNewDikeSlopeInside = Convert.ToBoolean(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.UseNewDikeSlopeOutside))
{
UseNewDikeSlopeOutside = Convert.ToBoolean(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.UseNewDikeTopWidth))
{
UseNewDikeTopWidth = Convert.ToBoolean(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.UseNewDitchDefinition))
{
UseNewDitchDefinition = Convert.ToBoolean(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.UseNewMaxHeightShoulderAsFraction))
{
UseNewMaxHeightShoulderAsFraction = Convert.ToBoolean(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.UseNewMinDistanceDikeToeStartDitch))
{
UseNewMinDistanceDikeToeStartDitch = Convert.ToBoolean(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.UseNewShoulderBaseSlope))
{
UseNewShoulderBaseSlope = Convert.ToBoolean(parameterValue, numberFormatInfo);
}
if (parameterName.Equals(LocationParameterNames.UseNewShoulderTopSlope))
{
UseNewShoulderTopSlope = Convert.ToBoolean(parameterValue, numberFormatInfo);
}
}
public ModelParametersForPLLines CreateModelParametersForPLLines()
{
return new ModelParametersForPLLines
{
PenetrationLength = PenetrationLength,
DampingFactorPL3 = DampingFactorPL3,
DampingFactorPL4 = DampingFactorPL4,
PLLineCreationMethod = PLLineCreationMethod
};
}
private bool IsDesign()
{
bool isDesign = (DamProjectType == DamProjectType.Design);
return isDesign;
}
private bool ArePlLineCreationExpertKnowledgeParametersNeeded()
{
bool arePlLineCreationExpertKnowledgeParametersNeeded = PLLineCreationMethod ==
PLLineCreationMethod.ExpertKnowledgeRRD ||
PLLineCreationMethod ==
PLLineCreationMethod.GaugesWithFallbackToExpertKnowledgeRRD;
return arePlLineCreationExpertKnowledgeParametersNeeded;
}
public override string ToString()
{
return Name;
/* StringBuilder sb = new StringBuilder();
sb.Append(this.Name);
if (this.Segment != null)
sb.Append(String.Format(" @ Segment {0}", this.Segment.Name));
if (this.SurfaceLine != null)
sb.Append(String.Format(" with {0})", this.SurfaceLine.Name));
sb.Append(String.Format(" | X={0}, Y={1}, PolderLevel={2:F2}, HeadPL2={3:F2}, HeadPl3={4:F2}", this.XRd, this.YRd, this.PolderLevel, this.HeadPL2, this.HeadPl3));
return sb.ToString();*/
}
}
}