// 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.StabilityPointStructures.Data
{
///
/// Definition of a stability point structure for the .
///
public class StabilityPointStructure : StructureBase
{
///
/// Creates a new instance of .
///
/// The name of the structure.
/// The identifier of the structure.
/// The location of the structure.
/// The orientation of the stability point structure, relative to north.
/// The mean of the storage area of the stability point structure.
/// The coefficient of variation of the storage area of the stability point structure.
/// The mean of the allowed increase of level for storage of the stability point structure.
/// The standard deviation of the allowed increase of level for storage of the stability point structure.
/// The mean of the width of the flow apertures of the stability point structure.
/// The coefficient of variation of the width of the flow apertures of the stability point structure.
/// The mean interior water level of the stability point structure.
/// The standard deviation of the interior water level of the stability point structure.
/// The mean threshold height of the opened stability point structure.
/// The standard deviation of the threshold height of the opened stability point structure.
/// The mean critical overtopping discharge of the stability point structure.
/// The coefficient of variation of critical overtopping discharge of the stability point structure.
/// The mean flow width of the stability point structure at the bottom protection.
/// The standard deviation of the flow width of the stability point structure at the bottom protection.
/// The mean constructive strength of the linear load model of the stability point structure.
/// The coefficient of variation of the constructive strength of the linear load model of the stability point structure.
/// The mean constructive strength of the quadratic load model of the stability point structure.
/// The coefficient of variation of the constructive strength of the quadratic load model of the stability point structure.
/// The mean bank width of the stability point structure.
/// The standard deviation of the bank width of the stability point structure.
/// The mean inside water level failure construction of the stability point structure.
/// The standard deviation of the inside water level failure construction of the stability point structure.
/// The evaluation level of the stability point structure.
/// The mean crest level of the stability point structure.
/// The standard deviation of the crest level of the stability point structure.
/// The vertical distance of the stability point structure.
/// The probability of failing to repair a failed closure of the stability point structure.
/// The mean failure collision energy of the stability point structure.
/// The coefficient of variation of the failure collision energy of the stability point structure.
/// The mean mass of the ship.
/// The coefficient of variation of the mass of the ship.
/// The mean velocity of the ship.
/// The coefficient of variation of the velocity of the ship.
/// Number of levellings per year.
/// The chance per levelling at a collision with the second retaining structure.
/// The mean maximum flow velocity at which the structure is closable.
/// The standard deviation of the maximum flow velocity at which the structure is closable.
/// The mean stability properties of the linear model of the stability point structure.
/// The coefficient of variation of the stability properties of the linear model of the stability point structure.
/// The mean stability properties of the quadratic model of the stability point structure.
/// The coefficient of variation of the stability properties of the quadratic model of the stability point structure.
/// The mean area of the flow aperture of the stability point structure.
/// The standard deviation of the area of the flow aperture of the stability point structure.
/// The type of stability point structure.
/// 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 StabilityPointStructure(string name, string id, Point2D location,
double structureNormalOrientation,
double storageStructureAreaMean, double storageStructureAreaCoefficientOfVariation,
double allowedLevelIncreaseStorageMean, double allowedLevelIncreaseStorageStandardDeviation,
double widthFlowAperturesMean, double widthFlowAperturesCoefficientOfVariation,
double insideWaterLevelMean, double insideWaterLevelStandardDeviation,
double thresholdHeightOpenWeirMean, double thresholdHeightOpenWeirStandardDeviation,
double criticalOvertoppingDischargeMean, double criticalOvertoppingDischargeCoefficientOfVariation,
double flowWidthAtBottomProtectionMean, double flowWidthAtBottomProtectionStandardDeviation,
double constructiveStrengthLinearModelMean, double constructiveStrengthLinearModelCoefficientOfVariation,
double constructiveStrengthQuadraticModelMean, double constructiveStrengthQuadraticModelCoefficientOfVariation,
double bankWidthMean, double bankWidthStandardDeviation,
double insideWaterLevelFailureConstructionMean, double insideWaterLevelFailureConstructionStandardDeviation,
double evaluationLevel,
double levelCrestStructureMean, double levelCrestStructureStandardDeviation,
double verticalDistance,
double failureProbabilityReparation,
double failureCollisionEnergyMean, double failureCollisionEnergyCoefficientOfVariation,
double shipMassMean, double shipMassCoefficientOfVariation,
double shipVelocityMean, double shipVelocityCoefficientOfVariation,
int levellingsPerYear,
double collisionChanceSecondRetainingStructurePerLevelling,
double flowVelocityStructureClosableMean, double flowVelocityStructureClosableStandarDeviation,
double stabilityLinearModelMean, double stabilityLinearModelCoefficientOfVariation,
double stabilityQuadraticModelMean, double stabilityQuadraticModelCoefficientOfVariation,
double areaFlowAperturesMean, double areaFlowAperturesStandardDeviation,
StabilityPointStructureType inflowModel
)
: 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
};
InsideWaterLevel = new NormalDistribution(2)
{
Mean = (RoundedDouble) insideWaterLevelMean,
StandardDeviation = (RoundedDouble) insideWaterLevelStandardDeviation
};
ThresholdHeightOpenWeir = new NormalDistribution(2)
{
Mean = (RoundedDouble) thresholdHeightOpenWeirMean,
StandardDeviation = (RoundedDouble) thresholdHeightOpenWeirStandardDeviation
};
CriticalOvertoppingDischarge = new VariationCoefficientLogNormalDistribution(2)
{
Mean = (RoundedDouble) criticalOvertoppingDischargeMean,
CoefficientOfVariation = (RoundedDouble) criticalOvertoppingDischargeCoefficientOfVariation
};
FlowWidthAtBottomProtection = new LogNormalDistribution(2)
{
Mean = (RoundedDouble) flowWidthAtBottomProtectionMean,
StandardDeviation = (RoundedDouble) flowWidthAtBottomProtectionStandardDeviation
};
ConstructiveStrengthLinearModel = new VariationCoefficientLogNormalDistribution(2)
{
Mean = (RoundedDouble) constructiveStrengthLinearModelMean,
CoefficientOfVariation = (RoundedDouble) constructiveStrengthLinearModelCoefficientOfVariation
};
ConstructiveStrengthQuadraticModel = new VariationCoefficientLogNormalDistribution(2)
{
Mean = (RoundedDouble) constructiveStrengthQuadraticModelMean,
CoefficientOfVariation = (RoundedDouble) constructiveStrengthQuadraticModelCoefficientOfVariation
};
BankWidth = new NormalDistribution(2)
{
Mean = (RoundedDouble) bankWidthMean,
StandardDeviation = (RoundedDouble) bankWidthStandardDeviation
};
InsideWaterLevelFailureConstruction = new NormalDistribution(2)
{
Mean = (RoundedDouble) insideWaterLevelFailureConstructionMean,
StandardDeviation = (RoundedDouble) insideWaterLevelFailureConstructionStandardDeviation
};
EvaluationLevel = new RoundedDouble(2, evaluationLevel);
LevelCrestStructure = new NormalDistribution(2)
{
Mean = (RoundedDouble) levelCrestStructureMean,
StandardDeviation = (RoundedDouble) levelCrestStructureStandardDeviation
};
VerticalDistance = new RoundedDouble(2, verticalDistance);
FailureProbabilityReparation = new RoundedDouble(2, failureProbabilityReparation);
FailureCollisionEnergy = new VariationCoefficientLogNormalDistribution(2)
{
Mean = (RoundedDouble) failureCollisionEnergyMean,
CoefficientOfVariation = (RoundedDouble) failureCollisionEnergyCoefficientOfVariation
};
ShipMass = new VariationCoefficientNormalDistribution(2)
{
Mean = (RoundedDouble) shipMassMean,
CoefficientOfVariation = (RoundedDouble) shipMassCoefficientOfVariation
};
ShipVelocity = new VariationCoefficientNormalDistribution(2)
{
Mean = (RoundedDouble) shipVelocityMean,
CoefficientOfVariation = (RoundedDouble) shipVelocityCoefficientOfVariation
};
LevellingsPerYear = levellingsPerYear;
CollisionChanceSecondRetainingStructurePerLevelling = new RoundedDouble(2, collisionChanceSecondRetainingStructurePerLevelling);
FlowVelocityStructureClosable = new NormalDistribution(2)
{
Mean = (RoundedDouble) flowVelocityStructureClosableMean,
StandardDeviation = (RoundedDouble) flowVelocityStructureClosableStandarDeviation
};
StabilityLinearModel = new VariationCoefficientLogNormalDistribution(2)
{
Mean = (RoundedDouble) stabilityLinearModelMean,
CoefficientOfVariation = (RoundedDouble) stabilityLinearModelCoefficientOfVariation
};
StabilityQuadraticModel = new VariationCoefficientLogNormalDistribution(2)
{
Mean = (RoundedDouble) stabilityQuadraticModelMean,
CoefficientOfVariation = (RoundedDouble) stabilityQuadraticModelCoefficientOfVariation
};
AreaFlowApertures = new LogNormalDistribution(2)
{
Mean = (RoundedDouble) areaFlowAperturesMean,
StandardDeviation = (RoundedDouble) areaFlowAperturesStandardDeviation
};
InflowModel = inflowModel;
}
///
/// Gets the storage area of the stability point structure.
///
public VariationCoefficientLogNormalDistribution StorageStructureArea { get; private set; }
///
/// Gets the allowed increase of level for storage of the stability point structure.
///
public LogNormalDistribution AllowedLevelIncreaseStorage { get; private set; }
///
/// Gets the width of the flow apertures of the stability point structure.
///
public VariationCoefficientNormalDistribution WidthFlowApertures { get; private set; }
///
/// Gets the interior water level of the stability point structure.
///
public NormalDistribution InsideWaterLevel { get; private set; }
///
/// Gets the threshold height of the opened stability point structure.
///
public NormalDistribution ThresholdHeightOpenWeir { get; private set; }
///
/// Gets the critical overtopping discharge of the stability point structure.
///
public VariationCoefficientLogNormalDistribution CriticalOvertoppingDischarge { get; private set; }
///
/// Gets the flow width of the stability point structure at the bottom protection.
///
public LogNormalDistribution FlowWidthAtBottomProtection { get; private set; }
///
/// Gets the constructive strength of the linear load model of the stability point structure.
///
public VariationCoefficientLogNormalDistribution ConstructiveStrengthLinearModel { get; private set; }
///
/// Gets the constructive strength of the quadratic load model of the stability point structure.
///
public VariationCoefficientLogNormalDistribution ConstructiveStrengthQuadraticModel { get; private set; }
///
/// Gets the bank width of the stability point structure.
///
public NormalDistribution BankWidth { get; private set; }
///
/// Gets the inside water level failure construction of the stability point structure.
///
public NormalDistribution InsideWaterLevelFailureConstruction { get; private set; }
///
/// Gets the evaluation level of the stability point structure.
///
public RoundedDouble EvaluationLevel { get; private set; }
///
/// Gets the crest level of the stability point structure.
///
public NormalDistribution LevelCrestStructure { get; private set; }
///
/// Gets the vertical distance of the stability point structure.
///
public RoundedDouble VerticalDistance { get; private set; }
///
/// Gets the probability of failing to repair a failed closure of the stability point structure.
///
public RoundedDouble FailureProbabilityReparation { get; private set; }
///
/// Gets the failure collision energy of the stability point structure.
///
public VariationCoefficientLogNormalDistribution FailureCollisionEnergy { get; private set; }
///
/// Gets the mass of the ship.
///
public VariationCoefficientNormalDistribution ShipMass { get; private set; }
///
/// Gets the velocity of the ship.
///
public VariationCoefficientNormalDistribution ShipVelocity { get; private set; }
///
/// Gets the number of levellings per year.
///
public int LevellingsPerYear { get; private set; }
///
/// Gets the chance per levelling at a collision with the second retaining structure.
///
public RoundedDouble CollisionChanceSecondRetainingStructurePerLevelling { get; private set; }
///
/// Gets the maximum flow velocity at which the structure is closable.
///
public NormalDistribution FlowVelocityStructureClosable { get; private set; }
///
/// Gets the stability properties of the linear model of the stability point structure.
///
public VariationCoefficientLogNormalDistribution StabilityLinearModel { get; private set; }
///
/// Gets the stability properties of the quadratic model of the stability point structure.
///
public VariationCoefficientLogNormalDistribution StabilityQuadraticModel { get; private set; }
///
/// Gets the area of the flow aperture of the stability point structure.
///
public LogNormalDistribution AreaFlowApertures { get; private set; }
///
/// Gets the type of stability point structure.
///
public StabilityPointStructureType InflowModel { get; private set; }
}
}