Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/HydraRingConfiguration.cs =================================================================== diff -u -rd40e54ca96fe9506016dbbf13b5664eaf7dce533 -r6cec21ca5e9396202bd248dfabc181857bf433a5 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/HydraRingConfiguration.cs (.../HydraRingConfiguration.cs) (revision d40e54ca96fe9506016dbbf13b5664eaf7dce533) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/HydraRingConfiguration.cs (.../HydraRingConfiguration.cs) (revision 6cec21ca5e9396202bd248dfabc181857bf433a5) @@ -344,7 +344,7 @@ "FormEpsBeta", subMechanismSettings.FormEpsBeta }, { - "FormEpsHOH", subMechanismSettings.FormEpsHOH + "FormEpsHOH", subMechanismSettings.FormEpsHoh }, { "FormEpsZFunc", subMechanismSettings.FormEpsZFunc Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Settings/FailureMechanismSettings.cs =================================================================== diff -u -r3ccf0a2ef0ecea8f42ca92344bb315199f3644a0 -r6cec21ca5e9396202bd248dfabc181857bf433a5 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Settings/FailureMechanismSettings.cs (.../FailureMechanismSettings.cs) (revision 3ccf0a2ef0ecea8f42ca92344bb315199f3644a0) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Settings/FailureMechanismSettings.cs (.../FailureMechanismSettings.cs) (revision 6cec21ca5e9396202bd248dfabc181857bf433a5) @@ -20,7 +20,7 @@ } /// - /// Gets or sets the minimum value to use while iterating to a target probability. + /// Gets the minimum value to use while iterating to a target probability. /// public double ValueMin { @@ -31,7 +31,7 @@ } /// - /// Gets or sets the maximum value to use while iterating to a target probability. + /// Gets the maximum value to use while iterating to a target probability. /// public double ValueMax { Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Settings/SubMechanismSettings.cs =================================================================== diff -u -rd40e54ca96fe9506016dbbf13b5664eaf7dce533 -r6cec21ca5e9396202bd248dfabc181857bf433a5 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Settings/SubMechanismSettings.cs (.../SubMechanismSettings.cs) (revision d40e54ca96fe9506016dbbf13b5664eaf7dce533) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Settings/SubMechanismSettings.cs (.../SubMechanismSettings.cs) (revision 6cec21ca5e9396202bd248dfabc181857bf433a5) @@ -26,80 +26,214 @@ /// public class SubMechanismSettings { + private readonly int calculationTechniqueId; + private readonly int formStartMethod; + private readonly int formNumberOfIterations; + private readonly double formRelaxationFactor; + private readonly double formEpsBeta; + private readonly double formEpsHoh; + private readonly double formEpsZFunc; + private readonly int dsStartMethod; + private readonly int dsMinNumberOfIterations; + private readonly int dsMaxNumberOfIterations; + private readonly double dsVarCoefficient; + private readonly double niUMin; + private readonly double niUMax; + private readonly int niNumberSteps; + /// - /// Gets or sets the id of the calculation technique that should be used. + /// Creates a new instance of the class. /// - public int CalculationTechniqueId { get; set; } + /// The id of the calculation technique that should be used. + /// The FORM start method. + /// The maximum number of FORM iterations to perform. + /// A relaxation towards the design point for FORM. + /// One of the three convergence criteria for FORM. + /// One of the three convergence criteria for FORM. + /// One of the three convergence criteria for FORM. + /// The DIRS start method. + /// The minimum number of DIRS iterations to perform. + /// The maximum number of DIRS iterations to perform. + /// The variation coefficient to use within the DIRS iterations. + /// The lower size limit of a uniform grid deployed by NINT. + /// The upper size limit of a uniform grid deployed by NINT. + /// The number of steps between and for NINT + public SubMechanismSettings(int calculationTechniqueId, int formStartMethod, int formNumberOfIterations, double formRelaxationFactor, double formEpsBeta, double formEpsHoh, double formEpsZFunc, int dsStartMethod, int dsMinNumberOfIterations, int dsMaxNumberOfIterations, double dsVarCoefficient, double niUMin, double niUMax, int niNumberSteps) + { + this.calculationTechniqueId = calculationTechniqueId; + this.formStartMethod = formStartMethod; + this.formNumberOfIterations = formNumberOfIterations; + this.formRelaxationFactor = formRelaxationFactor; + this.formEpsBeta = formEpsBeta; + this.formEpsHoh = formEpsHoh; + this.formEpsZFunc = formEpsZFunc; + this.dsStartMethod = dsStartMethod; + this.dsMinNumberOfIterations = dsMinNumberOfIterations; + this.dsMaxNumberOfIterations = dsMaxNumberOfIterations; + this.dsVarCoefficient = dsVarCoefficient; + this.niUMin = niUMin; + this.niUMax = niUMax; + this.niNumberSteps = niNumberSteps; + } /// - /// Gets or set the FORM start method. + /// Gets the id of the calculation technique that should be used. /// - public int FormStartMethod { get; set; } + public int CalculationTechniqueId + { + get + { + return calculationTechniqueId; + } + } /// - /// Gets or set the maximum number of FORM iterations to perform. + /// Gets the FORM start method. /// - public int FormNumberOfIterations { get; set; } + public int FormStartMethod + { + get + { + return formStartMethod; + } + } /// - /// Gets or set a relaxation towards the design point for FORM. + /// Gets the maximum number of FORM iterations to perform. /// - public double FormRelaxationFactor { get; set; } + public int FormNumberOfIterations + { + get + { + return formNumberOfIterations; + } + } /// - /// Gets or set one of the three convergence criteria for FORM. + /// Gets a relaxation towards the design point for FORM. /// - /// + public double FormRelaxationFactor + { + get + { + return formRelaxationFactor; + } + } + + /// + /// Gets one of the three convergence criteria for FORM. + /// + /// /// - public double FormEpsBeta { get; set; } + public double FormEpsBeta + { + get + { + return formEpsBeta; + } + } /// - /// Gets or set one of the three convergence criteria for FORM. + /// Gets one of the three convergence criteria for FORM. /// /// /// - public double FormEpsHOH { get; set; } + public double FormEpsHoh + { + get + { + return formEpsHoh; + } + } /// - /// Gets or set one of the three convergence criteria for FORM. + /// Gets one of the three convergence criteria for FORM. /// /// - /// - public double FormEpsZFunc { get; set; } + /// + public double FormEpsZFunc + { + get + { + return formEpsZFunc; + } + } /// - /// Gets or set the DIRS start method. + /// Gets the DIRS start method. /// - public int DsStartMethod { get; set; } + public int DsStartMethod + { + get + { + return dsStartMethod; + } + } /// - /// Gets or set the minimum number of DIRS iterations to perform. + /// Gets the minimum number of DIRS iterations to perform. /// - public int DsMinNumberOfIterations { get; set; } + public int DsMinNumberOfIterations + { + get + { + return dsMinNumberOfIterations; + } + } /// - /// Gets or set the maximum number of DIRS iterations to perform. + /// Gets the maximum number of DIRS iterations to perform. /// - public int DsMaxNumberOfIterations { get; set; } + public int DsMaxNumberOfIterations + { + get + { + return dsMaxNumberOfIterations; + } + } /// - /// Gets or set the variation coefficient to use within the DIRS iterations. + /// Gets the variation coefficient to use within the DIRS iterations. /// - public double DsVarCoefficient { get; set; } + public double DsVarCoefficient + { + get + { + return dsVarCoefficient; + } + } /// - /// Gets or set the lower size limit of a uniform grid deployed by NINT. + /// Gets the lower size limit of a uniform grid deployed by NINT. /// - public double NiUMin { get; set; } + public double NiUMin + { + get + { + return niUMin; + } + } /// - /// Gets or set the upper size limit of a uniform grid deployed by NINT. + /// Gets the upper size limit of a uniform grid deployed by NINT. /// - public double NiUMax { get; set; } + public double NiUMax + { + get + { + return niUMax; + } + } /// - /// Gets or set the number of steps between and for NINT. + /// Gets the number of steps between and for NINT. /// - public int NiNumberSteps { get; set; } + public int NiNumberSteps + { + get + { + return niNumberSteps; + } + } } } \ No newline at end of file Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Settings/SubMechanismSettingsProvider.cs =================================================================== diff -u -rd40e54ca96fe9506016dbbf13b5664eaf7dce533 -r6cec21ca5e9396202bd248dfabc181857bf433a5 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Settings/SubMechanismSettingsProvider.cs (.../SubMechanismSettingsProvider.cs) (revision d40e54ca96fe9506016dbbf13b5664eaf7dce533) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Settings/SubMechanismSettingsProvider.cs (.../SubMechanismSettingsProvider.cs) (revision 6cec21ca5e9396202bd248dfabc181857bf433a5) @@ -42,581 +42,136 @@ HydraRingFailureMechanismType.AssessmentLevel, new Dictionary { { - 1, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 4, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 1, new SubMechanismSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) } } }, { HydraRingFailureMechanismType.WaveHeight, new Dictionary { { - 11, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 4, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 11, new SubMechanismSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) } } }, { HydraRingFailureMechanismType.WavePeakPeriod, new Dictionary { { - 14, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 4, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 14, new SubMechanismSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) } } }, { HydraRingFailureMechanismType.WaveSpectralPeriod, new Dictionary { { - 16, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 4, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 16, new SubMechanismSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) } } }, { HydraRingFailureMechanismType.QVariant, new Dictionary { { - 3, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 4, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 3, new SubMechanismSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 4, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 4, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 4, new SubMechanismSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 5, new SubMechanismSettings - { - CalculationTechniqueId = 4, - FormStartMethod = 4, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 5, new SubMechanismSettings(4, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) } } }, { HydraRingFailureMechanismType.DikesOvertopping, new Dictionary { { - 102, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 4, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 102, new SubMechanismSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 103, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 4, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 103, new SubMechanismSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) } } }, { HydraRingFailureMechanismType.DikesPiping, new Dictionary { { - 311, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 4, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 311, new SubMechanismSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 313, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 4, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 313, new SubMechanismSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 314, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 4, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 314, new SubMechanismSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) } } }, { HydraRingFailureMechanismType.StructuresOvertopping, new Dictionary { { - 421, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 4, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 421, new SubMechanismSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 422, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 4, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 422, new SubMechanismSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 423, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 4, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 423, new SubMechanismSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) } } }, { HydraRingFailureMechanismType.StructuresClosure, new Dictionary { { - 422, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 1, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 422, new SubMechanismSettings(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 424, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 4, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 424, new SubMechanismSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 425, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 4, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 425, new SubMechanismSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 426, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 1, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 426, new SubMechanismSettings(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 427, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 1, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 427, new SubMechanismSettings(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) } } }, { HydraRingFailureMechanismType.StructuresStructuralFailure, new Dictionary { { - 422, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 1, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 422, new SubMechanismSettings(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 424, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 1, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 424, new SubMechanismSettings(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 425, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 4, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 425, new SubMechanismSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 430, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 4, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 430, new SubMechanismSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 431, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 1, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 431, new SubMechanismSettings(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 432, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 1, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 432, new SubMechanismSettings(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 434, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 4, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 433, new SubMechanismSettings(1, 1, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) }, { - 435, new SubMechanismSettings - { - CalculationTechniqueId = 1, - FormStartMethod = 4, - FormNumberOfIterations = 50, - FormRelaxationFactor = 0.15, - FormEpsBeta = 0.01, - FormEpsHOH = 0.01, - FormEpsZFunc = 0.01, - DsStartMethod = 2, - DsMinNumberOfIterations = 10000, - DsMaxNumberOfIterations = 20000, - DsVarCoefficient = 0.1, - NiUMin = -6.0, - NiUMax = 6.0, - NiNumberSteps = 25 - } + 434, new SubMechanismSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) + }, + { + 435, new SubMechanismSettings(1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 10000, 20000, 0.1, -6.0, 6.0, 25) } } } Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Ringtoets.HydraRing.Calculation.Test.csproj =================================================================== diff -u -r3ccf0a2ef0ecea8f42ca92344bb315199f3644a0 -r6cec21ca5e9396202bd248dfabc181857bf433a5 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Ringtoets.HydraRing.Calculation.Test.csproj (.../Ringtoets.HydraRing.Calculation.Test.csproj) (revision 3ccf0a2ef0ecea8f42ca92344bb315199f3644a0) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Ringtoets.HydraRing.Calculation.Test.csproj (.../Ringtoets.HydraRing.Calculation.Test.csproj) (revision 6cec21ca5e9396202bd248dfabc181857bf433a5) @@ -51,6 +51,8 @@ + + Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Settings/FailureMechanismSettingsProviderTest.cs =================================================================== diff -u -r3ccf0a2ef0ecea8f42ca92344bb315199f3644a0 -r6cec21ca5e9396202bd248dfabc181857bf433a5 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Settings/FailureMechanismSettingsProviderTest.cs (.../FailureMechanismSettingsProviderTest.cs) (revision 3ccf0a2ef0ecea8f42ca92344bb315199f3644a0) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Settings/FailureMechanismSettingsProviderTest.cs (.../FailureMechanismSettingsProviderTest.cs) (revision 6cec21ca5e9396202bd248dfabc181857bf433a5) @@ -37,7 +37,8 @@ [TestCase(HydraRingFailureMechanismType.DikesPiping, double.NaN, double.NaN)] [TestCase(HydraRingFailureMechanismType.StructuresOvertopping, double.NaN, double.NaN)] [TestCase(HydraRingFailureMechanismType.StructuresClosure, double.NaN, double.NaN)] - public void GetFailureMechanismSettings_StructuresStructuralFailureDefaultsOnly_ReturnsExpectedFailureMechanismSettings(HydraRingFailureMechanismType failureMechanismType, double expectedValueMin, double expectedValueMax) + [TestCase(HydraRingFailureMechanismType.StructuresStructuralFailure, double.NaN, double.NaN)] + public void GetFailureMechanismSettings_DefaultsOnly_ReturnsExpectedFailureMechanismSettings(HydraRingFailureMechanismType failureMechanismType, double expectedValueMin, double expectedValueMax) { // Setup var failureMechanismSettingsProvider = new FailureMechanismSettingsProvider(); Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Settings/SubMechanismSettingsProviderTest.cs =================================================================== diff -u --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Settings/SubMechanismSettingsProviderTest.cs (revision 0) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Settings/SubMechanismSettingsProviderTest.cs (revision 6cec21ca5e9396202bd248dfabc181857bf433a5) @@ -0,0 +1,86 @@ +// 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 NUnit.Framework; +using Ringtoets.HydraRing.Calculation.Settings; +using Ringtoets.HydraRing.Calculation.Types; + +namespace Ringtoets.HydraRing.Calculation.Test.Settings +{ + [TestFixture] + public class SubMechanismSettingsProviderTest + { + [Test] + [TestCase(HydraRingFailureMechanismType.AssessmentLevel, 1, 1, 4)] + [TestCase(HydraRingFailureMechanismType.QVariant, 3, 1, 4)] + [TestCase(HydraRingFailureMechanismType.QVariant, 4, 1, 4)] + [TestCase(HydraRingFailureMechanismType.QVariant, 5, 4, 4)] + [TestCase(HydraRingFailureMechanismType.WaveHeight, 11, 1, 4)] + [TestCase(HydraRingFailureMechanismType.WavePeakPeriod, 14, 1, 4)] + [TestCase(HydraRingFailureMechanismType.WaveSpectralPeriod, 16, 1, 4)] + [TestCase(HydraRingFailureMechanismType.DikesOvertopping, 102, 1, 4)] + [TestCase(HydraRingFailureMechanismType.DikesOvertopping, 103, 1, 4)] + [TestCase(HydraRingFailureMechanismType.DikesPiping, 311, 1, 4)] + [TestCase(HydraRingFailureMechanismType.DikesPiping, 313, 1, 4)] + [TestCase(HydraRingFailureMechanismType.DikesPiping, 314, 1, 4)] + [TestCase(HydraRingFailureMechanismType.StructuresOvertopping, 421, 1, 4)] + [TestCase(HydraRingFailureMechanismType.StructuresOvertopping, 422, 1, 4)] + [TestCase(HydraRingFailureMechanismType.StructuresOvertopping, 423, 1, 4)] + [TestCase(HydraRingFailureMechanismType.StructuresClosure, 422, 1, 1)] + [TestCase(HydraRingFailureMechanismType.StructuresClosure, 424, 1, 4)] + [TestCase(HydraRingFailureMechanismType.StructuresClosure, 425, 1, 4)] + [TestCase(HydraRingFailureMechanismType.StructuresClosure, 426, 1, 1)] + [TestCase(HydraRingFailureMechanismType.StructuresClosure, 427, 1, 1)] + [TestCase(HydraRingFailureMechanismType.StructuresStructuralFailure, 422, 1, 1)] + [TestCase(HydraRingFailureMechanismType.StructuresStructuralFailure, 424, 1, 1)] + [TestCase(HydraRingFailureMechanismType.StructuresStructuralFailure, 425, 1, 4)] + [TestCase(HydraRingFailureMechanismType.StructuresStructuralFailure, 430, 1, 4)] + [TestCase(HydraRingFailureMechanismType.StructuresStructuralFailure, 431, 1, 1)] + [TestCase(HydraRingFailureMechanismType.StructuresStructuralFailure, 432, 1, 1)] + [TestCase(HydraRingFailureMechanismType.StructuresStructuralFailure, 433, 1, 1)] + [TestCase(HydraRingFailureMechanismType.StructuresStructuralFailure, 434, 1, 4)] + [TestCase(HydraRingFailureMechanismType.StructuresStructuralFailure, 435, 1, 4)] + public void GetSubMechanismSettings_DefaultsOnly_ReturnsExpectedSubMechanismSettings(HydraRingFailureMechanismType failureMechanismType, int subMechanismId, int expectedCalculationTechniqueId, int expectedFormStartMethod) + { + // Setup + var subMechanismSettingsProvider = new SubMechanismSettingsProvider(); + + // Call + var subMechanismSettings = subMechanismSettingsProvider.GetSubMechanismSettings(failureMechanismType, subMechanismId); + + // Assert + Assert.AreEqual(expectedCalculationTechniqueId, subMechanismSettings.CalculationTechniqueId); + Assert.AreEqual(expectedFormStartMethod, subMechanismSettings.FormStartMethod); + Assert.AreEqual(50, subMechanismSettings.FormNumberOfIterations); + Assert.AreEqual(0.15, subMechanismSettings.FormRelaxationFactor); + Assert.AreEqual(0.01, subMechanismSettings.FormEpsBeta); + Assert.AreEqual(0.01, subMechanismSettings.FormEpsHoh); + Assert.AreEqual(0.01, subMechanismSettings.FormEpsZFunc); + Assert.AreEqual(2, subMechanismSettings.DsStartMethod); + Assert.AreEqual(10000, subMechanismSettings.DsMinNumberOfIterations); + Assert.AreEqual(20000, subMechanismSettings.DsMaxNumberOfIterations); + Assert.AreEqual(0.1, subMechanismSettings.DsVarCoefficient); + Assert.AreEqual(-6.0, subMechanismSettings.NiUMin); + Assert.AreEqual(6.0, subMechanismSettings.NiUMax); + Assert.AreEqual(25, subMechanismSettings.NiNumberSteps); + } + } +} Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Settings/SubMechanismSettingsTest.cs =================================================================== diff -u --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Settings/SubMechanismSettingsTest.cs (revision 0) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Settings/SubMechanismSettingsTest.cs (revision 6cec21ca5e9396202bd248dfabc181857bf433a5) @@ -0,0 +1,53 @@ +// 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 NUnit.Framework; +using Ringtoets.HydraRing.Calculation.Settings; + +namespace Ringtoets.HydraRing.Calculation.Test.Settings +{ + [TestFixture] + public class SubMechanismSettingsTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Call + var subMechanismSettings = new SubMechanismSettings(1, 2, 3, 4.4, 5.5, 6.6, 7.7, 8, 9, 10, 11.11, 12.12, 13.13, 14); + + // Assert + Assert.AreEqual(1, subMechanismSettings.CalculationTechniqueId); + Assert.AreEqual(2, subMechanismSettings.FormStartMethod); + Assert.AreEqual(3, subMechanismSettings.FormNumberOfIterations); + Assert.AreEqual(4.4, subMechanismSettings.FormRelaxationFactor); + Assert.AreEqual(5.5, subMechanismSettings.FormEpsBeta); + Assert.AreEqual(6.6, subMechanismSettings.FormEpsHoh); + Assert.AreEqual(7.7, subMechanismSettings.FormEpsZFunc); + Assert.AreEqual(8, subMechanismSettings.DsStartMethod); + Assert.AreEqual(9, subMechanismSettings.DsMinNumberOfIterations); + Assert.AreEqual(10, subMechanismSettings.DsMaxNumberOfIterations); + Assert.AreEqual(11.11, subMechanismSettings.DsVarCoefficient); + Assert.AreEqual(12.12, subMechanismSettings.NiUMin); + Assert.AreEqual(13.13, subMechanismSettings.NiUMax); + Assert.AreEqual(14, subMechanismSettings.NiNumberSteps); + } + } +}