// 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.ClosingStructures.Data
{
///
/// Definition of a closing structure for the
///
public class ClosingStructure : StructureBase
{
///
/// Creates a new instance of .
///
/// 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)
{
StorageStructureArea = new VariationCoefficientLogNormalDistribution(2)
{
Mean = (RoundedDouble) storageStructureAreaMean,
CoefficientOfVariation = (RoundedDouble) storageStructureAreaCoefficientOfVariation
};
AllowedLevelIncreaseStorage = new LogNormalDistribution(2)
{
Mean = (RoundedDouble) allowedLevelIncreaseStorageMean,
StandardDeviation = (RoundedDouble) allowedLevelIncreaseStorageStandardDeviation
};
WidthFlowApertures = new VariationCoefficientNormalDistribution(2)
{
Mean = (RoundedDouble) widthFlowAperturesMean,
CoefficientOfVariation = (RoundedDouble) widthFlowAperturesCoefficientOfVariation
};
LevelCrestStructureNotClosing = new NormalDistribution(2)
{
Mean = (RoundedDouble) levelCrestStructureNotClosingMean,
StandardDeviation = (RoundedDouble) levelCrestStructureNotClosingStandardDeviation
};
InsideWaterLevel = new NormalDistribution(2)
{
Mean = (RoundedDouble) insideWaterLevelMean,
StandardDeviation = (RoundedDouble) insideWaterLevelStandardDeviation
};
ThresholdHeightOpenWeir = new NormalDistribution(2)
{
Mean = (RoundedDouble) thresholdHeightOpenWeirMean,
StandardDeviation = (RoundedDouble) thresholdHeightOpenWeirStandardDeviation
};
AreaFlowApertures = new LogNormalDistribution(2)
{
Mean = (RoundedDouble) areaFlowAperturesMean,
StandardDeviation = (RoundedDouble) areaFlowAperturesStandardDeviation
};
CriticalOvertoppingDischarge = new VariationCoefficientLogNormalDistribution(2)
{
Mean = (RoundedDouble) criticalOvertoppingDischargeMean,
CoefficientOfVariation = (RoundedDouble) criticalOvertoppingDischargeCoefficientOfVariation
};
FlowWidthAtBottomProtection = new LogNormalDistribution(2)
{
Mean = (RoundedDouble) flowWidthAtBottomProtectionMean,
StandardDeviation = (RoundedDouble) flowWidthAtBottomProtectionStandardDeviation
};
ProbabilityOpenStructureBeforeFlooding = new RoundedDouble(2, probabilityOpenStructureBeforeFlooding);
FailureProbabilityOpenStructure = new RoundedDouble(2, failureProbabilityOpenStructure);
IdenticalApertures = identicalApertures;
FailureProbabilityReparation = new RoundedDouble(2, failureProbabilityReparation);
InflowModelType = inflowModelType;
}
///
/// 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 RoundedDouble ProbabilityOpenStructureBeforeFlooding { get; private set; }
///
/// Gets the probability of failing to close the closing structure.
///
public RoundedDouble FailureProbabilityOpenStructure { get; private set; }
///
/// Gets the number of identical apertures of the closing structure.
///
public int IdenticalApertures { get; private set; }
///
/// Gets the probability of failing to repair a failed closure of the closing structure.
///
public RoundedDouble FailureProbabilityReparation { get; private set; }
///
/// Gets the type of closing structure inflow model.
///
public ClosingStructureInflowModelType InflowModelType { get; private set; }
}
}