Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructure.cs
===================================================================
diff -u -r9e3639e810a22019da1a9fdf5aa5c433a43520c1 -rf9e4f420b403e6417f5dc2ba6d7beab9424baf89
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructure.cs (.../ClosingStructure.cs) (revision 9e3639e810a22019da1a9fdf5aa5c433a43520c1)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Data/ClosingStructure.cs (.../ClosingStructure.cs) (revision f9e4f420b403e6417f5dc2ba6d7beab9424baf89)
@@ -21,9 +21,9 @@
using System;
using Core.Common.Base.Data;
-using Core.Common.Base.Geometry;
using Ringtoets.Common.Data;
using Ringtoets.Common.Data.Probabilistics;
+using BaseConstructionProperties = Ringtoets.Common.Data.StructureBase.ConstructionProperties;
namespace Ringtoets.ClosingStructures.Data
{
@@ -33,108 +33,64 @@
public class ClosingStructure : StructureBase
{
///
- /// Creates a new instance of .
+ /// Initializes a new instance of the class.
///
- /// The name of the closing structure.
- /// The identifier of the closing structure.
- /// The location of the closing structure.
- /// The mean of the storage area of the closing structure.
- /// The coefficient of variation of the storage area of the closing structure.
- /// The mean of the allowed increase of level for storage of the closing structure.
- /// The standard deviation of the allowed increase of level for storage of the closing structure.
- /// The orientation of the closing structure, relative to north.
- /// The mean of the width of the flow apertures of the closing structure.
- /// The coefficient of variation of the width of the flow apertures of the closing structure.
- /// The mean crest level of the opened closing structure.
- /// The standard deviation of the crest level of the opened closing structure.
- /// The mean interior water level of the closing structure.
- /// The standard deviation of the interior water level of the closing structure.
- /// The mean threshold height of the opened closure structure.
- /// The standard deviation of the threshold height of the opened closure structure.
- /// The mean area of the flow aperture of the closing structure.
- /// The standard deviation of the area of the flow aperture of the closing structure.
- /// The mean critical overtopping discharge of the closing structure.
- /// The coefficient of variation of critical overtopping discharge of the closing structure.
- /// The mean flow width of the closing structure at the bottom protection.
- /// The standard deviation of the flow width of the closing structure at the bottom protection.
- /// The probability of the closing structure being open before flooding.
- /// The probability of failing to close the closing structure.
- /// The number of identical apertures of the closing structure.
- /// The probability of failing to repair a failed closure of the closing structure.
- /// The type of closing structure inflow model.
- /// Thrown when or is null
- /// , empty or consists of whitespace.
- /// Thrown when is null.
- /// When any stochastic variable parameter is out of its valid domain.
- public ClosingStructure(string name, string id, Point2D location,
- double storageStructureAreaMean, double storageStructureAreaCoefficientOfVariation,
- double allowedLevelIncreaseStorageMean, double allowedLevelIncreaseStorageStandardDeviation,
- double structureNormalOrientation,
- double widthFlowAperturesMean, double widthFlowAperturesCoefficientOfVariation,
- double levelCrestStructureNotClosingMean, double levelCrestStructureNotClosingStandardDeviation,
- double insideWaterLevelMean, double insideWaterLevelStandardDeviation,
- double thresholdHeightOpenWeirMean, double thresholdHeightOpenWeirStandardDeviation,
- double areaFlowAperturesMean, double areaFlowAperturesStandardDeviation,
- double criticalOvertoppingDischargeMean, double criticalOvertoppingDischargeCoefficientOfVariation,
- double flowWidthAtBottomProtectionMean, double flowWidthAtBottomProtectionStandardDeviation,
- double probabilityOpenStructureBeforeFlooding,
- double failureProbabilityOpenStructure,
- int identicalApertures,
- double failureProbabilityReparation,
- ClosingStructureInflowModelType inflowModelType
- )
- : base(name, id, location, structureNormalOrientation)
+ /// The construction properties.
+ /// Thrown when
+ /// or is null , empty or consists of whitespace.
+ /// Thrown when is null.
+ public ClosingStructure(ConstructionProperties constructionProperties) : base(constructionProperties)
{
StorageStructureArea = new VariationCoefficientLogNormalDistribution(2)
{
- Mean = (RoundedDouble) storageStructureAreaMean,
- CoefficientOfVariation = (RoundedDouble) storageStructureAreaCoefficientOfVariation
+ Mean = constructionProperties.StorageStructureArea.Mean,
+ CoefficientOfVariation = constructionProperties.StorageStructureArea.CoefficientOfVariation
};
AllowedLevelIncreaseStorage = new LogNormalDistribution(2)
{
- Mean = (RoundedDouble) allowedLevelIncreaseStorageMean,
- StandardDeviation = (RoundedDouble) allowedLevelIncreaseStorageStandardDeviation
+ Mean = constructionProperties.AllowedLevelIncreaseStorage.Mean,
+ StandardDeviation = constructionProperties.AllowedLevelIncreaseStorage.StandardDeviation
};
WidthFlowApertures = new VariationCoefficientNormalDistribution(2)
{
- Mean = (RoundedDouble) widthFlowAperturesMean,
- CoefficientOfVariation = (RoundedDouble) widthFlowAperturesCoefficientOfVariation
+ Mean = constructionProperties.WidthFlowApertures.Mean,
+ CoefficientOfVariation = constructionProperties.WidthFlowApertures.CoefficientOfVariation
};
LevelCrestStructureNotClosing = new NormalDistribution(2)
{
- Mean = (RoundedDouble) levelCrestStructureNotClosingMean,
- StandardDeviation = (RoundedDouble) levelCrestStructureNotClosingStandardDeviation
+ Mean = constructionProperties.LevelCrestStructureNotClosing.Mean,
+ StandardDeviation = constructionProperties.LevelCrestStructureNotClosing.StandardDeviation
};
InsideWaterLevel = new NormalDistribution(2)
{
- Mean = (RoundedDouble) insideWaterLevelMean,
- StandardDeviation = (RoundedDouble) insideWaterLevelStandardDeviation
+ Mean = constructionProperties.InsideWaterLevel.Mean,
+ StandardDeviation = constructionProperties.InsideWaterLevel.StandardDeviation
};
ThresholdHeightOpenWeir = new NormalDistribution(2)
{
- Mean = (RoundedDouble) thresholdHeightOpenWeirMean,
- StandardDeviation = (RoundedDouble) thresholdHeightOpenWeirStandardDeviation
+ Mean = constructionProperties.ThresholdHeightOpenWeir.Mean,
+ StandardDeviation = constructionProperties.ThresholdHeightOpenWeir.StandardDeviation
};
AreaFlowApertures = new LogNormalDistribution(2)
{
- Mean = (RoundedDouble) areaFlowAperturesMean,
- StandardDeviation = (RoundedDouble) areaFlowAperturesStandardDeviation
+ Mean = constructionProperties.AreaFlowApertures.Mean,
+ StandardDeviation = constructionProperties.AreaFlowApertures.StandardDeviation
};
CriticalOvertoppingDischarge = new VariationCoefficientLogNormalDistribution(2)
{
- Mean = (RoundedDouble) criticalOvertoppingDischargeMean,
- CoefficientOfVariation = (RoundedDouble) criticalOvertoppingDischargeCoefficientOfVariation
+ Mean = constructionProperties.CriticalOvertoppingDischarge.Mean,
+ CoefficientOfVariation = constructionProperties.CriticalOvertoppingDischarge.CoefficientOfVariation
};
FlowWidthAtBottomProtection = new LogNormalDistribution(2)
{
- Mean = (RoundedDouble) flowWidthAtBottomProtectionMean,
- StandardDeviation = (RoundedDouble) flowWidthAtBottomProtectionStandardDeviation
+ Mean = constructionProperties.FlowWidthAtBottomProtection.Mean,
+ StandardDeviation = constructionProperties.FlowWidthAtBottomProtection.StandardDeviation
};
- ProbabilityOpenStructureBeforeFlooding = new RoundedDouble(2, probabilityOpenStructureBeforeFlooding);
- FailureProbabilityOpenStructure = new RoundedDouble(2, failureProbabilityOpenStructure);
- IdenticalApertures = identicalApertures;
- FailureProbabilityReparation = new RoundedDouble(2, failureProbabilityReparation);
- InflowModelType = inflowModelType;
+ ProbabilityOpenStructureBeforeFlooding = new RoundedDouble(2, constructionProperties.ProbabilityOpenStructureBeforeFlooding);
+ FailureProbabilityOpenStructure = new RoundedDouble(2, constructionProperties.FailureProbabilityOpenStructure);
+ IdenticalApertures = constructionProperties.IdenticalApertures;
+ FailureProbabilityReparation = new RoundedDouble(2, constructionProperties.FailureProbabilityReparation);
+ InflowModelType = constructionProperties.InflowModelType;
}
///
@@ -206,5 +162,97 @@
/// Gets the type of closing structure inflow model.
///
public ClosingStructureInflowModelType InflowModelType { get; private set; }
+
+ ///
+ /// Class holding the various construction parameters for .
+ ///
+ public new class ConstructionProperties : BaseConstructionProperties
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ConstructionProperties()
+ {
+ StorageStructureArea = new VariationCoefficientLogNormalDistribution(2);
+ AllowedLevelIncreaseStorage = new LogNormalDistribution(2);
+ WidthFlowApertures = new VariationCoefficientNormalDistribution(2);
+ LevelCrestStructureNotClosing = new NormalDistribution(2);
+ InsideWaterLevel = new NormalDistribution(2);
+ ThresholdHeightOpenWeir = new NormalDistribution(2);
+ AreaFlowApertures = new LogNormalDistribution(2);
+ CriticalOvertoppingDischarge = new VariationCoefficientLogNormalDistribution(2);
+ FlowWidthAtBottomProtection = new LogNormalDistribution(2);
+ }
+
+ ///
+ /// Gets the storage area of the closing structure.
+ ///
+ public VariationCoefficientLogNormalDistribution StorageStructureArea { get; private set; }
+
+ ///
+ /// Gets the allowed increase of level for storage of the closing structure.
+ ///
+ public LogNormalDistribution AllowedLevelIncreaseStorage { get; private set; }
+
+ ///
+ /// Gets the width of the flow apertures of the closing structure.
+ ///
+ public VariationCoefficientNormalDistribution WidthFlowApertures { get; private set; }
+
+ ///
+ /// Gets the crest level of the opened closing structure.
+ ///
+ public NormalDistribution LevelCrestStructureNotClosing { get; private set; }
+
+ ///
+ /// Gets the interior water level of the closing structure.
+ ///
+ public NormalDistribution InsideWaterLevel { get; private set; }
+
+ ///
+ /// Gets the threshold height of the opened closing structure.
+ ///
+ public NormalDistribution ThresholdHeightOpenWeir { get; private set; }
+
+ ///
+ /// Gets the area of the flow aperture of the closing structure.
+ ///
+ public LogNormalDistribution AreaFlowApertures { get; private set; }
+
+ ///
+ /// Gets the critical overtopping discharge of the closing structure.
+ ///
+ public VariationCoefficientLogNormalDistribution CriticalOvertoppingDischarge { get; private set; }
+
+ ///
+ /// Gets the flow width of the closing structure at the bottom protection.
+ ///
+ public LogNormalDistribution FlowWidthAtBottomProtection { get; private set; }
+
+ ///
+ /// Gets the probability of the closing structure being open before flooding.
+ ///
+ public double ProbabilityOpenStructureBeforeFlooding { get; set; }
+
+ ///
+ /// Gets the probability of failing to close the closing structure.
+ ///
+ public double FailureProbabilityOpenStructure { get; set; }
+
+ ///
+ /// Gets the number of identical apertures of the closing structure.
+ ///
+ public int IdenticalApertures { get; set; }
+
+ ///
+ /// Gets the probability of failing to repair a failed closure of the closing structure.
+ ///
+ public double FailureProbabilityReparation { get; set; }
+
+ ///
+ /// Gets the type of closing structure inflow model.
+ ///
+ public ClosingStructureInflowModelType InflowModelType { get; set; }
+ }
}
}
\ No newline at end of file