Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructure.cs =================================================================== diff -u -rfca049745871c8352ef2968048fdc0cca0c647e0 -r3e3087bd9c43ca5a3910438b3c9daf0defcb09bf --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructure.cs (.../HeightStructure.cs) (revision fca049745871c8352ef2968048fdc0cca0c647e0) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructure.cs (.../HeightStructure.cs) (revision 3e3087bd9c43ca5a3910438b3c9daf0defcb09bf) @@ -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.HeightStructures.Data { @@ -33,70 +33,46 @@ public class HeightStructure : StructureBase { /// - /// Creates a new instance of . + /// Initializes a new instance of the class. /// - /// The name of the height structure. - /// The identifier of the height structure. - /// The location of the height structure. - /// The orientation of the height structure, relative to north. - /// The mean crest level of the height structure. - /// The standard deviation of the crest level of the height structure. - /// The mean flow width of the height structure at the bottom protection. - /// The standard deviation of the flow width of the height structure at the bottom protection. - /// The mean critical overtopping discharge of the height structure. - /// The coefficient of variation of critical overtopping discharge of the height structure. - /// The mean flow apertures width of the height structure. - /// The coefficient of variation of flow apertures width of the height structure. - /// The failure probability of the height structure, given erosion. - /// The mean storage area of the height structure. - /// The coefficient of variation of storage area of the height structure. - /// The mean allowed increase of level for storage of the height structure. - /// The standard deviation of allowed increase of level for storage of the height structure. - /// Thrown when or is null - /// , empty or consists of whitespace. - /// Thrown when is null. - /// Thrown when any parameter is out of range. - public HeightStructure(string name, string id, Point2D location, - double structureNormalOrientation, - double levelCrestStructureMean, double levelCrestStructureStandardDeviation, - double flowWidthAtBottomProtectionMean, double flowWidthAtBottomProtectionStandardDeviation, - double criticalOvertoppingDischargeMean, double criticalOvertoppingDischargeCoefficientOfVariation, - double widthFlowAperturesMean, double widthFlowAperturesCoefficientOfVariation, - double failureProbabilityStructureWithErosion, - double storageStructureAreaMean, double storageStructureAreaCoefficientOfVariation, - double allowedLevelIncreaseStorageMean, double allowedLevelIncreaseStorageStandardDeviation) - : base(name, id, location, structureNormalOrientation) + /// The construction properties. + /// Thrown when + /// or is null , empty or consists of whitespace. + /// Thrown when is null. + /// When any stochastic variable parameter + /// is out if its valid domain. + public HeightStructure(ConstructionProperties constructionProperties) : base(constructionProperties) { LevelCrestStructure = new NormalDistribution(2) { - Mean = new RoundedDouble(2, levelCrestStructureMean), - StandardDeviation = new RoundedDouble(2, levelCrestStructureStandardDeviation) + Mean = new RoundedDouble(2, constructionProperties.LevelCrestStructure.Mean), + StandardDeviation = new RoundedDouble(2, constructionProperties.LevelCrestStructure.StandardDeviation) }; FlowWidthAtBottomProtection = new LogNormalDistribution(2) { - Mean = new RoundedDouble(2, flowWidthAtBottomProtectionMean), - StandardDeviation = new RoundedDouble(2, flowWidthAtBottomProtectionStandardDeviation) + Mean = new RoundedDouble(2, constructionProperties.FlowWidthAtBottomProtection.Mean), + StandardDeviation = new RoundedDouble(2, constructionProperties.FlowWidthAtBottomProtection.StandardDeviation) }; CriticalOvertoppingDischarge = new VariationCoefficientLogNormalDistribution(2) { - Mean = new RoundedDouble(2, criticalOvertoppingDischargeMean), - CoefficientOfVariation = new RoundedDouble(2, criticalOvertoppingDischargeCoefficientOfVariation) + Mean = new RoundedDouble(2, constructionProperties.CriticalOvertoppingDischarge.Mean), + CoefficientOfVariation = new RoundedDouble(2, constructionProperties.CriticalOvertoppingDischarge.CoefficientOfVariation) }; WidthFlowApertures = new VariationCoefficientNormalDistribution(2) { - Mean = new RoundedDouble(2, widthFlowAperturesMean), - CoefficientOfVariation = new RoundedDouble(2, widthFlowAperturesCoefficientOfVariation) + Mean = new RoundedDouble(2, constructionProperties.WidthFlowApertures.Mean), + CoefficientOfVariation = new RoundedDouble(2, constructionProperties.WidthFlowApertures.CoefficientOfVariation) }; - FailureProbabilityStructureWithErosion = failureProbabilityStructureWithErosion; + FailureProbabilityStructureWithErosion = constructionProperties.FailureProbabilityStructureWithErosion; StorageStructureArea = new VariationCoefficientLogNormalDistribution(2) { - Mean = new RoundedDouble(2, storageStructureAreaMean), - CoefficientOfVariation = new RoundedDouble(2, storageStructureAreaCoefficientOfVariation) + Mean = new RoundedDouble(2, constructionProperties.StorageStructureArea.Mean), + CoefficientOfVariation = new RoundedDouble(2, constructionProperties.StorageStructureArea.CoefficientOfVariation) }; AllowedLevelIncreaseStorage = new LogNormalDistribution(2) { - Mean = new RoundedDouble(2, allowedLevelIncreaseStorageMean), - StandardDeviation = new RoundedDouble(2, allowedLevelIncreaseStorageStandardDeviation) + Mean = new RoundedDouble(2, constructionProperties.AllowedLevelIncreaseStorage.Mean), + StandardDeviation = new RoundedDouble(2, constructionProperties.AllowedLevelIncreaseStorage.StandardDeviation) }; } @@ -134,5 +110,59 @@ /// Gets the allowed increase of level for storage of the height structure. /// public LogNormalDistribution AllowedLevelIncreaseStorage { get; private set; } + + /// + /// Class holding the various construction parameters for . + /// + public new class ConstructionProperties : BaseConstructionProperties + { + /// + /// Initializes a new instance of the class. + /// + public ConstructionProperties() + { + LevelCrestStructure = new NormalDistribution(2); + FlowWidthAtBottomProtection = new LogNormalDistribution(2); + CriticalOvertoppingDischarge = new VariationCoefficientLogNormalDistribution(2); + WidthFlowApertures = new VariationCoefficientNormalDistribution(2); + StorageStructureArea = new VariationCoefficientLogNormalDistribution(2); + AllowedLevelIncreaseStorage = new LogNormalDistribution(2); + } + + /// + /// Gets the crest level of the height structure. + /// + public NormalDistribution LevelCrestStructure { get; private set; } + + /// + /// Gets the flow width of the height structure at the bottom protection. + /// + public LogNormalDistribution FlowWidthAtBottomProtection { get; private set; } + + /// + /// Gets the critical overtopping discharge of the height structure. + /// + public VariationCoefficientLogNormalDistribution CriticalOvertoppingDischarge { get; private set; } + + /// + /// Gets the flow apertures width of the height structure. + /// + public VariationCoefficientNormalDistribution WidthFlowApertures { get; private set; } + + /// + /// Gets the failure probability of the height structure, given erosion. + /// + public double FailureProbabilityStructureWithErosion { get; set; } + + /// + /// Gets the storage area of the height structure. + /// + public VariationCoefficientLogNormalDistribution StorageStructureArea { get; private set; } + + /// + /// Gets the allowed increase of level for storage of the height structure. + /// + public LogNormalDistribution AllowedLevelIncreaseStorage { get; private set; } + } } } \ No newline at end of file