Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/ClosingStructures/ClosingStructuresCalculationEntityReadExtensions.cs =================================================================== diff -u -r21f9de0d12327b2d4319a2e78055d11c66cc7300 -r54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/ClosingStructures/ClosingStructuresCalculationEntityReadExtensions.cs (.../ClosingStructuresCalculationEntityReadExtensions.cs) (revision 21f9de0d12327b2d4319a2e78055d11c66cc7300) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/ClosingStructures/ClosingStructuresCalculationEntityReadExtensions.cs (.../ClosingStructuresCalculationEntityReadExtensions.cs) (revision 54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6) @@ -110,7 +110,7 @@ return; } - var output = new StructuresOutput(outputEntity.Read(), + var output = new StructuresOutput(outputEntity.Reliability.ToNullAsNaN(), outputEntity.Read(), outputEntity.GeneralResultFaultTreeIllustrationPointEntity?.Read()); calculation.Output = output; } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/HeightStructures/HeightStructuresCalculationEntityReadExtensions.cs =================================================================== diff -u -r21f9de0d12327b2d4319a2e78055d11c66cc7300 -r54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/HeightStructures/HeightStructuresCalculationEntityReadExtensions.cs (.../HeightStructuresCalculationEntityReadExtensions.cs) (revision 21f9de0d12327b2d4319a2e78055d11c66cc7300) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/HeightStructures/HeightStructuresCalculationEntityReadExtensions.cs (.../HeightStructuresCalculationEntityReadExtensions.cs) (revision 54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6) @@ -97,7 +97,7 @@ return; } - var output = new StructuresOutput(outputEntity.Read(), + var output = new StructuresOutput(outputEntity.Reliability.ToNullAsNaN(), outputEntity.Read(), outputEntity.GeneralResultFaultTreeIllustrationPointEntity?.Read()); calculation.Output = output; } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StabilityPointStructures/StabilityPointStructuresCalculationEntityReadExtensions.cs =================================================================== diff -u -r21f9de0d12327b2d4319a2e78055d11c66cc7300 -r54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StabilityPointStructures/StabilityPointStructuresCalculationEntityReadExtensions.cs (.../StabilityPointStructuresCalculationEntityReadExtensions.cs) (revision 21f9de0d12327b2d4319a2e78055d11c66cc7300) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StabilityPointStructures/StabilityPointStructuresCalculationEntityReadExtensions.cs (.../StabilityPointStructuresCalculationEntityReadExtensions.cs) (revision 54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6) @@ -131,7 +131,7 @@ return; } - var output = new StructuresOutput(outputEntity.Read(), + var output = new StructuresOutput(outputEntity.Reliability.ToNullAsNaN(), outputEntity.Read(), outputEntity.GeneralResultFaultTreeIllustrationPointEntity?.Read()); calculation.Output = output; } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StructuresOutputCreateExtensionsTest.cs =================================================================== diff -u -r82c8dcdc0f254596b25e1e201a07c29500e9cab9 -r54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StructuresOutputCreateExtensionsTest.cs (.../StructuresOutputCreateExtensionsTest.cs) (revision 82c8dcdc0f254596b25e1e201a07c29500e9cab9) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StructuresOutputCreateExtensionsTest.cs (.../StructuresOutputCreateExtensionsTest.cs) (revision 54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6) @@ -51,11 +51,13 @@ // Setup var random = new Random(567); var output = new StructuresOutput( - new ProbabilityAssessmentOutput(random.NextDouble(), - random.NextDouble(), - random.NextDouble(), - random.NextDouble(), - random.NextDouble()), null); + random.NextDouble(), + new ProbabilityAssessmentOutput( + random.NextDouble(), + random.NextDouble(), + random.NextDouble(), + random.NextDouble(), + random.NextDouble()), null); // Call var entity = output.Create(); @@ -79,11 +81,13 @@ { // Setup var output = new StructuresOutput( - new ProbabilityAssessmentOutput(double.NaN, - double.NaN, - double.NaN, - double.NaN, - double.NaN), null); + double.NaN, + new ProbabilityAssessmentOutput( + double.NaN, + double.NaN, + double.NaN, + double.NaN, + double.NaN), null); // Call var entity = output.Create(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs =================================================================== diff -u -r899d227631395ebeb5154719f7b92a42ddbc6f96 -r54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6 --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision 899d227631395ebeb5154719f7b92a42ddbc6f96) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision 54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6) @@ -432,12 +432,15 @@ private static StructuresOutput GetStructuresOutputWithIllustrationPoints() { var random = new Random(56); - var output = new StructuresOutput(new ProbabilityAssessmentOutput(random.NextDouble(), - random.NextDouble(), - random.NextDouble(), - random.NextDouble(), - random.NextDouble()), - GetConfiguredGeneralResultFaultTreeIllustrationPoint()); + var output = new StructuresOutput( + random.NextDouble(), + new ProbabilityAssessmentOutput( + random.NextDouble(), + random.NextDouble(), + random.NextDouble(), + random.NextDouble(), + random.NextDouble()), + GetConfiguredGeneralResultFaultTreeIllustrationPoint()); return output; } @@ -537,7 +540,7 @@ Structure = stabilityPointStructure, ShouldIllustrationPointsBeCalculated = false }, - Output = new StructuresOutput(new ProbabilityAssessmentOutput(0.8, 0.95, 0.10, 0.11, 0.12), null) + Output = new StructuresOutput(0.11, new ProbabilityAssessmentOutput(0.8, 0.95, 0.10, 0.11, 0.12), null) }, new StructuresCalculation { @@ -658,7 +661,7 @@ UseForeshore = true, ShouldIllustrationPointsBeCalculated = false }, - Output = new StructuresOutput(new ProbabilityAssessmentOutput(0.8, 0.95, 0.10, 0.11, 0.12), null) + Output = new StructuresOutput(0.11, new ProbabilityAssessmentOutput(0.8, 0.95, 0.10, 0.11, 0.12), null) }, new StructuresCalculation { @@ -826,7 +829,7 @@ Structure = heightStructure, ShouldIllustrationPointsBeCalculated = false }, - Output = new StructuresOutput(new ProbabilityAssessmentOutput(0.8, 0.95, 0.10, 0.11, 0.12), null) + Output = new StructuresOutput(0.11, new ProbabilityAssessmentOutput(0.8, 0.95, 0.10, 0.11, 0.12), null) }, new StructuresCalculation { Index: Ringtoets/Common/src/Ringtoets.Common.Data/Structures/StructuresOutput.cs =================================================================== diff -u -r0f827ea0e06ceae9e35fa54e42abed8796111539 -r54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6 --- Ringtoets/Common/src/Ringtoets.Common.Data/Structures/StructuresOutput.cs (.../StructuresOutput.cs) (revision 0f827ea0e06ceae9e35fa54e42abed8796111539) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Structures/StructuresOutput.cs (.../StructuresOutput.cs) (revision 54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6) @@ -33,24 +33,33 @@ /// /// Creates a new instance of . /// + /// The reliability of the calculation. /// The results of the probabilistic /// assessment calculation. /// The general result of this output with the /// fault tree illustration points. /// Thrown when /// is null. - public StructuresOutput(ProbabilityAssessmentOutput probabilityAssessmentOutput, + public StructuresOutput(double reliability, + ProbabilityAssessmentOutput probabilityAssessmentOutput, GeneralResult generalResult) { if (probabilityAssessmentOutput == null) { throw new ArgumentNullException(nameof(probabilityAssessmentOutput)); } + + Reliability = reliability; ProbabilityAssessmentOutput = probabilityAssessmentOutput; GeneralResult = generalResult; } /// + /// Gets the reliability of the calculation. + /// + public double Reliability { get; } + + /// /// Gets the probabilistic assessment output. /// public ProbabilityAssessmentOutput ProbabilityAssessmentOutput { get; private set; } Index: Ringtoets/Common/src/Ringtoets.Common.Service/Structures/StructuresCalculationServiceBase.cs =================================================================== diff -u -ra2353e44937113273f8f48a0823965e79ea537cb -r54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6 --- Ringtoets/Common/src/Ringtoets.Common.Service/Structures/StructuresCalculationServiceBase.cs (.../StructuresCalculationServiceBase.cs) (revision a2353e44937113273f8f48a0823965e79ea537cb) +++ Ringtoets/Common/src/Ringtoets.Common.Service/Structures/StructuresCalculationServiceBase.cs (.../StructuresCalculationServiceBase.cs) (revision 54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6) @@ -269,15 +269,17 @@ contribution, lengthEffectN, calculator.ExceedanceProbabilityBeta); - SetOutput(calculation, probabilityAssessmentOutput); + SetOutput(calculation, calculator.ExceedanceProbabilityBeta, probabilityAssessmentOutput); } /// /// Sets the calculated output to the calculation object. /// /// The calculation to set the output for. + /// The reliability of the calculation. /// The calculated output. private void SetOutput(StructuresCalculation calculation, + double reliability, ProbabilityAssessmentOutput probabilityAssessmentOutput) { GeneralResult generalResult = null; @@ -295,7 +297,7 @@ e.Message)); } - calculation.Output = new StructuresOutput(probabilityAssessmentOutput, generalResult); + calculation.Output = new StructuresOutput(reliability, probabilityAssessmentOutput, generalResult); } /// Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Structures/StructuresOutputTest.cs =================================================================== diff -u -ra7250eadfcaa33555a923aac13f3ac00c0a12e1f -r54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6 --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Structures/StructuresOutputTest.cs (.../StructuresOutputTest.cs) (revision a7250eadfcaa33555a923aac13f3ac00c0a12e1f) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Structures/StructuresOutputTest.cs (.../StructuresOutputTest.cs) (revision 54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6) @@ -36,7 +36,7 @@ public void Constructor_ProbabilityAssessmentNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => new StructuresOutput(null, null); + TestDelegate call = () => new StructuresOutput(double.NaN, null, null); // Assert var exception = Assert.Throws(call); @@ -50,16 +50,19 @@ bool withIllustrationPoints) { // Setup + var random = new Random(39); + double reliability = random.NextDouble(); var output = new TestProbabilityAssessmentOutput(); GeneralResult generalResult = withIllustrationPoints ? new TestGeneralResultFaultTreeIllustrationPoint() : null; // Call - var structuresOutput = new StructuresOutput(output, generalResult); + var structuresOutput = new StructuresOutput(reliability, output, generalResult); // Assert Assert.IsInstanceOf(structuresOutput); + Assert.AreEqual(reliability, structuresOutput.Reliability); Assert.AreSame(output, structuresOutput.ProbabilityAssessmentOutput); Assert.AreEqual(withIllustrationPoints, structuresOutput.HasGeneralResult); Assert.AreSame(generalResult, structuresOutput.GeneralResult); Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/CommonTestDataGenerator.cs =================================================================== diff -u -rd74673fe0021036105c40d4333523b8fbb0edf68 -r54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6 --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/CommonTestDataGenerator.cs (.../CommonTestDataGenerator.cs) (revision d74673fe0021036105c40d4333523b8fbb0edf68) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/CommonTestDataGenerator.cs (.../CommonTestDataGenerator.cs) (revision 54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6) @@ -104,7 +104,8 @@ { var random = new Random(21); - return new StructuresOutput(new ProbabilityAssessmentOutput(random.NextDouble(), + return new StructuresOutput(random.NextDouble(), + new ProbabilityAssessmentOutput(random.NextDouble(), random.NextDouble(), random.NextDouble(), random.NextDouble(), Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/TestStructuresOutput.cs =================================================================== diff -u -rb28a844780b613e1901fa82328ba3917f485c729 -r54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6 --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/TestStructuresOutput.cs (.../TestStructuresOutput.cs) (revision b28a844780b613e1901fa82328ba3917f485c729) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/TestStructuresOutput.cs (.../TestStructuresOutput.cs) (revision 54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6) @@ -46,14 +46,14 @@ /// that falls outside the [0.0, 1.0] range /// and isn't . public TestStructuresOutput(double probability) - : base(new ProbabilityAssessmentOutput(0, 0, probability, 0, 0), null) {} + : base(probability, new ProbabilityAssessmentOutput(0, 0, probability, 0, 0), null) {} /// /// Creates new instance of . /// /// The general result of this output with the /// fault tree illustration points. public TestStructuresOutput(GeneralResult generalResult) - : base(new ProbabilityAssessmentOutput(0, 0, 0, 0, 0), generalResult) {} + : base(0, new ProbabilityAssessmentOutput(0, 0, 0, 0, 0), generalResult) {} } } \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/StructuresOutputPropertiesTest.cs =================================================================== diff -u -r44f75ace98dd75de607002abd122dfe8310d5456 -r54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/StructuresOutputPropertiesTest.cs (.../StructuresOutputPropertiesTest.cs) (revision 44f75ace98dd75de607002abd122dfe8310d5456) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/StructuresOutputPropertiesTest.cs (.../StructuresOutputPropertiesTest.cs) (revision 54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6) @@ -53,10 +53,10 @@ private const string resultCategoryName = "\tResultaat"; [Test] - public void Constructor_StructuresOutput_ExpectedValues() + public void Constructor_ExpectedValues() { // Setup - var structuresOutput = new StructuresOutput(new TestProbabilityAssessmentOutput(), null); + var structuresOutput = new StructuresOutput(0, new TestProbabilityAssessmentOutput(), null); // Call var properties = new StructuresOutputProperties(structuresOutput); @@ -96,7 +96,7 @@ var generalResult = new TestGeneralResultFaultTreeIllustrationPoint(); - var structuresOutput = new StructuresOutput(probabilityAssessmentOutput, generalResult); + var structuresOutput = new StructuresOutput(reliability, probabilityAssessmentOutput, generalResult); // Call var properties = new StructuresOutputProperties(structuresOutput); @@ -134,7 +134,7 @@ public void IllustrationPoints_WithoutGeneralResult_ReturnsEmptyTopLevelFaultTreeIllustrationPointPropertiesArray() { // Setup - var structuresOutput = new StructuresOutput(new TestProbabilityAssessmentOutput(), null); + var structuresOutput = new StructuresOutput(0, new TestProbabilityAssessmentOutput(), null); var properties = new StructuresOutputProperties(structuresOutput); // Call @@ -150,7 +150,7 @@ // Setup var probabilityAssessmentOutput = new TestProbabilityAssessmentOutput(); var generalResult = new TestGeneralResultFaultTreeIllustrationPoint(); - var structuresOutput = new StructuresOutput(probabilityAssessmentOutput, generalResult); + var structuresOutput = new StructuresOutput(0, probabilityAssessmentOutput, generalResult); // Call var properties = new StructuresOutputProperties(structuresOutput); @@ -228,7 +228,7 @@ { // Setup var probabilityAssessmentOutput = new TestProbabilityAssessmentOutput(); - var structuresOutput = new StructuresOutput(probabilityAssessmentOutput, null); + var structuresOutput = new StructuresOutput(0, probabilityAssessmentOutput, null); // Call var properties = new StructuresOutputProperties(structuresOutput); Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/PropertyInfos/StructuresOutputContextPropertyInfoTest.cs =================================================================== diff -u -r62c2ec9cb0416527762e077df380cbfb473dc9dc -r54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/PropertyInfos/StructuresOutputContextPropertyInfoTest.cs (.../StructuresOutputContextPropertyInfoTest.cs) (revision 62c2ec9cb0416527762e077df380cbfb473dc9dc) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/PropertyInfos/StructuresOutputContextPropertyInfoTest.cs (.../StructuresOutputContextPropertyInfoTest.cs) (revision 54803fcc28ee6d1283ef1ab2eaf50e49e0eb54c6) @@ -63,7 +63,7 @@ public void CreateInstance_StructuresOutputContext_ReturnStructuresOutputProperties() { // Setup - var structuresOutput = new StructuresOutput(new TestProbabilityAssessmentOutput(), null); + var structuresOutput = new StructuresOutput(0, new TestProbabilityAssessmentOutput(), null); var mocks = new MockRepository(); var assessmentSection = mocks.Stub();