// Copyright (C) Stichting Deltares 2016. All rights reserved.
//
// This file is part of Ringtoets.
//
// Ringtoets is free software: you can redistribute it and/or modify
// it under the terms of the GNU 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 General Public License for more details.
//
// You should have received a copy of the GNU 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 Core.Common.Base.Data;
using Core.Common.Base.Geometry;
using Ringtoets.Common.Data;
using Ringtoets.Common.Data.Probabilistics;
namespace Ringtoets.HeightStructures.Data
{
///
/// Definition of a height structure for the .
///
public class HeightStructure : StructureBase
{
///
/// 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 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 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
/// , 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 = new RoundedDouble(2, structureNormalOrientation);
LevelCrestStructure = new NormalDistribution(2)
{
Mean = new RoundedDouble(2, levelCrestStructureMean),
StandardDeviation = new RoundedDouble(2, levelCrestStructureStandardDeviation)
};
FlowWidthAtBottomProtection = new LogNormalDistribution(2)
{
Mean = new RoundedDouble(2, flowWidthAtBottomProtectionMean),
StandardDeviation = new RoundedDouble(2, flowWidthAtBottomProtectionStandardDeviation)
};
CriticalOvertoppingDischarge = new VariationCoefficientLogNormalDistribution(2)
{
Mean = new RoundedDouble(2, criticalOvertoppingDischargeMean),
CoefficientOfVariation = new RoundedDouble(2, criticalOvertoppingDischargeCoefficientOfVariation)
};
WidthFlowApertures = new VariationCoefficientNormalDistribution(2)
{
Mean = new RoundedDouble(2, widthFlowAperturesMean),
CoefficientOfVariation = new RoundedDouble(2, widthFlowAperturesCoefficientOfVariation)
};
FailureProbabilityStructureWithErosion = failureProbabilityStructureWithErosion;
StorageStructureArea = new VariationCoefficientLogNormalDistribution(2)
{
Mean = new RoundedDouble(2, storageStructureAreaMean),
CoefficientOfVariation = new RoundedDouble(2, storageStructureAreaCoefficientOfVariation)
};
AllowedLevelIncreaseStorage = new LogNormalDistribution(2)
{
Mean = new RoundedDouble(2, allowedLevelIncreaseStorageMean),
StandardDeviation = new RoundedDouble(2, allowedLevelIncreaseStorageStandardDeviation)
};
}
///
/// Gets the orientation of the height structure, relative to north.
///
public RoundedDouble StructureNormalOrientation { get; private set; }
///
/// 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; private set; }
///
/// Gets the storage area of the height structure.
///
public VariationCoefficientLogNormalDistribution StorageStructureArea { get; private set; }
///
/// Gets the allowable increase of level for storage of the height structure.
///
public LogNormalDistribution AllowedLevelIncreaseStorage { get; private set; }
}
}