// Copyright (C) Stichting Deltares 2018. All rights reserved. // // This file is part of the Dam Engine. // // The Dam Engine is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero 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 Affero General Public License for more details. // // You should have received a copy of the GNU Affero 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 Deltares.DamEngine.Data.Probabilistic; namespace Deltares.DamEngine.Data.General { public class ModelParameters { public double TrafficLoad { get; set; } // moved to location public double MinimalCircleDepth { get; set; } // to be moved to location public double LevelReductionInside { get; set; } // not used yet; to be moved to location public double LevelReductionOutside { get; set; } // not used yet; to be moved to location public string MapForSoilGeometries2D { get; set; } // ??? public ModelParametersForPLLines ModelParametersForPLLines { get; set; } // to be moved to location public ModelFactors ModelFactors { get; set; } // to be moved to location public DistributionType LayerHeightDistribution { get; set; } // to be moved to location public double LayerHeightDeviation { get; set; } // to be moved to location public ModelParameters() { ModelParametersForPLLines = new ModelParametersForPLLines(); ModelFactors = new ModelFactors { // Default values for ModelFactors in ModelParameters // These can be overruled by reading them from the ModelParameters.csv file // Or they can be overruled per scenario in the scearios.csv file RequiredSafetyFactorStabilityInnerSlope = 1.0, RequiredSafetyFactorStabilityOuterSlope = 1.0, RequiredSafetyFactorPiping = 1.0, UpliftCriterionPiping = 1.2, UpliftCriterionStability = 1.2 }; } public static void AssignDefaultToNullValues(ModelFactors modelFactors) { var defaults = new ModelParameters().ModelFactors.AllValues; for (var i = 0; i < defaults.Length; ++i) { if (modelFactors.AllValues[i] == null) { modelFactors.AllValues[i] = defaults[i]; } } } } public class ModelParametersForPLLines { public virtual double PenetrationLength { get; set; } public virtual double DampingFactorPL3 { get; set; } public virtual double DampingFactorPL4 { get; set; } public virtual PLLineCreationMethod PLLineCreationMethod { get; set; } } }