Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructure.cs =================================================================== diff -u -r3500ad219742fca6d4a9057e8c92435dde8d8fc1 -r423010168fe01b2373e9be55f047659911e670f5 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructure.cs (.../HeightStructure.cs) (revision 3500ad219742fca6d4a9057e8c92435dde8d8fc1) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructure.cs (.../HeightStructure.cs) (revision 423010168fe01b2373e9be55f047659911e670f5) @@ -19,12 +19,154 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; +using Core.Common.Base.Data; +using Core.Common.Base.Geometry; +using Ringtoets.Common.Data.Probabilistics; + namespace Ringtoets.HeightStructures.Data { /// /// Definition of a height structure for the . /// public class HeightStructure { + /// + /// Creates a new instance of . + /// + /// 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 standard deviation of critical overtopping discharge of the height structure. + /// The mean flow apertures width of the height structure. + /// The standard deviation 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 standard deviation of storage area of the height structure. + /// The mean allowable increase of level for storage of the height structure. + /// The standard deviation of allowable increase of level for storage of the height structure. + /// Thrown when or is null. + /// Thrown when is null. + public HeightStructure(string name, string id, Point2D location, + double orientationOfTheNormalOfTheStructure, + double levelOfCrestOfStructureMean, double levelOfCrestOfStructureStandardDeviation, + double flowWidthAtBottomProtectionMean, double flowWidthAtBottomProtectionStandardDeviation, + double criticalOvertoppingDischargeMean, double criticalOvertoppingDischargeStandardDeviation, + double widthOfFlowAperturesMean, double widthOfFlowAperturesStandardDeviation, + double failureProbabilityOfStructureGivenErosion, + double storageStructureAreaMean, double storageStructureAreaStandardDeviation, + double allowableIncreaseOfLevelForStorageMean, double allowableIncreaseOfLevelForStorageStandardDeviation + ) + { + if (string.IsNullOrWhiteSpace(name)) + { + throw new ArgumentException("name"); + } + if (string.IsNullOrWhiteSpace(id)) + { + throw new ArgumentException("id"); + } + if (location == null) + { + throw new ArgumentNullException("location"); + } + + Name = name; + Id = id; + Location = location; + OrientationOfTheNormalOfTheStructure = new RoundedDouble(2, orientationOfTheNormalOfTheStructure); + LevelOfCrestOfStructure = new NormalDistribution(2) + { + Mean = new RoundedDouble(2, levelOfCrestOfStructureMean), + StandardDeviation = new RoundedDouble(2, levelOfCrestOfStructureStandardDeviation) + }; + FlowWidthAtBottomProtection = new LogNormalDistribution(2) + { + Mean = new RoundedDouble(2, flowWidthAtBottomProtectionMean), + StandardDeviation = new RoundedDouble(2, flowWidthAtBottomProtectionStandardDeviation) + }; + CriticalOvertoppingDischarge = new LogNormalDistribution(2) + { + Mean = new RoundedDouble(2, criticalOvertoppingDischargeMean), + StandardDeviation = new RoundedDouble(2, criticalOvertoppingDischargeStandardDeviation) + }; + WidthOfFlowApertures = new NormalDistribution(2) + { + Mean = new RoundedDouble(2, widthOfFlowAperturesMean), + StandardDeviation = new RoundedDouble(2, widthOfFlowAperturesStandardDeviation) + }; + FailureProbabilityOfStructureGivenErosion = failureProbabilityOfStructureGivenErosion; + StorageStructureArea = new LogNormalDistribution(2) + { + Mean = new RoundedDouble(2, storageStructureAreaMean), + StandardDeviation = new RoundedDouble(2, storageStructureAreaStandardDeviation) + }; + AllowableIncreaseOfLevelForStorage = new LogNormalDistribution(2) + { + Mean = new RoundedDouble(2, allowableIncreaseOfLevelForStorageMean), + StandardDeviation = new RoundedDouble(2, allowableIncreaseOfLevelForStorageStandardDeviation) + }; + } + + /// + /// Gets the name of the height structure. + /// + public string Name { get; private set; } + + /// + /// Gets the identifier of the height structure. + /// + public string Id { get; private set; } + + /// + /// Gets the location of the height structure. + /// + public Point2D Location { get; private set; } + + /// + /// Gets the orientation of the height structure, relative to north. + /// + public RoundedDouble OrientationOfTheNormalOfTheStructure { get; private set; } + + /// + /// Gets the crest level of the height structure. + /// + public NormalDistribution LevelOfCrestOfStructure { 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 LogNormalDistribution CriticalOvertoppingDischarge { get; private set; } + + /// + /// Gets the flow apertures width of the height structure. + /// + public NormalDistribution WidthOfFlowApertures { get; private set; } + + /// + /// Gets the failure probability of the height structure, given erosion. + /// + public double FailureProbabilityOfStructureGivenErosion { get; private set; } + + /// + /// Gets the storage area of the height structure. + /// + public LogNormalDistribution StorageStructureArea { get; private set; } + + /// + /// Gets the allowable increase of level for storage of the height structure. + /// + public LogNormalDistribution AllowableIncreaseOfLevelForStorage { get; private set; } } -} +} \ No newline at end of file