Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.IO/Configurations/ClosingStructuresCalculationConfiguration.cs =================================================================== diff -u -r16c94d05c67237dec9fcab0f3f03c6b48d3c335b -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.IO/Configurations/ClosingStructuresCalculationConfiguration.cs (.../ClosingStructuresCalculationConfiguration.cs) (revision 16c94d05c67237dec9fcab0f3f03c6b48d3c335b) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.IO/Configurations/ClosingStructuresCalculationConfiguration.cs (.../ClosingStructuresCalculationConfiguration.cs) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -39,27 +39,27 @@ /// /// Gets or sets the stochast configuration for the inside water level for the structure. /// - public MeanStandardDeviationStochastConfiguration InsideWaterLevel { get; set; } + public StochastConfiguration InsideWaterLevel { get; set; } /// /// Gets or sets the stochast configuration for the drain coefficient for the structure. /// - public MeanStandardDeviationStochastConfiguration DrainCoefficient { get; set; } + public StochastConfiguration DrainCoefficient { get; set; } /// /// Gets or sets the stochast configuration for the threshold height open weir for the structure. /// - public MeanStandardDeviationStochastConfiguration ThresholdHeightOpenWeir { get; set; } + public StochastConfiguration ThresholdHeightOpenWeir { get; set; } /// /// Gets or sets the stochast configuration for the area flow of apertures for the structure. /// - public MeanStandardDeviationStochastConfiguration AreaFlowApertures { get; set; } + public StochastConfiguration AreaFlowApertures { get; set; } /// /// Gets or sets the stochast configuration for the level crest of structure not closing. /// - public MeanStandardDeviationStochastConfiguration LevelCrestStructureNotClosing { get; set; } + public StochastConfiguration LevelCrestStructureNotClosing { get; set; } /// /// Gets or sets the number of identical apertures. Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.IO.Test/Configurations/ClosingStructuresCalculationConfigurationTest.cs =================================================================== diff -u -r16c94d05c67237dec9fcab0f3f03c6b48d3c335b -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.IO.Test/Configurations/ClosingStructuresCalculationConfigurationTest.cs (.../ClosingStructuresCalculationConfigurationTest.cs) (revision 16c94d05c67237dec9fcab0f3f03c6b48d3c335b) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.IO.Test/Configurations/ClosingStructuresCalculationConfigurationTest.cs (.../ClosingStructuresCalculationConfigurationTest.cs) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -69,11 +69,11 @@ // Setup var random = new Random(21); var inflowModelType = random.NextEnumValue(); - var insideWaterLevel = new MeanStandardDeviationStochastConfiguration(); - var drainCoefficient = new MeanStandardDeviationStochastConfiguration(); - var thresholdHeightOpenWeir = new MeanStandardDeviationStochastConfiguration(); - var areaFlowApertures = new MeanStandardDeviationStochastConfiguration(); - var levelCrestStructureNotClosing = new MeanStandardDeviationStochastConfiguration(); + var insideWaterLevel = new StochastConfiguration(); + var drainCoefficient = new StochastConfiguration(); + var thresholdHeightOpenWeir = new StochastConfiguration(); + var areaFlowApertures = new StochastConfiguration(); + var levelCrestStructureNotClosing = new StochastConfiguration(); var identicalApertures = random.Next(1, 5); var factorStormDurationOpenStructure = random.NextDouble(); var failureProbabilityOpenStructure = random.NextDouble(); Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.IO.Test/Configurations/ClosingStructuresCalculationConfigurationWriterTest.cs =================================================================== diff -u -r16c94d05c67237dec9fcab0f3f03c6b48d3c335b -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.IO.Test/Configurations/ClosingStructuresCalculationConfigurationWriterTest.cs (.../ClosingStructuresCalculationConfigurationWriterTest.cs) (revision 16c94d05c67237dec9fcab0f3f03c6b48d3c335b) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.IO.Test/Configurations/ClosingStructuresCalculationConfigurationWriterTest.cs (.../ClosingStructuresCalculationConfigurationWriterTest.cs) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -125,62 +125,62 @@ BreakWaterHeight = 1.23, UseForeshoreProfile = true }, - FlowWidthAtBottomProtection = new MeanStandardDeviationStochastConfiguration + FlowWidthAtBottomProtection = new StochastConfiguration { Mean = 15.2, StandardDeviation = 0.1 }, - WidthFlowApertures = new MeanStandardDeviationStochastConfiguration + WidthFlowApertures = new StochastConfiguration { Mean = 13.2, StandardDeviation = 0.3 }, - StorageStructureArea = new MeanVariationCoefficientStochastConfiguration + StorageStructureArea = new StochastConfiguration { Mean = 15000, VariationCoefficient = 0.01 }, - CriticalOvertoppingDischarge = new MeanVariationCoefficientStochastConfiguration + CriticalOvertoppingDischarge = new StochastConfiguration { Mean = 2, VariationCoefficient = 0.1 }, - ModelFactorSuperCriticalFlow = new MeanStandardDeviationStochastConfiguration + ModelFactorSuperCriticalFlow = new StochastConfiguration { Mean = 1.1, StandardDeviation = 0.14 }, - AllowedLevelIncreaseStorage = new MeanStandardDeviationStochastConfiguration + AllowedLevelIncreaseStorage = new StochastConfiguration { Mean = 0.2, StandardDeviation = 0.01 }, - StormDuration = new MeanVariationCoefficientStochastConfiguration + StormDuration = new StochastConfiguration { Mean = 6.0, VariationCoefficient = 0.22 }, - DrainCoefficient = new MeanStandardDeviationStochastConfiguration + DrainCoefficient = new StochastConfiguration { Mean = 1.1, StandardDeviation = 0.02 }, - InsideWaterLevel = new MeanStandardDeviationStochastConfiguration + InsideWaterLevel = new StochastConfiguration { Mean = 0.5, StandardDeviation = 0.1 }, - AreaFlowApertures = new MeanStandardDeviationStochastConfiguration + AreaFlowApertures = new StochastConfiguration { Mean = 80.5, StandardDeviation = 1 }, - ThresholdHeightOpenWeir = new MeanStandardDeviationStochastConfiguration + ThresholdHeightOpenWeir = new StochastConfiguration { Mean = 1.2, StandardDeviation = 0.1 }, - LevelCrestStructureNotClosing = new MeanStandardDeviationStochastConfiguration + LevelCrestStructureNotClosing = new StochastConfiguration { Mean = 4.3, StandardDeviation = 0.2 Index: Ringtoets/Common/src/Ringtoets.Common.IO/Configurations/Helpers/DistributionConversionExtensions.cs =================================================================== diff -u -r512bebcd5570951b18657513c56843d9e2f8e969 -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/Common/src/Ringtoets.Common.IO/Configurations/Helpers/DistributionConversionExtensions.cs (.../DistributionConversionExtensions.cs) (revision 512bebcd5570951b18657513c56843d9e2f8e969) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Configurations/Helpers/DistributionConversionExtensions.cs (.../DistributionConversionExtensions.cs) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -28,139 +28,139 @@ namespace Ringtoets.Common.IO.Configurations.Helpers { /// - /// Extension methods for converting to . + /// Extension methods for converting to . /// public static class DistributionConversionExtensions { private static readonly ILog log = LogManager.GetLogger(typeof(DistributionConversionExtensions)); /// - /// Configure a new with - /// and - /// taken from + /// Configure a new with + /// and + /// taken from /// . /// /// The distribution to take the values from. - /// A new with - /// and - /// set. + /// A new with + /// and + /// set. /// Thrown when is null. - public static MeanStandardDeviationStochastConfiguration ToStochastConfiguration(this IDistribution distribution) + public static StochastConfiguration ToStochastConfiguration(this IDistribution distribution) { if (distribution == null) { throw new ArgumentNullException(nameof(distribution)); } - return new MeanStandardDeviationStochastConfiguration + return new StochastConfiguration { Mean = distribution.Mean, StandardDeviation = distribution.StandardDeviation }; } /// - /// Configure a new with - /// taken from + /// Configure a new with + /// taken from /// . /// /// The distribution to take the values from. - /// A new with - /// set. + /// A new with + /// set. /// Thrown when is null. - public static MeanStandardDeviationStochastConfiguration ToStochastConfigurationWithMean(this IDistribution distribution) + public static StochastConfiguration ToStochastConfigurationWithMean(this IDistribution distribution) { if (distribution == null) { throw new ArgumentNullException(nameof(distribution)); } - return new MeanStandardDeviationStochastConfiguration + return new StochastConfiguration { Mean = distribution.Mean }; } /// - /// Configure a new with - /// taken from + /// Configure a new with + /// taken from /// . /// /// The distribution to take the values from. - /// A new with - /// set. + /// A new with + /// set. /// Thrown when is null. - public static MeanStandardDeviationStochastConfiguration ToStochastConfigurationWithStandardDeviation(this IDistribution distribution) + public static StochastConfiguration ToStochastConfigurationWithStandardDeviation(this IDistribution distribution) { if (distribution == null) { throw new ArgumentNullException(nameof(distribution)); } - return new MeanStandardDeviationStochastConfiguration + return new StochastConfiguration { StandardDeviation = distribution.StandardDeviation }; } /// - /// Configure a new with - /// and - /// taken from + /// Configure a new with + /// and + /// taken from /// . /// /// The distribution to take the values from. - /// A new with - /// and - /// set. + /// A new with + /// and + /// set. /// Thrown when is null. - public static MeanVariationCoefficientStochastConfiguration ToStochastConfiguration(this IVariationCoefficientDistribution distribution) + public static StochastConfiguration ToStochastConfiguration(this IVariationCoefficientDistribution distribution) { if (distribution == null) { throw new ArgumentNullException(nameof(distribution)); } - return new MeanVariationCoefficientStochastConfiguration + return new StochastConfiguration { Mean = distribution.Mean, VariationCoefficient = distribution.CoefficientOfVariation }; } /// - /// Configure a new with - /// taken from + /// Configure a new with + /// taken from /// . /// /// The distribution to take the values from. - /// A new with - /// set. + /// A new with + /// set. /// Thrown when is null. - public static MeanVariationCoefficientStochastConfiguration ToStochastConfigurationWithMean(this IVariationCoefficientDistribution distribution) + public static StochastConfiguration ToStochastConfigurationWithMean(this IVariationCoefficientDistribution distribution) { if (distribution == null) { throw new ArgumentNullException(nameof(distribution)); } - return new MeanVariationCoefficientStochastConfiguration + return new StochastConfiguration { Mean = distribution.Mean }; } /// - /// Configure a new with - /// taken from + /// Configure a new with + /// taken from /// . /// /// The distribution to take the values from. - /// A new with - /// set. + /// A new with + /// set. /// Thrown when is null. - public static MeanVariationCoefficientStochastConfiguration ToStochastConfigurationWithVariationCoefficient(this IVariationCoefficientDistribution distribution) + public static StochastConfiguration ToStochastConfigurationWithVariationCoefficient(this IVariationCoefficientDistribution distribution) { if (distribution == null) { throw new ArgumentNullException(nameof(distribution)); } - return new MeanVariationCoefficientStochastConfiguration + return new StochastConfiguration { VariationCoefficient = distribution.CoefficientOfVariation }; @@ -199,7 +199,7 @@ /// Thrown when /// is null. public static bool TrySetDistributionProperties(this IDistribution distribution, - MeanStandardDeviationStochastConfiguration configuration, + StochastConfiguration configuration, string stochastName, string calculationName) { return distribution.TrySetMean(configuration.Mean, stochastName, calculationName) @@ -323,7 +323,7 @@ /// Thrown when /// is null. public static bool TrySetDistributionProperties(this IVariationCoefficientDistribution distribution, - MeanVariationCoefficientStochastConfiguration configuration, + StochastConfiguration configuration, string stochastName, string calculationName) { return distribution.TrySetMean(configuration.Mean, stochastName, calculationName) Fisheye: Tag eeac9fe0e250075e6e95683e4781b7b96ddc178c refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.IO/Configurations/MeanStandardDeviationStochastConfiguration.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag eeac9fe0e250075e6e95683e4781b7b96ddc178c refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.IO/Configurations/MeanVariationCoefficientStochastConfiguration.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Common/src/Ringtoets.Common.IO/Configurations/StochastConfiguration.cs =================================================================== diff -u --- Ringtoets/Common/src/Ringtoets.Common.IO/Configurations/StochastConfiguration.cs (revision 0) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Configurations/StochastConfiguration.cs (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -0,0 +1,45 @@ +// 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. + +namespace Ringtoets.Common.IO.Configurations +{ + /// + /// Configuration of a stochast with possible values for mean, standard deviation + /// and variation coefficient. + /// + public class StochastConfiguration + { + /// + /// Gets or sets the mean of the stochast. + /// + public double? Mean { get; set; } + + /// + /// Gets or sets the standard deviation of the stochast. + /// + public double? StandardDeviation { get; set; } + + /// + /// Gets or sets the variation coefficient of the stochast. + /// + public double? VariationCoefficient { get; set; } + } +} \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.IO/Configurations/StructuresCalculationConfiguration.cs =================================================================== diff -u -r43b7d2fe7b1c4209fd2afcd985a5c1f4b7bf14e9 -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/Common/src/Ringtoets.Common.IO/Configurations/StructuresCalculationConfiguration.cs (.../StructuresCalculationConfiguration.cs) (revision 43b7d2fe7b1c4209fd2afcd985a5c1f4b7bf14e9) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Configurations/StructuresCalculationConfiguration.cs (.../StructuresCalculationConfiguration.cs) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -73,12 +73,12 @@ /// /// Gets or sets the stochast configuration for the model factor super critical flow. /// - public MeanStandardDeviationStochastConfiguration ModelFactorSuperCriticalFlow { get; set; } + public StochastConfiguration ModelFactorSuperCriticalFlow { get; set; } /// /// Gets or sets the stochast configuration for the storm duration. /// - public MeanVariationCoefficientStochastConfiguration StormDuration { get; set; } + public StochastConfiguration StormDuration { get; set; } /// /// Gets or sets the structure's normal orientation. @@ -88,22 +88,22 @@ /// /// Gets or sets the stochast configuration for the allowed level of storage increase. /// - public MeanStandardDeviationStochastConfiguration AllowedLevelIncreaseStorage { get; set; } + public StochastConfiguration AllowedLevelIncreaseStorage { get; set; } /// /// Gets or sets the stochast configuration for the storage structure area. /// - public MeanVariationCoefficientStochastConfiguration StorageStructureArea { get; set; } + public StochastConfiguration StorageStructureArea { get; set; } /// /// Gets or sets the stochast configuration for the flow width at bottom protection. /// - public MeanStandardDeviationStochastConfiguration FlowWidthAtBottomProtection { get; set; } + public StochastConfiguration FlowWidthAtBottomProtection { get; set; } /// /// Gets or sets the stochast configuration for the critical overtopping discharge. /// - public MeanVariationCoefficientStochastConfiguration CriticalOvertoppingDischarge { get; set; } + public StochastConfiguration CriticalOvertoppingDischarge { get; set; } /// /// Gets or sets the failure probability of structure with erosion. @@ -113,7 +113,7 @@ /// /// Gets or sets the stochast configuration for the flow width of apertures. /// - public MeanStandardDeviationStochastConfiguration WidthFlowApertures { get; set; } + public StochastConfiguration WidthFlowApertures { get; set; } /// /// Gets or sets the wave reduction configuration. Index: Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/CalculationConfigurationImporter.cs =================================================================== diff -u -r1127011aaf7ba5f521e709a7ab54d212e1a18fe3 -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/CalculationConfigurationImporter.cs (.../CalculationConfigurationImporter.cs) (revision 1127011aaf7ba5f521e709a7ab54d212e1a18fe3) +++ Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/CalculationConfigurationImporter.cs (.../CalculationConfigurationImporter.cs) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -322,7 +322,7 @@ string calculationName, string stochastName, TCalculationInput input, - MeanStandardDeviationStochastConfiguration stochastConfiguration, + StochastConfiguration stochastConfiguration, Func getStochast, Action setStochast) where TDistribution : IDistribution @@ -361,7 +361,7 @@ string calculationName, string stochastName, TCalculationInput input, - MeanVariationCoefficientStochastConfiguration stochastConfiguration, + StochastConfiguration stochastConfiguration, Func getStochast, Action setStochast) where TDistribution : IVariationCoefficientDistribution Index: Ringtoets/Common/src/Ringtoets.Common.IO/Readers/XElementExtensions.cs =================================================================== diff -u -r1fea24f00be5ae78cf5ceba066bae1056c0e5a2e -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/Common/src/Ringtoets.Common.IO/Readers/XElementExtensions.cs (.../XElementExtensions.cs) (revision 1fea24f00be5ae78cf5ceba066bae1056c0e5a2e) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Readers/XElementExtensions.cs (.../XElementExtensions.cs) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -210,7 +210,7 @@ /// Thrown when the value isn't in the correct format. /// Thrown when the value for mean or standard deviation represents a /// number less than or greater than . - public static MeanStandardDeviationStochastConfiguration GetStandardDeviationStochastParameters(this XElement calculationElement, string stochastName) + public static StochastConfiguration GetStandardDeviationStochastParameters(this XElement calculationElement, string stochastName) { if (calculationElement == null) { @@ -235,7 +235,7 @@ throw new CriticalFileReadException(message); } - return new MeanStandardDeviationStochastConfiguration + return new StochastConfiguration { Mean = element.GetDoubleValueFromDescendantElement(ConfigurationSchemaIdentifiers.MeanElement), StandardDeviation = element.GetDoubleValueFromDescendantElement(ConfigurationSchemaIdentifiers.StandardDeviationElement) @@ -244,7 +244,7 @@ return null; } - public static MeanVariationCoefficientStochastConfiguration GetVariationCoefficientStochastParameters(this XElement calculationElement, string stochastName) + public static StochastConfiguration GetVariationCoefficientStochastParameters(this XElement calculationElement, string stochastName) { if (calculationElement == null) { @@ -269,7 +269,7 @@ throw new CriticalFileReadException(message); } - return new MeanVariationCoefficientStochastConfiguration + return new StochastConfiguration { Mean = element.GetDoubleValueFromDescendantElement(ConfigurationSchemaIdentifiers.MeanElement), VariationCoefficient = element.GetDoubleValueFromDescendantElement(ConfigurationSchemaIdentifiers.VariationCoefficientElement) Index: Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj =================================================================== diff -u -r335523a40d190e19b1061804de21c28f74140f52 -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj (.../Ringtoets.Common.IO.csproj) (revision 335523a40d190e19b1061804de21c28f74140f52) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj (.../Ringtoets.Common.IO.csproj) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -58,8 +58,7 @@ - - + Index: Ringtoets/Common/src/Ringtoets.Common.IO/Writers/SchemaCalculationConfigurationWriter.cs =================================================================== diff -u -r81c1b17e17635cfe4035c98b3cea224d048a63d6 -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/Common/src/Ringtoets.Common.IO/Writers/SchemaCalculationConfigurationWriter.cs (.../SchemaCalculationConfigurationWriter.cs) (revision 81c1b17e17635cfe4035c98b3cea224d048a63d6) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Writers/SchemaCalculationConfigurationWriter.cs (.../SchemaCalculationConfigurationWriter.cs) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -109,7 +109,7 @@ /// The configuration for the distribution that can be null. /// Thrown when or /// is null. - protected static void WriteDistributionWhenAvailable(XmlWriter writer, string distributionName, MeanVariationCoefficientStochastConfiguration configuration) + protected static void WriteDistributionWhenAvailable(XmlWriter writer, string distributionName, StochastConfiguration configuration) { if (writer == null) { @@ -127,31 +127,6 @@ } /// - /// Writes a distribution configuration when it has a value. - /// - /// The writer to use for writing. - /// The name of the distribution. - /// The configuration for the distribution that can be null. - /// Thrown when or - /// is null. - protected static void WriteDistributionWhenAvailable(XmlWriter writer, string distributionName, MeanStandardDeviationStochastConfiguration configuration) - { - if (writer == null) - { - throw new ArgumentNullException(nameof(writer)); - } - if (distributionName == null) - { - throw new ArgumentNullException(nameof(distributionName)); - } - - if (configuration != null) - { - writer.WriteDistribution(distributionName, configuration); - } - } - - /// /// Writes an element with some content when the content has a value. /// /// The writer to use for writing. Index: Ringtoets/Common/src/Ringtoets.Common.IO/Writers/XmlWriterExtensions.cs =================================================================== diff -u -rc0c4d914f97d3471b73898030db0066dced39331 -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/Common/src/Ringtoets.Common.IO/Writers/XmlWriterExtensions.cs (.../XmlWriterExtensions.cs) (revision c0c4d914f97d3471b73898030db0066dced39331) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Writers/XmlWriterExtensions.cs (.../XmlWriterExtensions.cs) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -34,15 +34,15 @@ public static class XmlWriterExtensions { /// - /// Writes a single as a stochast element in file. + /// Writes a single as a stochast element in file. /// /// The writer to use to write the distribution. /// The name of the distribution to write. /// The distribution to write. /// Thrown when the is /// in an invalid state for writing. /// Thrown when any of the input parameters is null. - public static void WriteDistribution(this XmlWriter writer, string name, MeanStandardDeviationStochastConfiguration distribution) + public static void WriteDistribution(this XmlWriter writer, string name, StochastConfiguration distribution) { if (writer == null) { @@ -68,41 +68,6 @@ { writer.WriteElementString(ConfigurationSchemaIdentifiers.StandardDeviationElement, XmlConvert.ToString(distribution.StandardDeviation.Value)); } - - writer.WriteEndElement(); - } - - /// - /// Writes a single as a stochast element in file. - /// - /// The writer to use to write the distribution. - /// The name of the distribution to write. - /// The distribution to write. - /// Thrown when the is - /// in an invalid state for writing. - /// Thrown when any of the input parameters is null. - public static void WriteDistribution(this XmlWriter writer, string name, MeanVariationCoefficientStochastConfiguration distribution) - { - if (writer == null) - { - throw new ArgumentNullException(nameof(writer)); - } - if (name == null) - { - throw new ArgumentNullException(nameof(name)); - } - if (distribution == null) - { - throw new ArgumentNullException(nameof(distribution)); - } - - writer.WriteStartElement(ConfigurationSchemaIdentifiers.StochastElement); - writer.WriteAttributeString(ConfigurationSchemaIdentifiers.NameAttribute, name); - - if (distribution.Mean.HasValue) - { - writer.WriteElementString(ConfigurationSchemaIdentifiers.MeanElement, XmlConvert.ToString(distribution.Mean.Value)); - } if (distribution.VariationCoefficient.HasValue) { writer.WriteElementString(ConfigurationSchemaIdentifiers.VariationCoefficientElement, XmlConvert.ToString(distribution.VariationCoefficient.Value)); Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/Configurations/Helpers/ConfigurationValidationExtensionsTest.cs =================================================================== diff -u -r1127011aaf7ba5f521e709a7ab54d212e1a18fe3 -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/Configurations/Helpers/ConfigurationValidationExtensionsTest.cs (.../ConfigurationValidationExtensionsTest.cs) (revision 1127011aaf7ba5f521e709a7ab54d212e1a18fe3) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/Configurations/Helpers/ConfigurationValidationExtensionsTest.cs (.../ConfigurationValidationExtensionsTest.cs) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -282,7 +282,7 @@ var configuration = new TestStructuresCalculationConfiguration(calculationName) { - StormDuration = new MeanVariationCoefficientStochastConfiguration + StormDuration = new StochastConfiguration { VariationCoefficient = new Random(21).NextDouble() } @@ -307,7 +307,7 @@ var configuration = new TestStructuresCalculationConfiguration(calculationName) { - StormDuration = new MeanVariationCoefficientStochastConfiguration + StormDuration = new StochastConfiguration { Mean = new Random(21).NextDouble() } @@ -335,7 +335,7 @@ var configuration = new TestStructuresCalculationConfiguration(calculationName) { - ModelFactorSuperCriticalFlow = new MeanStandardDeviationStochastConfiguration() + ModelFactorSuperCriticalFlow = new StochastConfiguration() { StandardDeviation = new Random(21).NextDouble() } @@ -360,7 +360,7 @@ var configuration = new TestStructuresCalculationConfiguration(calculationName) { - ModelFactorSuperCriticalFlow = new MeanStandardDeviationStochastConfiguration() + ModelFactorSuperCriticalFlow = new StochastConfiguration() { Mean = new Random(21).NextDouble() } Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/Configurations/Helpers/DistributionConversionExtensionsTest.cs =================================================================== diff -u -r335523a40d190e19b1061804de21c28f74140f52 -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/Configurations/Helpers/DistributionConversionExtensionsTest.cs (.../DistributionConversionExtensionsTest.cs) (revision 335523a40d190e19b1061804de21c28f74140f52) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/Configurations/Helpers/DistributionConversionExtensionsTest.cs (.../DistributionConversionExtensionsTest.cs) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -63,7 +63,7 @@ distribution.StandardDeviation = standardDeviation; // Call - MeanStandardDeviationStochastConfiguration configuration = distribution.ToStochastConfiguration(); + StochastConfiguration configuration = distribution.ToStochastConfiguration(); // Assert Assert.AreEqual(mean, configuration.Mean); @@ -98,7 +98,7 @@ distribution.Mean = mean; // Call - MeanStandardDeviationStochastConfiguration configuration = distribution.ToStochastConfigurationWithMean(); + StochastConfiguration configuration = distribution.ToStochastConfigurationWithMean(); // Assert Assert.AreEqual(mean, configuration.Mean); @@ -133,7 +133,7 @@ distribution.StandardDeviation = StandardDeviation; // Call - MeanStandardDeviationStochastConfiguration configuration = distribution.ToStochastConfigurationWithStandardDeviation(); + StochastConfiguration configuration = distribution.ToStochastConfigurationWithStandardDeviation(); // Assert Assert.IsNull(configuration.Mean); @@ -170,7 +170,7 @@ distribution.CoefficientOfVariation = variationCoefficient; // Call - MeanVariationCoefficientStochastConfiguration configuration = distribution.ToStochastConfiguration(); + StochastConfiguration configuration = distribution.ToStochastConfiguration(); // Assert Assert.AreEqual(mean, configuration.Mean); @@ -205,7 +205,7 @@ distribution.Mean = mean; // Call - MeanVariationCoefficientStochastConfiguration configuration = distribution.ToStochastConfigurationWithMean(); + StochastConfiguration configuration = distribution.ToStochastConfigurationWithMean(); // Assert Assert.AreEqual(mean, configuration.Mean); @@ -240,7 +240,7 @@ distribution.CoefficientOfVariation = variationCoefficient; // Call - MeanVariationCoefficientStochastConfiguration configuration = distribution.ToStochastConfigurationWithVariationCoefficient(); + StochastConfiguration configuration = distribution.ToStochastConfigurationWithVariationCoefficient(); // Assert Assert.IsNull(configuration.Mean); Fisheye: Tag eeac9fe0e250075e6e95683e4781b7b96ddc178c refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.IO.Test/Configurations/MeanStandardDeviationStochastConfigurationTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag eeac9fe0e250075e6e95683e4781b7b96ddc178c refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.IO.Test/Configurations/MeanVariationCoefficientStochastConfigurationTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/Configurations/StochastConfigurationTest.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/Configurations/StochastConfigurationTest.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/Configurations/StochastConfigurationTest.cs (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -0,0 +1,65 @@ +// 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 NUnit.Framework; +using Ringtoets.Common.IO.Configurations; + +namespace Ringtoets.Common.IO.Test.Configurations +{ + [TestFixture] + public class StochastConfigurationTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Call + var configuration = new StochastConfiguration(); + + // Assert + Assert.IsNull(configuration.Mean); + Assert.IsNull(configuration.StandardDeviation); + Assert.IsNull(configuration.VariationCoefficient); + } + + [Test] + public void SimpleProperties_SetNewValue_GetsNewlySetValue() + { + // Setup + var random = new Random(236789); + var configuration = new StochastConfiguration(); + + double mean = random.NextDouble(); + double standardDeviation = random.NextDouble(); + double variationCoefficient = random.NextDouble(); + + // Call + configuration.Mean = mean; + configuration.StandardDeviation = standardDeviation; + configuration.VariationCoefficient = variationCoefficient; + + // Assert + Assert.AreEqual(mean, configuration.Mean); + Assert.AreEqual(standardDeviation, configuration.StandardDeviation); + Assert.AreEqual(variationCoefficient, configuration.VariationCoefficient); + } + } +} \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/Configurations/StructureCalculationConfigurationTest.cs =================================================================== diff -u -rd393a6e22ba176f0ce9731629a37ce3272b1f433 -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/Configurations/StructureCalculationConfigurationTest.cs (.../StructureCalculationConfigurationTest.cs) (revision d393a6e22ba176f0ce9731629a37ce3272b1f433) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/Configurations/StructureCalculationConfigurationTest.cs (.../StructureCalculationConfigurationTest.cs) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -80,13 +80,13 @@ double structureNormalOrientation = random.NextDouble(); double failureProbabilityStructureWithErosion = random.NextDouble(); - var modelFactorSuperCriticalFlow = new MeanStandardDeviationStochastConfiguration(); - var stormDuration = new MeanVariationCoefficientStochastConfiguration(); - var allowedLevelIncreaseStorage = new MeanStandardDeviationStochastConfiguration(); - var storageStructureArea = new MeanVariationCoefficientStochastConfiguration(); - var flowWidthAtBottomProtection = new MeanStandardDeviationStochastConfiguration(); - var criticalOvertoppingDischarge = new MeanVariationCoefficientStochastConfiguration(); - var widthFlowApertures = new MeanStandardDeviationStochastConfiguration(); + var modelFactorSuperCriticalFlow = new StochastConfiguration(); + var stormDuration = new StochastConfiguration(); + var allowedLevelIncreaseStorage = new StochastConfiguration(); + var storageStructureArea = new StochastConfiguration(); + var flowWidthAtBottomProtection = new StochastConfiguration(); + var criticalOvertoppingDischarge = new StochastConfiguration(); + var widthFlowApertures = new StochastConfiguration(); var waveReduction = new WaveReductionConfiguration(); // Call Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/Ringtoets.Common.IO.Test.csproj =================================================================== diff -u -r335523a40d190e19b1061804de21c28f74140f52 -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/Ringtoets.Common.IO.Test.csproj (.../Ringtoets.Common.IO.Test.csproj) (revision 335523a40d190e19b1061804de21c28f74140f52) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/Ringtoets.Common.IO.Test.csproj (.../Ringtoets.Common.IO.Test.csproj) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -66,8 +66,7 @@ - - + Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/Writers/SchemaCalculationConfigurationWriterTest.cs =================================================================== diff -u -rd894f307cf5b3dbf88dfdb926d6a70364f2d356d -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/Writers/SchemaCalculationConfigurationWriterTest.cs (.../SchemaCalculationConfigurationWriterTest.cs) (revision d894f307cf5b3dbf88dfdb926d6a70364f2d356d) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/Writers/SchemaCalculationConfigurationWriterTest.cs (.../SchemaCalculationConfigurationWriterTest.cs) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -76,7 +76,7 @@ TestDelegate test = () => ExposedSchemaCalculationConfigurationWriter.PublicWriteDistributionWhenAvailable( null, "some name", - (MeanStandardDeviationStochastConfiguration)null); + (StochastConfiguration)null); // Assert var exception = Assert.Throws(test); @@ -95,7 +95,7 @@ TestDelegate test = () => ExposedSchemaCalculationConfigurationWriter.PublicWriteDistributionWhenAvailable( xmlWriter, null, - (MeanStandardDeviationStochastConfiguration)null); + (StochastConfiguration)null); // Assert var exception = Assert.Throws(test); @@ -114,7 +114,7 @@ ExposedSchemaCalculationConfigurationWriter.PublicWriteDistributionWhenAvailable( xmlWriter, "some name", - (MeanStandardDeviationStochastConfiguration)null); + (StochastConfiguration)null); // Assert mocks.VerifyAll(); @@ -125,7 +125,7 @@ { // Setup const string name = "some name"; - var configuration = new MeanStandardDeviationStochastConfiguration(); + var configuration = new StochastConfiguration(); var mocks = new MockRepository(); var xmlWriter = mocks.StrictMock(); @@ -143,21 +143,21 @@ } [Test] - public void WriteDistributionWhenAvailable_MeanVariationCoefficientStochastConfigurationWriterNull_ThrowsArgumentNullException() + public void WriteDistributionWhenAvailable_StochastConfigurationWriterNull_ThrowsArgumentNullException() { // Call TestDelegate test = () => ExposedSchemaCalculationConfigurationWriter.PublicWriteDistributionWhenAvailable( null, "some name", - (MeanVariationCoefficientStochastConfiguration)null); + (StochastConfiguration)null); // Assert var exception = Assert.Throws(test); Assert.AreEqual("writer", exception.ParamName); } [Test] - public void WriteDistributionWhenAvailable_MeanVariationCoefficientStochastConfigurationDistributionNameNull_ThrowsArgumentNullException() + public void WriteDistributionWhenAvailable_StochastConfigurationDistributionNameNull_ThrowsArgumentNullException() { // Setup var mocks = new MockRepository(); @@ -168,15 +168,15 @@ TestDelegate test = () => ExposedSchemaCalculationConfigurationWriter.PublicWriteDistributionWhenAvailable( xmlWriter, null, - (MeanVariationCoefficientStochastConfiguration)null); + (StochastConfiguration)null); // Assert var exception = Assert.Throws(test); Assert.AreEqual("distributionName", exception.ParamName); } [Test] - public void WriteDistributionWhenAvailable_MeanVariationCoefficientStochastConfigurationNull_WriterNotCalled() + public void WriteDistributionWhenAvailable_StochastConfigurationNull_WriterNotCalled() { // Setup var mocks = new MockRepository(); @@ -187,18 +187,18 @@ ExposedSchemaCalculationConfigurationWriter.PublicWriteDistributionWhenAvailable( xmlWriter, "some name", - (MeanVariationCoefficientStochastConfiguration)null); + (StochastConfiguration)null); // Assert mocks.VerifyAll(); } [Test] - public void WriteDistributionWhenAvailable_MeanVariationCoefficientStochastConfigurationSet_WriterCalledWithExpectedParameters() + public void WriteDistributionWhenAvailable_StochastConfigurationSet_WriterCalledWithExpectedParameters() { // Setup const string name = "some name"; - var configuration = new MeanVariationCoefficientStochastConfiguration(); + var configuration = new StochastConfiguration(); var mocks = new MockRepository(); var xmlWriter = mocks.StrictMock(); @@ -471,16 +471,11 @@ { public ExposedSchemaCalculationConfigurationWriter(string filePath) : base(filePath) {} - public static void PublicWriteDistributionWhenAvailable(XmlWriter writer, string distributionName, MeanVariationCoefficientStochastConfiguration configuration) + public static void PublicWriteDistributionWhenAvailable(XmlWriter writer, string distributionName, StochastConfiguration configuration) { WriteDistributionWhenAvailable(writer, distributionName, configuration); } - public static void PublicWriteDistributionWhenAvailable(XmlWriter writer, string distributionName, MeanStandardDeviationStochastConfiguration configuration) - { - WriteDistributionWhenAvailable(writer, distributionName, configuration); - } - public static void PublicWriteElementWhenContentAvailable(XmlWriter writer, string elementName, string elementContent) { WriteElementWhenContentAvailable(writer, elementName, elementContent); Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/Writers/StructureCalculationConfigurationWriterTest.cs =================================================================== diff -u -r8963d5e5c4a22feba25c4e936e6b67de7104cccd -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/Writers/StructureCalculationConfigurationWriterTest.cs (.../StructureCalculationConfigurationWriterTest.cs) (revision 8963d5e5c4a22feba25c4e936e6b67de7104cccd) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/Writers/StructureCalculationConfigurationWriterTest.cs (.../StructureCalculationConfigurationWriterTest.cs) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -109,35 +109,35 @@ { return new SimpleStructuresCalculationConfiguration(name) { - AllowedLevelIncreaseStorage = new MeanStandardDeviationStochastConfiguration + AllowedLevelIncreaseStorage = new StochastConfiguration { Mean = 1.2, StandardDeviation = 3.4 }, - CriticalOvertoppingDischarge = new MeanVariationCoefficientStochastConfiguration + CriticalOvertoppingDischarge = new StochastConfiguration { Mean = 22.2, VariationCoefficient = 2.1 }, FailureProbabilityStructureWithErosion = 2.1, - FlowWidthAtBottomProtection = new MeanStandardDeviationStochastConfiguration + FlowWidthAtBottomProtection = new StochastConfiguration { Mean = 5.4, StandardDeviation = 1.1 }, ForeshoreProfileName = "Voorland", HydraulicBoundaryLocationName = "Randvoorwaardelocatie", - ModelFactorSuperCriticalFlow = new MeanStandardDeviationStochastConfiguration + ModelFactorSuperCriticalFlow = new StochastConfiguration { Mean = 322.2, StandardDeviation = 91.2 }, - StorageStructureArea = new MeanVariationCoefficientStochastConfiguration + StorageStructureArea = new StochastConfiguration { Mean = 11.122, VariationCoefficient = 32.111 }, - StormDuration = new MeanVariationCoefficientStochastConfiguration + StormDuration = new StochastConfiguration { Mean = 21.22, VariationCoefficient = 1.2 @@ -151,7 +151,7 @@ BreakWaterHeight = 111111.2, UseForeshoreProfile = true }, - WidthFlowApertures = new MeanStandardDeviationStochastConfiguration + WidthFlowApertures = new StochastConfiguration { Mean = 121.3, StandardDeviation = 222.1 @@ -190,7 +190,7 @@ { if (writeExtraParameterAndStochast) { - writer.WriteDistribution("testStochastName", new MeanStandardDeviationStochastConfiguration()); + writer.WriteDistribution("testStochastName", new StochastConfiguration()); } } } Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/Writers/XmlWriterExtensionsTest.cs =================================================================== diff -u -r1fea24f00be5ae78cf5ceba066bae1056c0e5a2e -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/Writers/XmlWriterExtensionsTest.cs (.../XmlWriterExtensionsTest.cs) (revision 1fea24f00be5ae78cf5ceba066bae1056c0e5a2e) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/Writers/XmlWriterExtensionsTest.cs (.../XmlWriterExtensionsTest.cs) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -25,7 +25,6 @@ using System.Xml; using Core.Common.TestUtil; using NUnit.Framework; -using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.IO.Configurations; using Ringtoets.Common.IO.Writers; @@ -34,70 +33,56 @@ [TestFixture] public class XmlWriterExtensionsTest { - private static readonly string testDirectory = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, nameof(CalculationConfigurationWriter)); + private static readonly string testDirectory = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, nameof(XmlWriterExtensions)); public static IEnumerable GetDistributions() { yield return new TestCaseData( - new MeanStandardDeviationStochastConfiguration(), - "distributionNoMeanNoStandardDeviation.xml") - .SetName("Distribution with no mean and no standard deviation."); + new StochastConfiguration(), + "distributionEmpty.xml") + .SetName("Distribution with no parameters."); yield return new TestCaseData( - new MeanStandardDeviationStochastConfiguration + new StochastConfiguration { - StandardDeviation = 0.1 + Mean = 0.2 }, - "distributionNoMean.xml") - .SetName("Distribution with no mean."); + "distributionMean.xml") + .SetName("Distribution with mean."); yield return new TestCaseData( - new MeanStandardDeviationStochastConfiguration + new StochastConfiguration { - Mean = 0.2 + StandardDeviation = 0.1 }, - "distributionNoStandardDeviation.xml") - .SetName("Distribution with no standard deviation."); + "distributionStandardDeviation.xml") + .SetName("Distribution with standard deviation."); + yield return new TestCaseData( - new MeanStandardDeviationStochastConfiguration + new StochastConfiguration { Mean = 0.2, StandardDeviation = 0.1 }, - "distribution.xml") + "distributionMeanStandardDeviation.xml") .SetName("Distribution with mean and standard deviation."); - } - public static IEnumerable GetVariationCoefficientDistributions() - { yield return new TestCaseData( - new MeanVariationCoefficientStochastConfiguration(), - "variationCoefficientDistributionNoMeanNoVariationCoefficient.xml") - .SetName("Variation coefficient distribution with no mean and no variation coefficient."); - - yield return new TestCaseData( - new MeanVariationCoefficientStochastConfiguration + new StochastConfiguration { VariationCoefficient = 0.1 }, - "variationCoefficientDistributionNoMean.xml") - .SetName("Variation coefficient distribution with no mean."); + "distributionVariationCoefficient.xml") + .SetName("Distribution with variation coefficient."); yield return new TestCaseData( - new MeanVariationCoefficientStochastConfiguration + new StochastConfiguration { - Mean = 0.2 - }, - "variationCoefficientDistributionNoVariationCoefficient.xml") - .SetName("Variation coefficient distribution with no variation coefficient."); - yield return new TestCaseData( - new MeanVariationCoefficientStochastConfiguration - { Mean = 0.2, VariationCoefficient = 0.1 }, - "variationCoefficientDistribution.xml") - .SetName("Variation coefficient distribution with mean and variation coefficient."); + "distributionMeanVariationCoefficient.xml") + .SetName("Distribution with mean and variation coefficient."); } public static IEnumerable GetWaveReductions() @@ -223,37 +208,10 @@ } [Test] - [TestCaseSource(nameof(GetDistributions))] - public void WriteDistribution_WithDifferentSetParameters_WritesStochastWithSetParameters(MeanStandardDeviationStochastConfiguration distribution, string fileName) - { - // Setup - string filePath = TestHelper.GetScratchPadPath(nameof(WriteDistribution_WithDifferentSetParameters_WritesStochastWithSetParameters)); - const string name = "normal"; - - try - { - using (XmlWriter xmlWriter = CreateXmlWriter(filePath)) - { - // Call - xmlWriter.WriteDistribution(name, distribution); - } - - // Assert - string actualXml = File.ReadAllText(filePath); - string expectedXml = GetTestFileContent(fileName); - Assert.AreEqual(expectedXml, actualXml); - } - finally - { - File.Delete(filePath); - } - } - - [Test] public void WriteDistribution_StandardDeviationDistributionWithoutWriter_ThrowsArgumentNullException() { // Call - TestDelegate testDelegate = () => ((XmlWriter) null).WriteDistribution("name", new MeanStandardDeviationStochastConfiguration()); + TestDelegate testDelegate = () => ((XmlWriter) null).WriteDistribution("name", new StochastConfiguration()); // Assert var exception = Assert.Throws(testDelegate); @@ -271,7 +229,7 @@ using (XmlWriter xmlWriter = CreateXmlWriter(filePath)) { // Call - TestDelegate testDelegate = () => xmlWriter.WriteDistribution(null, new MeanStandardDeviationStochastConfiguration()); + TestDelegate testDelegate = () => xmlWriter.WriteDistribution(null, new StochastConfiguration()); // Assert var exception = Assert.Throws(testDelegate); @@ -295,7 +253,7 @@ using (XmlWriter xmlWriter = CreateXmlWriter(filePath)) { // Call - TestDelegate testDelegate = () => xmlWriter.WriteDistribution("name", (MeanStandardDeviationStochastConfiguration) null); + TestDelegate testDelegate = () => xmlWriter.WriteDistribution("name", (StochastConfiguration) null); // Assert var exception = Assert.Throws(testDelegate); @@ -309,12 +267,12 @@ } [Test] - [TestCaseSource(nameof(GetVariationCoefficientDistributions))] - public void WriteDistribution_WithDifferentSetParameters_WritesStochastWithSetParameters(MeanVariationCoefficientStochastConfiguration distribution, string fileName) + [TestCaseSource(nameof(GetDistributions))] + public void WriteDistribution_WithDifferentSetParameters_WritesStochastWithSetParameters(StochastConfiguration distribution, string fileName) { // Setup string filePath = TestHelper.GetScratchPadPath(nameof(WriteDistribution_WithDifferentSetParameters_WritesStochastWithSetParameters)); - const string name = "variation coefficient normal"; + const string name = "distribution"; try { @@ -339,7 +297,7 @@ public void WriteDistribution_VariationCoefficientDistributionWithoutWriter_ThrowsArgumentNullException() { // Call - TestDelegate testDelegate = () => ((XmlWriter) null).WriteDistribution("name", new MeanVariationCoefficientStochastConfiguration()); + TestDelegate testDelegate = () => ((XmlWriter) null).WriteDistribution("name", new StochastConfiguration()); // Assert var exception = Assert.Throws(testDelegate); @@ -357,7 +315,7 @@ using (XmlWriter xmlWriter = CreateXmlWriter(filePath)) { // Call - TestDelegate testDelegate = () => xmlWriter.WriteDistribution(null, new MeanVariationCoefficientStochastConfiguration()); + TestDelegate testDelegate = () => xmlWriter.WriteDistribution(null, new StochastConfiguration()); // Assert var exception = Assert.Throws(testDelegate); @@ -381,7 +339,7 @@ using (XmlWriter xmlWriter = CreateXmlWriter(filePath)) { // Call - TestDelegate testDelegate = () => xmlWriter.WriteDistribution("name", (MeanVariationCoefficientStochastConfiguration) null); + TestDelegate testDelegate = () => xmlWriter.WriteDistribution("name", (StochastConfiguration) null); // Assert var exception = Assert.Throws(testDelegate); Fisheye: Tag eeac9fe0e250075e6e95683e4781b7b96ddc178c refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/CalculationConfigurationWriter/distribution.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag eeac9fe0e250075e6e95683e4781b7b96ddc178c refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/CalculationConfigurationWriter/distributionNoMean.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag eeac9fe0e250075e6e95683e4781b7b96ddc178c refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/CalculationConfigurationWriter/distributionNoMeanNoStandardDeviation.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag eeac9fe0e250075e6e95683e4781b7b96ddc178c refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/CalculationConfigurationWriter/distributionNoStandardDeviation.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag eeac9fe0e250075e6e95683e4781b7b96ddc178c refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/CalculationConfigurationWriter/simpleFolder.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag eeac9fe0e250075e6e95683e4781b7b96ddc178c refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/CalculationConfigurationWriter/variationCoefficientDistribution.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag eeac9fe0e250075e6e95683e4781b7b96ddc178c refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/CalculationConfigurationWriter/variationCoefficientDistributionNoMean.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag eeac9fe0e250075e6e95683e4781b7b96ddc178c refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/CalculationConfigurationWriter/variationCoefficientDistributionNoMeanNoVariationCoefficient.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag eeac9fe0e250075e6e95683e4781b7b96ddc178c refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/CalculationConfigurationWriter/variationCoefficientDistributionNoVariationCoefficient.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag eeac9fe0e250075e6e95683e4781b7b96ddc178c refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/CalculationConfigurationWriter/waveReduction.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag eeac9fe0e250075e6e95683e4781b7b96ddc178c refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/CalculationConfigurationWriter/waveReductionWithoutBreakWaterHeight.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag eeac9fe0e250075e6e95683e4781b7b96ddc178c refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/CalculationConfigurationWriter/waveReductionWithoutBreakWaterType.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag eeac9fe0e250075e6e95683e4781b7b96ddc178c refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/CalculationConfigurationWriter/waveReductionWithoutParameters.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag eeac9fe0e250075e6e95683e4781b7b96ddc178c refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/CalculationConfigurationWriter/waveReductionWithoutUseBreakWater.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag eeac9fe0e250075e6e95683e4781b7b96ddc178c refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/CalculationConfigurationWriter/waveReductionWithoutUseForeshoreProfile.xml'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/distributionEmpty.xml =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/distributionEmpty.xml (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/distributionEmpty.xml (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -0,0 +1 @@ + \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/distributionMean.xml =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/distributionMean.xml (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/distributionMean.xml (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -0,0 +1,3 @@ + + 0.2 + \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/distributionMeanStandardDeviation.xml =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/distributionMeanStandardDeviation.xml (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/distributionMeanStandardDeviation.xml (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -0,0 +1,4 @@ + + 0.2 + 0.1 + \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/distributionMeanVariationCoefficient.xml =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/distributionMeanVariationCoefficient.xml (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/distributionMeanVariationCoefficient.xml (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -0,0 +1,4 @@ + + 0.2 + 0.1 + \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/distributionStandardDeviation.xml =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/distributionStandardDeviation.xml (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/distributionStandardDeviation.xml (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -0,0 +1,3 @@ + + 0.1 + \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/distributionVariationCoefficient.xml =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/distributionVariationCoefficient.xml (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/distributionVariationCoefficient.xml (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -0,0 +1,3 @@ + + 0.1 + \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/simpleFolder.xml =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/simpleFolder.xml (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/simpleFolder.xml (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -0,0 +1 @@ + \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/waveReduction.xml =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/waveReduction.xml (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/waveReduction.xml (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -0,0 +1,6 @@ + + true + havendam + 2.33 + false + \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/waveReductionWithoutBreakWaterHeight.xml =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/waveReductionWithoutBreakWaterHeight.xml (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/waveReductionWithoutBreakWaterHeight.xml (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -0,0 +1,5 @@ + + true + caisson + false + \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/waveReductionWithoutBreakWaterType.xml =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/waveReductionWithoutBreakWaterType.xml (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/waveReductionWithoutBreakWaterType.xml (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -0,0 +1,5 @@ + + false + 12.66 + true + \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/waveReductionWithoutParameters.xml =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/waveReductionWithoutParameters.xml (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/waveReductionWithoutParameters.xml (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -0,0 +1 @@ + \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/waveReductionWithoutUseBreakWater.xml =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/waveReductionWithoutUseBreakWater.xml (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/waveReductionWithoutUseBreakWater.xml (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -0,0 +1,5 @@ + + verticalewand + 23.4 + false + \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/waveReductionWithoutUseForeshoreProfile.xml =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/waveReductionWithoutUseForeshoreProfile.xml (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/XmlWriterExtensions/waveReductionWithoutUseForeshoreProfile.xml (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -0,0 +1,5 @@ + + true + havendam + 0.2 + \ No newline at end of file Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.IO/Configurations/HeightStructuresCalculationConfiguration.cs =================================================================== diff -u -r9a0e768e9ddbc5e4917201fdb864bb2247e5cd90 -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.IO/Configurations/HeightStructuresCalculationConfiguration.cs (.../HeightStructuresCalculationConfiguration.cs) (revision 9a0e768e9ddbc5e4917201fdb864bb2247e5cd90) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.IO/Configurations/HeightStructuresCalculationConfiguration.cs (.../HeightStructuresCalculationConfiguration.cs) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -39,6 +39,6 @@ /// /// Gets or sets the stochast configuration for the crest level for the structure. /// - public MeanStandardDeviationStochastConfiguration LevelCrestStructure { get; set; } + public StochastConfiguration LevelCrestStructure { get; set; } } } \ No newline at end of file Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.IO.Test/Configurations/HeightStructuresCalculationConfigurationTest.cs =================================================================== diff -u -r9a0e768e9ddbc5e4917201fdb864bb2247e5cd90 -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.IO.Test/Configurations/HeightStructuresCalculationConfigurationTest.cs (.../HeightStructuresCalculationConfigurationTest.cs) (revision 9a0e768e9ddbc5e4917201fdb864bb2247e5cd90) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.IO.Test/Configurations/HeightStructuresCalculationConfigurationTest.cs (.../HeightStructuresCalculationConfigurationTest.cs) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -56,7 +56,7 @@ public void SimpleProperties_SetNewValues_NewValuesSet() { // Setup - var levelCrestStructure = new MeanStandardDeviationStochastConfiguration(); + var levelCrestStructure = new StochastConfiguration(); var configuration = new HeightStructuresCalculationConfiguration("some name"); // Call Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.IO.Test/Configurations/HeightStructuresCalculationConfigurationWriterTest.cs =================================================================== diff -u -r9a0e768e9ddbc5e4917201fdb864bb2247e5cd90 -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.IO.Test/Configurations/HeightStructuresCalculationConfigurationWriterTest.cs (.../HeightStructuresCalculationConfigurationWriterTest.cs) (revision 9a0e768e9ddbc5e4917201fdb864bb2247e5cd90) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.IO.Test/Configurations/HeightStructuresCalculationConfigurationWriterTest.cs (.../HeightStructuresCalculationConfigurationWriterTest.cs) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -119,42 +119,42 @@ BreakWaterHeight = 1.23, UseForeshoreProfile = true }, - StormDuration = new MeanVariationCoefficientStochastConfiguration + StormDuration = new StochastConfiguration { Mean = 6.0, VariationCoefficient= 0.22 }, - ModelFactorSuperCriticalFlow = new MeanStandardDeviationStochastConfiguration + ModelFactorSuperCriticalFlow = new StochastConfiguration { Mean = 1.1, StandardDeviation = 0.14 }, - FlowWidthAtBottomProtection = new MeanStandardDeviationStochastConfiguration + FlowWidthAtBottomProtection = new StochastConfiguration { Mean = 15.2, StandardDeviation = 0.1 }, - WidthFlowApertures = new MeanStandardDeviationStochastConfiguration + WidthFlowApertures = new StochastConfiguration { Mean = 13.2, StandardDeviation = 0.3 }, - StorageStructureArea = new MeanVariationCoefficientStochastConfiguration + StorageStructureArea = new StochastConfiguration { Mean = 15000, VariationCoefficient = 0.01 }, - AllowedLevelIncreaseStorage = new MeanStandardDeviationStochastConfiguration + AllowedLevelIncreaseStorage = new StochastConfiguration { Mean = 0.2, StandardDeviation = 0.01 }, - LevelCrestStructure = new MeanStandardDeviationStochastConfiguration + LevelCrestStructure = new StochastConfiguration { Mean = 4.3, StandardDeviation = 0.2 }, - CriticalOvertoppingDischarge = new MeanVariationCoefficientStochastConfiguration + CriticalOvertoppingDischarge = new StochastConfiguration { Mean = 2, VariationCoefficient = 0.1 Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.IO/Configurations/StabilityPointStructuresCalculationConfiguration.cs =================================================================== diff -u -r56beff6e761d1d6f07fcd566791a03baad5c7358 -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.IO/Configurations/StabilityPointStructuresCalculationConfiguration.cs (.../StabilityPointStructuresCalculationConfiguration.cs) (revision 56beff6e761d1d6f07fcd566791a03baad5c7358) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.IO/Configurations/StabilityPointStructuresCalculationConfiguration.cs (.../StabilityPointStructuresCalculationConfiguration.cs) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -39,27 +39,27 @@ /// /// Gets or sets the stochast configuration for the area flow apertures of the structure. /// - public MeanStandardDeviationStochastConfiguration AreaFlowApertures { get; set; } + public StochastConfiguration AreaFlowApertures { get; set; } /// /// Gets or sets the stochast configuration for the bank width of the structure. /// - public MeanStandardDeviationStochastConfiguration BankWidth { get; set; } + public StochastConfiguration BankWidth { get; set; } /// /// Gets or sets the stochast configuration for the constructive strength of the linear load model of the structure. /// - public MeanVariationCoefficientStochastConfiguration ConstructiveStrengthLinearLoadModel { get; set; } + public StochastConfiguration ConstructiveStrengthLinearLoadModel { get; set; } /// /// Gets or sets the stochast configuration for the constructive strength of the quadratic load model of the structure. /// - public MeanVariationCoefficientStochastConfiguration ConstructiveStrengthQuadraticLoadModel { get; set; } + public StochastConfiguration ConstructiveStrengthQuadraticLoadModel { get; set; } /// /// Gets or sets the stochast configuration for the drain coefficient of the structure. /// - public MeanStandardDeviationStochastConfiguration DrainCoefficient { get; set; } + public StochastConfiguration DrainCoefficient { get; set; } /// /// Gets or sets the evaluation level of the structure. @@ -69,7 +69,7 @@ /// /// Gets or sets the stochast configuration for the failure collision energy of the structure. /// - public MeanVariationCoefficientStochastConfiguration FailureCollisionEnergy { get; set; } + public StochastConfiguration FailureCollisionEnergy { get; set; } /// /// Gets or sets the failure probability of repairing a closure of the structure. @@ -79,7 +79,7 @@ /// /// Gets or sets the stochast configuration for the flow velocity structure closable of the structure. /// - public MeanVariationCoefficientStochastConfiguration FlowVelocityStructureClosable { get; set; } + public StochastConfiguration FlowVelocityStructureClosable { get; set; } /// /// Gets or sets the inflow model type of the structure. @@ -89,17 +89,17 @@ /// /// Gets or sets the stochast configuration for the inside water level of the structure. /// - public MeanStandardDeviationStochastConfiguration InsideWaterLevel { get; set; } + public StochastConfiguration InsideWaterLevel { get; set; } /// /// Gets or sets the stochast configuration for the inside water level failure construction of the structure. /// - public MeanStandardDeviationStochastConfiguration InsideWaterLevelFailureConstruction { get; set; } + public StochastConfiguration InsideWaterLevelFailureConstruction { get; set; } /// /// Gets or sets the stochast configuration for the crest level of the structure. /// - public MeanStandardDeviationStochastConfiguration LevelCrestStructure { get; set; } + public StochastConfiguration LevelCrestStructure { get; set; } /// /// Gets or sets the leveling count of the structure. @@ -119,27 +119,27 @@ /// /// Gets or sets the stochast configuration for the mass of the ship. /// - public MeanVariationCoefficientStochastConfiguration ShipMass { get; set; } + public StochastConfiguration ShipMass { get; set; } /// /// Gets or sets the stochast configuration for the velocity of the ship. /// - public MeanVariationCoefficientStochastConfiguration ShipVelocity { get; set; } + public StochastConfiguration ShipVelocity { get; set; } /// /// Gets or sets the stochast configuration for the stability properties of the linear load model of the structure. /// - public MeanVariationCoefficientStochastConfiguration StabilityLinearLoadModel { get; set; } + public StochastConfiguration StabilityLinearLoadModel { get; set; } /// /// Gets or sets the stochast configuration for the stability properties of the quadratic load model of the structure. /// - public MeanVariationCoefficientStochastConfiguration StabilityQuadraticLoadModel { get; set; } + public StochastConfiguration StabilityQuadraticLoadModel { get; set; } /// /// Gets or sets the stochast configuration for the threshold height of the open weir of the structure. /// - public MeanStandardDeviationStochastConfiguration ThresholdHeightOpenWeir { get; set; } + public StochastConfiguration ThresholdHeightOpenWeir { get; set; } /// /// Gets or sets the vertical distance of the structure. Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/Configurations/StabilityPointStructuresCalculationConfigurationTest.cs =================================================================== diff -u -r56beff6e761d1d6f07fcd566791a03baad5c7358 -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/Configurations/StabilityPointStructuresCalculationConfigurationTest.cs (.../StabilityPointStructuresCalculationConfigurationTest.cs) (revision 56beff6e761d1d6f07fcd566791a03baad5c7358) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/Configurations/StabilityPointStructuresCalculationConfigurationTest.cs (.../StabilityPointStructuresCalculationConfigurationTest.cs) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -86,22 +86,22 @@ var configuration = new StabilityPointStructuresCalculationConfiguration("some name"); var random = new Random(5432); - var areaFlowApertures = new MeanStandardDeviationStochastConfiguration(); - var bankWidth = new MeanStandardDeviationStochastConfiguration(); - var drainCoefficient = new MeanStandardDeviationStochastConfiguration(); - var insideWaterLevel = new MeanStandardDeviationStochastConfiguration(); - var insideWaterLevelFailureConstruction = new MeanStandardDeviationStochastConfiguration(); - var levelCrestStructure = new MeanStandardDeviationStochastConfiguration(); - var thresholdHeightOpenWeir = new MeanStandardDeviationStochastConfiguration(); + var areaFlowApertures = new StochastConfiguration(); + var bankWidth = new StochastConfiguration(); + var drainCoefficient = new StochastConfiguration(); + var insideWaterLevel = new StochastConfiguration(); + var insideWaterLevelFailureConstruction = new StochastConfiguration(); + var levelCrestStructure = new StochastConfiguration(); + var thresholdHeightOpenWeir = new StochastConfiguration(); - var constructiveStrengthLinearLoadModel = new MeanVariationCoefficientStochastConfiguration(); - var constructiveStrengthQuadraticLoadModel = new MeanVariationCoefficientStochastConfiguration(); - var failureCollisionEnergy = new MeanVariationCoefficientStochastConfiguration(); - var flowVelocityStructureClosable = new MeanVariationCoefficientStochastConfiguration(); - var shipMass = new MeanVariationCoefficientStochastConfiguration(); - var shipVelocity = new MeanVariationCoefficientStochastConfiguration(); - var stabilityLinearLoadModel = new MeanVariationCoefficientStochastConfiguration(); - var stabilityQuadraticLoadModel = new MeanVariationCoefficientStochastConfiguration(); + var constructiveStrengthLinearLoadModel = new StochastConfiguration(); + var constructiveStrengthQuadraticLoadModel = new StochastConfiguration(); + var failureCollisionEnergy = new StochastConfiguration(); + var flowVelocityStructureClosable = new StochastConfiguration(); + var shipMass = new StochastConfiguration(); + var shipVelocity = new StochastConfiguration(); + var stabilityLinearLoadModel = new StochastConfiguration(); + var stabilityQuadraticLoadModel = new StochastConfiguration(); int levellingCount = random.Next(); double evaluationLevel = random.NextDouble(); Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/Configurations/StabilityPointStructuresCalculationConfigurationWriterTest.cs =================================================================== diff -u -r56beff6e761d1d6f07fcd566791a03baad5c7358 -reeac9fe0e250075e6e95683e4781b7b96ddc178c --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/Configurations/StabilityPointStructuresCalculationConfigurationWriterTest.cs (.../StabilityPointStructuresCalculationConfigurationWriterTest.cs) (revision 56beff6e761d1d6f07fcd566791a03baad5c7358) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/Configurations/StabilityPointStructuresCalculationConfigurationWriterTest.cs (.../StabilityPointStructuresCalculationConfigurationWriterTest.cs) (revision eeac9fe0e250075e6e95683e4781b7b96ddc178c) @@ -103,126 +103,126 @@ { return new StabilityPointStructuresCalculationConfiguration("Berekening 1") { - AllowedLevelIncreaseStorage = new MeanStandardDeviationStochastConfiguration + AllowedLevelIncreaseStorage = new StochastConfiguration { Mean = 0.01, StandardDeviation = 0.11 }, - AreaFlowApertures = new MeanStandardDeviationStochastConfiguration + AreaFlowApertures = new StochastConfiguration { Mean = 0.02, StandardDeviation = 0.12 }, - BankWidth = new MeanStandardDeviationStochastConfiguration + BankWidth = new StochastConfiguration { Mean = 0.03, StandardDeviation = 0.13 }, - ConstructiveStrengthLinearLoadModel = new MeanVariationCoefficientStochastConfiguration + ConstructiveStrengthLinearLoadModel = new StochastConfiguration { Mean = 0.04, VariationCoefficient = 0.14 }, - ConstructiveStrengthQuadraticLoadModel = new MeanVariationCoefficientStochastConfiguration + ConstructiveStrengthQuadraticLoadModel = new StochastConfiguration { Mean = 0.05, VariationCoefficient = 0.15 }, - CriticalOvertoppingDischarge = new MeanVariationCoefficientStochastConfiguration + CriticalOvertoppingDischarge = new StochastConfiguration { Mean = 0.06, VariationCoefficient = 0.16 }, - DrainCoefficient = new MeanStandardDeviationStochastConfiguration + DrainCoefficient = new StochastConfiguration { Mean = 0.01, StandardDeviation = 0.02 }, EvaluationLevel = 1.1, FactorStormDurationOpenStructure = 1.123, - FailureCollisionEnergy = new MeanVariationCoefficientStochastConfiguration + FailureCollisionEnergy = new StochastConfiguration { Mean = 0.07, VariationCoefficient = 0.17 }, FailureProbabilityRepairClosure = 2.2, FailureProbabilityStructureWithErosion = 3.3, - FlowVelocityStructureClosable = new MeanVariationCoefficientStochastConfiguration + FlowVelocityStructureClosable = new StochastConfiguration { Mean = 0.08, VariationCoefficient = 0.18 }, - FlowWidthAtBottomProtection = new MeanStandardDeviationStochastConfiguration + FlowWidthAtBottomProtection = new StochastConfiguration { Mean = 0.09, StandardDeviation = 0.19 }, ForeshoreProfileName = "profiel1", HydraulicBoundaryLocationName = "Locatie1", InflowModelType = ConfigurationStabilityPointStructuresInflowModelType.FloodedCulvert, - InsideWaterLevel = new MeanStandardDeviationStochastConfiguration + InsideWaterLevel = new StochastConfiguration { Mean = 0.1, StandardDeviation = 0.20 }, - InsideWaterLevelFailureConstruction = new MeanStandardDeviationStochastConfiguration + InsideWaterLevelFailureConstruction = new StochastConfiguration { Mean = 0.11, StandardDeviation = 0.21 }, - LevelCrestStructure = new MeanStandardDeviationStochastConfiguration + LevelCrestStructure = new StochastConfiguration { Mean = 0.12, StandardDeviation = 0.22 }, LevellingCount = 4, LoadSchematizationType = ConfigurationStabilityPointStructuresLoadSchematizationType.Linear, - ModelFactorSuperCriticalFlow = new MeanStandardDeviationStochastConfiguration + ModelFactorSuperCriticalFlow = new StochastConfiguration { Mean = 0.13, StandardDeviation = 0.23 }, ProbabilityCollisionSecondaryStructure = 5.5, - ShipMass = new MeanVariationCoefficientStochastConfiguration + ShipMass = new StochastConfiguration { Mean = 0.14, VariationCoefficient = 0.24 }, - ShipVelocity = new MeanVariationCoefficientStochastConfiguration + ShipVelocity = new StochastConfiguration { Mean = 0.15, VariationCoefficient = 0.25 }, - StabilityLinearLoadModel = new MeanVariationCoefficientStochastConfiguration + StabilityLinearLoadModel = new StochastConfiguration { Mean = 0.16, VariationCoefficient = 0.26 }, - StabilityQuadraticLoadModel = new MeanVariationCoefficientStochastConfiguration + StabilityQuadraticLoadModel = new StochastConfiguration { Mean = 0.17, VariationCoefficient = 0.27 }, - StormDuration = new MeanVariationCoefficientStochastConfiguration + StormDuration = new StochastConfiguration { Mean = 0.18, VariationCoefficient = 0.28 }, StructureName = "kunstwerk1", StructureNormalOrientation = 6.6, - StorageStructureArea = new MeanVariationCoefficientStochastConfiguration + StorageStructureArea = new StochastConfiguration { Mean = 0.19, VariationCoefficient = 0.29 }, - ThresholdHeightOpenWeir = new MeanStandardDeviationStochastConfiguration + ThresholdHeightOpenWeir = new StochastConfiguration { Mean = 0.20, StandardDeviation = 0.30 }, VerticalDistance = 7.7, VolumicWeightWater = 9.9, - WidthFlowApertures = new MeanStandardDeviationStochastConfiguration + WidthFlowApertures = new StochastConfiguration { Mean = 0.21, StandardDeviation = 0.31