// Copyright (C) Stichting Deltares 2018. 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;
using System.Linq;
using Riskeer.HydraRing.Calculation.Data.Input.Overtopping;
using Riskeer.HydraRing.Calculation.Data.Variables;
namespace Riskeer.HydraRing.Calculation.Data.Input.Hydraulics
{
///
/// Container for all data necessary for performing a dike height calculation via Hydra-Ring.
///
public class DikeHeightCalculationInput : HydraulicLoadsCalculationInput
{
private readonly double criticalOvertoppingMean;
private readonly double criticalOvertoppingStandardDeviation;
///
/// Creates a new instance of the class.
///
/// The id of the hydraulic boundary location.
/// The norm.
/// The normal of the section.
/// The profile points.
/// The foreland points.
/// The break water.
/// The model factor critical overtopping.
/// The mean of the factor Fb
/// The standard deviation of the factor Fb.
/// The lower boundary of the factor Fb.
/// The upper boundary of the factor Fb.
/// The mean of the factor Fn.
/// The standard deviation of the factor Fn.
/// The lower boundary of the factor Fn.
/// The upper boundary of the factor Fn.
/// The factor overtopping.
/// The mean of the critical overtopping.
/// The standard deviation of the critical overtopping.
/// The mean of the factor frunup.
/// The standard deviation of the factor frunup.
/// The lower boundary of the factor frunup.
/// The upper boundary of the factor frunup.
/// The mean of the exponent model factor shallow.
/// The standard deviation of the exponent model factor shallow.
/// The lower boundary of the exponent model factor shallow.
/// The upper boundary of the exponent model factor shallow.
public DikeHeightCalculationInput(long hydraulicBoundaryLocationId,
double norm,
double sectionNormal,
IEnumerable profilePoints,
IEnumerable forelandPoints,
HydraRingBreakWater breakWater,
double modelFactorCriticalOvertopping,
double factorFbMean, double factorFbStandardDeviation,
double factorFbLowerBoundary, double factorFbUpperBoundary,
double factorFnMean, double factorFnStandardDeviation,
double factorFnLowerBoundary, double factorFnUpperBoundary,
double modelFactorOvertopping,
double criticalOvertoppingMean, double criticalOvertoppingStandardDeviation,
double modelFactorFrunupMean, double modelFactorFrunupStandardDeviation,
double modelFactorFrunupLowerBoundary, double modelFactorFrunupUpperBoundary,
double exponentModelFactorShallowMean, double exponentModelFactorShallowStandardDeviation,
double exponentModelFactorShallowLowerBoundary, double exponentModelFactorShallowUpperBoundary)
: base(hydraulicBoundaryLocationId,
norm,
sectionNormal,
profilePoints,
forelandPoints,
breakWater,
modelFactorCriticalOvertopping,
factorFbMean, factorFbStandardDeviation,
factorFbLowerBoundary, factorFbUpperBoundary,
factorFnMean, factorFnStandardDeviation,
factorFnLowerBoundary, factorFnUpperBoundary,
modelFactorOvertopping,
modelFactorFrunupMean, modelFactorFrunupStandardDeviation,
modelFactorFrunupLowerBoundary, modelFactorFrunupUpperBoundary,
exponentModelFactorShallowMean, exponentModelFactorShallowStandardDeviation,
exponentModelFactorShallowLowerBoundary, exponentModelFactorShallowUpperBoundary)
{
this.criticalOvertoppingMean = criticalOvertoppingMean;
this.criticalOvertoppingStandardDeviation = criticalOvertoppingStandardDeviation;
}
public override HydraRingFailureMechanismType FailureMechanismType { get; } = HydraRingFailureMechanismType.DikeHeight;
public override int VariableId { get; } = 1;
public override IEnumerable Variables
{
get
{
List variables = base.Variables.ToList();
variables.AddRange(GetVariables());
return variables.OrderBy(v => v.VariableId);
}
}
private IEnumerable GetVariables()
{
yield return new DeterministicHydraRingVariable(1, 0.0);
yield return new LogNormalHydraRingVariable(17,
HydraRingDeviationType.Standard,
criticalOvertoppingMean,
criticalOvertoppingStandardDeviation);
}
}
}