// 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.Collections.Generic;
namespace Ringtoets.HydraRing.Calculation.Data.Input.Structures
{
///
/// Container of all data necessary for performing a structures closure calculation via Hydra-Ring.
///
public abstract class StructuresClosureCalculationInput : ExceedanceProbabilityCalculationInput
{
private readonly HydraRingSection section;
private readonly IEnumerable forelandPoints;
private readonly HydraRingBreakWater breakWater;
private readonly double gravitationalAcceleration;
private readonly double factorStormDurationOpenStructure;
private readonly double failureProbabilityOpenStructure;
private readonly double failureProbabilityReparation;
private readonly int identicalApertures;
private readonly double allowedLevelIncreaseStorageMean;
private readonly double allowedLevelIncreaseStorageStandardDeviation;
private readonly double modelFactorStorageVolumeMean;
private readonly double modelFactorStorageVolumeStandardDeviation;
private readonly double storageStructureAreaMean;
private readonly double storageStructureAreaVariation;
private readonly double modelFactorInflowVolume;
private readonly double flowWidthAtBottomProtectionMean;
private readonly double flowWidthAtBottomProtectionStandardDeviation;
private readonly double criticalOvertoppingDischargeMean;
private readonly double criticalOvertoppingDischargeVariation;
private readonly double failureProbabilityStructureWithErosion;
private readonly double stormDurationMean;
private readonly double stormDurationVariation;
private readonly double probabilityOpenStructureBeforeFlooding;
///
/// Creates a new instance of .
///
/// The id of the hydraulic boundary location.
/// The section.
/// The foreland points.
/// The break water.
/// The gravitational acceleration.
/// The factor of the storm duration for an open structure.
/// The failure probability for an open structure.
/// The reparation failure probability.
/// The number of identical apertures.
/// The mean of the allowed level of increase for storage.
/// The standard deviation of the allowed level of increase for storage.
/// The mean of the model factor storage volume.
/// The standard deviation of the model factor storage volume.
/// The mean of the storage structure area.
/// The variation of the storage structure area.
/// The model factor inflow volume.
/// The mean of the flow width at bottom protection.
/// The standard deviation of the flow width at bottom protection.
/// The mean of the critical overtopping discharge.
/// The variation of the critical overtopping discharge.
/// The failure probability structure with erosion.
/// The mean of the storm duration.
/// The variation of the storm duration.
/// The probability of an open structure before flooding.
protected StructuresClosureCalculationInput(long hydraulicBoundaryLocationId, HydraRingSection section,
IEnumerable forelandPoints,
HydraRingBreakWater breakWater,
double gravitationalAcceleration,
double factorStormDurationOpenStructure,
double failureProbabilityOpenStructure,
double failureProbabilityReparation,
int identicalApertures,
double allowedLevelIncreaseStorageMean, double allowedLevelIncreaseStorageStandardDeviation,
double modelFactorStorageVolumeMean, double modelFactorStorageVolumeStandardDeviation,
double storageStructureAreaMean, double storageStructureAreaVariation,
double modelFactorInflowVolume,
double flowWidthAtBottomProtectionMean, double flowWidthAtBottomProtectionStandardDeviation,
double criticalOvertoppingDischargeMean, double criticalOvertoppingDischargeVariation,
double failureProbabilityStructureWithErosion,
double stormDurationMean, double stormDurationVariation,
double probabilityOpenStructureBeforeFlooding)
: base(hydraulicBoundaryLocationId)
{
this.section = section;
this.forelandPoints = forelandPoints;
this.breakWater = breakWater;
this.gravitationalAcceleration = gravitationalAcceleration;
this.factorStormDurationOpenStructure = factorStormDurationOpenStructure;
this.failureProbabilityOpenStructure = failureProbabilityOpenStructure;
this.failureProbabilityReparation = failureProbabilityReparation;
this.identicalApertures = identicalApertures;
this.allowedLevelIncreaseStorageMean = allowedLevelIncreaseStorageMean;
this.allowedLevelIncreaseStorageStandardDeviation = allowedLevelIncreaseStorageStandardDeviation;
this.modelFactorStorageVolumeMean = modelFactorStorageVolumeMean;
this.modelFactorStorageVolumeStandardDeviation = modelFactorStorageVolumeStandardDeviation;
this.storageStructureAreaMean = storageStructureAreaMean;
this.storageStructureAreaVariation = storageStructureAreaVariation;
this.modelFactorInflowVolume = modelFactorInflowVolume;
this.flowWidthAtBottomProtectionMean = flowWidthAtBottomProtectionMean;
this.flowWidthAtBottomProtectionStandardDeviation = flowWidthAtBottomProtectionStandardDeviation;
this.criticalOvertoppingDischargeMean = criticalOvertoppingDischargeMean;
this.criticalOvertoppingDischargeVariation = criticalOvertoppingDischargeVariation;
this.failureProbabilityStructureWithErosion = failureProbabilityStructureWithErosion;
this.stormDurationMean = stormDurationMean;
this.stormDurationVariation = stormDurationVariation;
this.probabilityOpenStructureBeforeFlooding = probabilityOpenStructureBeforeFlooding;
}
public override HydraRingFailureMechanismType FailureMechanismType
{
get
{
return HydraRingFailureMechanismType.StructuresClosure;
}
}
public override int VariableId
{
get
{
return 58;
}
}
public override HydraRingSection Section
{
get
{
return section;
}
}
public override IEnumerable Variables
{
get
{
yield return new HydraRingVariable(58, HydraRingDistributionType.Deterministic, gravitationalAcceleration,
HydraRingDeviationType.Standard, double.NaN, double.NaN, double.NaN);
yield return new HydraRingVariable(63, HydraRingDistributionType.Deterministic, factorStormDurationOpenStructure,
HydraRingDeviationType.Standard, double.NaN, double.NaN, double.NaN);
yield return new HydraRingVariable(68, HydraRingDistributionType.Deterministic, failureProbabilityOpenStructure,
HydraRingDeviationType.Standard, double.NaN, double.NaN, double.NaN);
yield return new HydraRingVariable(69, HydraRingDistributionType.Deterministic, failureProbabilityReparation,
HydraRingDeviationType.Standard, double.NaN, double.NaN, double.NaN);
yield return new HydraRingVariable(71, HydraRingDistributionType.Deterministic, identicalApertures,
HydraRingDeviationType.Standard, double.NaN, double.NaN, double.NaN);
yield return new HydraRingVariable(94, HydraRingDistributionType.LogNormal, double.NaN,
HydraRingDeviationType.Standard, allowedLevelIncreaseStorageMean,
allowedLevelIncreaseStorageStandardDeviation, double.NaN);
yield return new HydraRingVariable(95, HydraRingDistributionType.LogNormal, double.NaN,
HydraRingDeviationType.Standard, modelFactorStorageVolumeMean,
modelFactorStorageVolumeStandardDeviation, double.NaN);
yield return new HydraRingVariable(96, HydraRingDistributionType.LogNormal, double.NaN,
HydraRingDeviationType.Variation, storageStructureAreaMean,
storageStructureAreaVariation, double.NaN);
yield return new HydraRingVariable(97, HydraRingDistributionType.Deterministic, modelFactorInflowVolume,
HydraRingDeviationType.Standard, double.NaN, double.NaN, double.NaN);
yield return new HydraRingVariable(103, HydraRingDistributionType.LogNormal, double.NaN,
HydraRingDeviationType.Standard, flowWidthAtBottomProtectionMean,
flowWidthAtBottomProtectionStandardDeviation, double.NaN);
yield return new HydraRingVariable(104, HydraRingDistributionType.LogNormal, double.NaN,
HydraRingDeviationType.Variation, criticalOvertoppingDischargeMean,
criticalOvertoppingDischargeVariation, double.NaN);
yield return new HydraRingVariable(105, HydraRingDistributionType.Deterministic, failureProbabilityStructureWithErosion,
HydraRingDeviationType.Standard, double.NaN, double.NaN, double.NaN);
yield return new HydraRingVariable(108, HydraRingDistributionType.LogNormal, double.NaN,
HydraRingDeviationType.Variation, stormDurationMean,
stormDurationVariation, double.NaN);
yield return new HydraRingVariable(129, HydraRingDistributionType.Deterministic, probabilityOpenStructureBeforeFlooding,
HydraRingDeviationType.Standard, double.NaN, double.NaN, double.NaN);
}
}
public override IEnumerable ForelandsPoints
{
get
{
return forelandPoints;
}
}
public override HydraRingBreakWater BreakWater
{
get
{
return breakWater;
}
}
public abstract override int? GetSubMechanismModelId(int subMechanismId);
}
}