Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/HydraRingConfiguration.cs =================================================================== diff -u -rfe9af51d0ecee9dc64884d9370cf951fe787a8bc -r43074cf185009dabd2b9a4ee2b1a8fffa73747c5 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/HydraRingConfiguration.cs (.../HydraRingConfiguration.cs) (revision fe9af51d0ecee9dc64884d9370cf951fe787a8bc) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/HydraRingConfiguration.cs (.../HydraRingConfiguration.cs) (revision 43074cf185009dabd2b9a4ee2b1a8fffa73747c5) @@ -62,6 +62,10 @@ private readonly HydraRingTimeIntegrationSchemeType timeIntegrationSchemeType; private readonly HydraRingUncertaintiesType uncertaintiesType; + private const double defaultLayerId = 1; + private const double defaultAlternativeId = 1; + private const double defaultHydraRingValue = 0.0; + /// /// Creates a new instance of the class. /// @@ -248,10 +252,10 @@ "MechanismId", failureMechanismDefaults.MechanismId }, { - "LayerId", null // Fixed: no support for revetments + "LayerId", defaultLayerId // Fixed: no support for revetments }, { - "AlternativeId", null // Fixed: no support for piping + "AlternativeId", defaultAlternativeId // Fixed: no support for piping }, { "Method", failureMechanismDefaults.CalculationTypeId @@ -260,16 +264,16 @@ "VariableId", failureMechanismDefaults.VariableId }, { - "LoadVariableId", null // Fixed: not relevant + "LoadVariableId", defaultHydraRingValue // Fixed: not relevant }, { - "TableMin", null // Fixed: no support for type 3 computations (see "Method") + "TableMin", defaultHydraRingValue // Fixed: no support for type 3 computations (see "Method") }, { - "TableMax", null // Fixed: no support for type 3 computations (see "Method") + "TableMax", defaultHydraRingValue // Fixed: no support for type 3 computations (see "Method") }, { - "TableStepSize", null // Fixed: no support for type 3 computations (see "Method") + "TableStepSize", defaultHydraRingValue // Fixed: no support for type 3 computations (see "Method") }, { "ValueMin", GetHydraRingValue(failureMechanismSettings.ValueMin) @@ -307,10 +311,10 @@ "MechanismId", failureMechanismDefaults.MechanismId }, { - "LayerId", null // Fixed: no support for revetments + "LayerId", defaultLayerId // Fixed: no support for revetments }, { - "AlternativeId", null // Fixed: no support for piping + "AlternativeId", defaultAlternativeId // Fixed: no support for piping }, { "SubMechanismId", subMechanimsId @@ -388,40 +392,40 @@ "MechanismId", failureMechanismDefaults.MechanismId }, { - "LayerId", null // Fixed: no support for revetments + "LayerId", defaultLayerId // Fixed: no support for revetments }, { - "AlternativeId", null // Fixed: no support for piping + "AlternativeId", defaultAlternativeId // Fixed: no support for piping }, { "VariableId", hydraRingVariable.VariableId }, { "Value", hydraRingVariable.DistributionType == HydraRingDistributionType.Deterministic ? GetHydraRingValue(hydraRingVariable.Value) - : null + : defaultHydraRingValue }, { "DistributionType", (int?) hydraRingVariable.DistributionType }, { "Parameter1", hydraRingVariable.DistributionType != HydraRingDistributionType.Deterministic ? GetHydraRingValue(hydraRingVariable.Mean) - : null + : defaultHydraRingValue }, { "Parameter2", hydraRingVariable.DistributionType != HydraRingDistributionType.Deterministic && hydraRingVariable.DeviationType == HydraRingDeviationType.Standard ? GetHydraRingValue(hydraRingVariable.Variability) - : null + : defaultHydraRingValue }, { "Parameter3", hydraRingVariable.DistributionType == HydraRingDistributionType.LogNormal ? GetHydraRingValue(hydraRingVariable.Shift) - : null + : defaultHydraRingValue }, { - "Parameter4", null // Fixed: Not relevant + "Parameter4", defaultHydraRingValue // Fixed: Not relevant }, { "DeviationType", (int?) hydraRingVariable.DeviationType @@ -430,7 +434,7 @@ "CoefficientOfVariation", hydraRingVariable.DistributionType != HydraRingDistributionType.Deterministic && hydraRingVariable.DeviationType == HydraRingDeviationType.Variation ? GetHydraRingValue(hydraRingVariable.Variability) - : null + : defaultHydraRingValue }, { "CorrelationLength", GetHydraRingValue(variableDefaults.CorrelationLength) @@ -494,10 +498,10 @@ "MechanismId", failureMechanismDefaults.MechanismId }, { - "LayerId", null // Fixed: no support for revetments + "LayerId", defaultLayerId // Fixed: no support for revetments }, { - "AlternativeId", null // Fixed: no support for piping + "AlternativeId", defaultAlternativeId // Fixed: no support for piping }, { "FaultTreeModelId", failureMechanismSettings.FaultTreeModelId @@ -531,10 +535,10 @@ "MechanismId", failureMechanismDefaults.MechanismId }, { - "LayerId", null // Fixed: no support for revetments + "LayerId", defaultLayerId // Fixed: no support for revetments }, { - "AlternativeId", null // Fixed: no support for piping + "AlternativeId", defaultAlternativeId // Fixed: no support for piping }, { "SubMechanismId", subMechanismId @@ -698,7 +702,7 @@ private double? GetHydraRingValue(double value) { - return !double.IsNaN(value) ? (double?) value : null; + return !double.IsNaN(value) ? value : defaultHydraRingValue; } } } \ No newline at end of file Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/HydraRingConfigurationIntegrationTest.cs =================================================================== diff -u -rdd33f3b9d039c570742b8233da23326538c848cf -r43074cf185009dabd2b9a4ee2b1a8fffa73747c5 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/HydraRingConfigurationIntegrationTest.cs (.../HydraRingConfigurationIntegrationTest.cs) (revision dd33f3b9d039c570742b8233da23326538c848cf) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/HydraRingConfigurationIntegrationTest.cs (.../HydraRingConfigurationIntegrationTest.cs) (revision 43074cf185009dabd2b9a4ee2b1a8fffa73747c5) @@ -40,21 +40,21 @@ "INSERT INTO [HydraulicModels] VALUES (1, 1, 'WTI 2017');" + Environment.NewLine + Environment.NewLine + "DELETE FROM [Sections];" + Environment.NewLine + - "INSERT INTO [Sections] VALUES (700004, 1, 1, '700004', '700004', NULL, NULL, NULL, NULL, 700004, 700004, 100, NULL, NULL);" + Environment.NewLine + + "INSERT INTO [Sections] VALUES (700004, 1, 1, '700004', '700004', 0, 0, 0, 0, 700004, 700004, 100, 0, 0);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [DesignTables];" + Environment.NewLine + - "INSERT INTO [DesignTables] VALUES (700004, 1, NULL, NULL, 2, 26, NULL, NULL, NULL, NULL, 0, 50, 3.29053);" + Environment.NewLine + + "INSERT INTO [DesignTables] VALUES (700004, 1, 1, 1, 2, 26, 0, 0, 0, 0, 0, 50, 3.29053);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [Numerics];" + Environment.NewLine + - "INSERT INTO [Numerics] VALUES (700004, 1, NULL, NULL, 1, 1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 1, 10000, 20000, 0.1, -6, 6, 25);" + Environment.NewLine + + "INSERT INTO [Numerics] VALUES (700004, 1, 1, 1, 1, 1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 1, 10000, 20000, 0.1, -6, 6, 25);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [VariableDatas];" + Environment.NewLine + - "INSERT INTO [VariableDatas] VALUES (700004, 1, NULL, NULL, 26, 0, 0, NULL, NULL, NULL, NULL, 0, NULL, 300);" + Environment.NewLine + + "INSERT INTO [VariableDatas] VALUES (700004, 1, 1, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 300);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [CalculationProfiles];" + Environment.NewLine + Environment.NewLine + "DELETE FROM [SectionFaultTreeModels];" + Environment.NewLine + - "INSERT INTO [SectionFaultTreeModels] VALUES (700004, 1, NULL, NULL, 1);" + Environment.NewLine + + "INSERT INTO [SectionFaultTreeModels] VALUES (700004, 1, 1, 1, 1);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [SectionSubMechanismModels];" + Environment.NewLine + Environment.NewLine + Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/HydraRingConfigurationTest.cs =================================================================== diff -u -r59b1c01f9c155ff608c09769f19fd0158dea38e8 -r43074cf185009dabd2b9a4ee2b1a8fffa73747c5 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/HydraRingConfigurationTest.cs (.../HydraRingConfigurationTest.cs) (revision 59b1c01f9c155ff608c09769f19fd0158dea38e8) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/HydraRingConfigurationTest.cs (.../HydraRingConfigurationTest.cs) (revision 43074cf185009dabd2b9a4ee2b1a8fffa73747c5) @@ -56,28 +56,28 @@ "INSERT INTO [Sections] VALUES (9999, 1, 1, 'LocationName', 'LocationName', 2.2, 3.3, 5.5, 6.6, 700004, 700004, 100, 7.7, 4.4);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [DesignTables];" + Environment.NewLine + - "INSERT INTO [DesignTables] VALUES (9999, 1, NULL, NULL, 2, 26, NULL, NULL, NULL, NULL, 0, 50, 1.1);" + Environment.NewLine + + "INSERT INTO [DesignTables] VALUES (9999, 1, 1, 1, 2, 26, 0, 0, 0, 0, 0, 50, 1.1);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [Numerics];" + Environment.NewLine + - "INSERT INTO [Numerics] VALUES (9999, 1, NULL, NULL, 1, 1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 1, 10000, 20000, 0.1, -6, 6, 25);" + Environment.NewLine + + "INSERT INTO [Numerics] VALUES (9999, 1, 1, 1, 1, 1, 4, 50, 0.15, 0.01, 0.01, 0.01, 2, 1, 10000, 20000, 0.1, -6, 6, 25);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [VariableDatas];" + Environment.NewLine + - "INSERT INTO [VariableDatas] VALUES (9999, 1, NULL, NULL, 26, 2.2, 0, NULL, NULL, NULL, NULL, 0, NULL, 300);" + Environment.NewLine + - "INSERT INTO [VariableDatas] VALUES (9999, 1, NULL, NULL, 26, 22.2, 0, NULL, NULL, NULL, NULL, 1, NULL, 300);" + Environment.NewLine + - "INSERT INTO [VariableDatas] VALUES (9999, 1, NULL, NULL, 26, NULL, 2, 333.3, 444.4, NULL, NULL, 0, NULL, 300);" + Environment.NewLine + - "INSERT INTO [VariableDatas] VALUES (9999, 1, NULL, NULL, 26, NULL, 2, 3333.3, NULL, NULL, NULL, 1, 4444.4, 300);" + Environment.NewLine + - "INSERT INTO [VariableDatas] VALUES (9999, 1, NULL, NULL, 26, NULL, 4, 33333.3, 44444.4, 55555.5, NULL, 0, NULL, 300);" + Environment.NewLine + - "INSERT INTO [VariableDatas] VALUES (9999, 1, NULL, NULL, 26, NULL, 4, 333333.3, NULL, 555555.5, NULL, 1, 444444.4, 300);" + Environment.NewLine + + "INSERT INTO [VariableDatas] VALUES (9999, 1, 1, 1, 26, 2.2, 0, 0, 0, 0, 0, 0, 0, 300);" + Environment.NewLine + + "INSERT INTO [VariableDatas] VALUES (9999, 1, 1, 1, 26, 22.2, 0, 0, 0, 0, 0, 1, 0, 300);" + Environment.NewLine + + "INSERT INTO [VariableDatas] VALUES (9999, 1, 1, 1, 26, 0, 2, 333.3, 444.4, 0, 0, 0, 0, 300);" + Environment.NewLine + + "INSERT INTO [VariableDatas] VALUES (9999, 1, 1, 1, 26, 0, 2, 3333.3, 0, 0, 0, 1, 4444.4, 300);" + Environment.NewLine + + "INSERT INTO [VariableDatas] VALUES (9999, 1, 1, 1, 26, 0, 4, 33333.3, 44444.4, 55555.5, 0, 0, 0, 300);" + Environment.NewLine + + "INSERT INTO [VariableDatas] VALUES (9999, 1, 1, 1, 26, 0, 4, 333333.3, 0, 555555.5, 0, 1, 444444.4, 300);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [CalculationProfiles];" + Environment.NewLine + "INSERT INTO [CalculationProfiles] VALUES (9999, 1, 1.1, 2.2, 3.3);" + Environment.NewLine + "INSERT INTO [CalculationProfiles] VALUES (9999, 2, 11.1, 22.2, 33.3);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [SectionFaultTreeModels];" + Environment.NewLine + - "INSERT INTO [SectionFaultTreeModels] VALUES (9999, 1, NULL, NULL, 1);" + Environment.NewLine + + "INSERT INTO [SectionFaultTreeModels] VALUES (9999, 1, 1, 1, 1);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [SectionSubMechanismModels];" + Environment.NewLine + - "INSERT INTO [SectionSubMechanismModels] VALUES (9999, 1, NULL, NULL, 1, 1234);" + Environment.NewLine + + "INSERT INTO [SectionSubMechanismModels] VALUES (9999, 1, 1, 1, 1, 1234);" + Environment.NewLine + Environment.NewLine + "DELETE FROM [Fetches];" + Environment.NewLine + Environment.NewLine +