Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Calculator/IStructuresStabilityPointCalculator.cs
===================================================================
diff -u
--- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Calculator/IStructuresStabilityPointCalculator.cs (revision 0)
+++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Calculator/IStructuresStabilityPointCalculator.cs (revision ae3f19fd6f65363369b4a903ca75d35e65af8751)
@@ -0,0 +1,54 @@
+// 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 Ringtoets.HydraRing.Calculation.Data.Input.Structures;
+
+namespace Ringtoets.HydraRing.Calculation.Calculator
+{
+ ///
+ /// Interface for a calculator calculating probability of failure by a structural failure structure.
+ /// This is used in a structural failure structures assessment.
+ ///
+ public interface IStructuresStabilityPointCalculator
+ {
+ ///
+ /// Gets the probability of failure.
+ ///
+ double ExceedanceProbabilityBeta { get; }
+
+ ///
+ /// Gets the content of the output file generated during the Hydra-Ring calculation.
+ ///
+ string OutputFileContent { get; }
+
+ ///
+ /// Performs the actual calculation by running the Hydra-Ring executable.
+ ///
+ /// The which contains all the necessary input
+ /// for the calculation.
+ void Calculate(StructuresStabilityPointCalculationInput input);
+
+ ///
+ /// Cancels any currently running Hydra-Ring calculation.
+ ///
+ void Cancel();
+ }
+}
\ No newline at end of file
Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Calculator/StructuresStabilityPointCalculator.cs
===================================================================
diff -u
--- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Calculator/StructuresStabilityPointCalculator.cs (revision 0)
+++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Calculator/StructuresStabilityPointCalculator.cs (revision ae3f19fd6f65363369b4a903ca75d35e65af8751)
@@ -0,0 +1,71 @@
+// 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 System.Collections.Generic;
+using Ringtoets.HydraRing.Calculation.Data;
+using Ringtoets.HydraRing.Calculation.Data.Input.Structures;
+using Ringtoets.HydraRing.Calculation.Parsers;
+
+namespace Ringtoets.HydraRing.Calculation.Calculator
+{
+ ///
+ /// Interface for a calculator calculating probability of failure by a structural failure structure.
+ /// This is used in a structural failure structures assessment.
+ ///
+ internal class StructuresStabilityPointCalculator : HydraRingCalculatorBase, IStructuresStabilityPointCalculator
+ {
+ private readonly ExceedanceProbabilityCalculationParser exceedanceProbabilityCalculationParser;
+
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The directory in which the hydraulic boundary database can be found.
+ /// The id of the assessment section which is used in the calculation.
+ /// Thrown when is null.
+ public StructuresStabilityPointCalculator(string hlcdDirectory, string ringId)
+ : base(hlcdDirectory, ringId)
+ {
+ exceedanceProbabilityCalculationParser = new ExceedanceProbabilityCalculationParser();
+ ExceedanceProbabilityBeta = double.NaN;
+ }
+
+ public double ExceedanceProbabilityBeta { get; private set; }
+
+ public void Calculate(StructuresStabilityPointCalculationInput input)
+ {
+ Calculate(HydraRingUncertaintiesType.All, input);
+ }
+
+ protected override void SetOutputs()
+ {
+ if (exceedanceProbabilityCalculationParser.Output != null)
+ {
+ ExceedanceProbabilityBeta = exceedanceProbabilityCalculationParser.Output.Beta;
+ }
+ }
+
+ protected override IEnumerable GetParsers()
+ {
+ yield return exceedanceProbabilityCalculationParser;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Ringtoets.HydraRing.Calculation.csproj
===================================================================
diff -u -r7d7217b5823e5008579462c990e259e2bb5b4018 -rae3f19fd6f65363369b4a903ca75d35e65af8751
--- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Ringtoets.HydraRing.Calculation.csproj (.../Ringtoets.HydraRing.Calculation.csproj) (revision 7d7217b5823e5008579462c990e259e2bb5b4018)
+++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Calculation/Ringtoets.HydraRing.Calculation.csproj (.../Ringtoets.HydraRing.Calculation.csproj) (revision ae3f19fd6f65363369b4a903ca75d35e65af8751)
@@ -52,6 +52,7 @@
+
@@ -60,6 +61,7 @@
+
Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Calculator/StructuresClosureCalculatorTest.cs
===================================================================
diff -u -r7d7217b5823e5008579462c990e259e2bb5b4018 -rae3f19fd6f65363369b4a903ca75d35e65af8751
--- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Calculator/StructuresClosureCalculatorTest.cs (.../StructuresClosureCalculatorTest.cs) (revision 7d7217b5823e5008579462c990e259e2bb5b4018)
+++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Calculator/StructuresClosureCalculatorTest.cs (.../StructuresClosureCalculatorTest.cs) (revision ae3f19fd6f65363369b4a903ca75d35e65af8751)
@@ -35,6 +35,7 @@
// Assert
Assert.IsInstanceOf(calculator);
+ Assert.IsInstanceOf(calculator);
Assert.IsNaN(calculator.ExceedanceProbabilityBeta);
Assert.IsNull(calculator.OutputFileContent);
}
Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Calculator/StructuresStabilityPointCalculatorTest.cs
===================================================================
diff -u
--- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Calculator/StructuresStabilityPointCalculatorTest.cs (revision 0)
+++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Calculator/StructuresStabilityPointCalculatorTest.cs (revision ae3f19fd6f65363369b4a903ca75d35e65af8751)
@@ -0,0 +1,43 @@
+// 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.Calculator;
+
+namespace Ringtoets.HydraRing.Calculation.Test.Calculator
+{
+ [TestFixture]
+ public class StructuresStabilityPointCalculatorTest
+ {
+ [Test]
+ public void DefaultConstructor_InitializesOutputWithoutValues()
+ {
+ // Call
+ var calculator = new StructuresStabilityPointCalculator(string.Empty, string.Empty);
+
+ // Assert
+ Assert.IsInstanceOf(calculator);
+ Assert.IsInstanceOf(calculator);
+ Assert.IsNaN(calculator.ExceedanceProbabilityBeta);
+ Assert.IsNull(calculator.OutputFileContent);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Ringtoets.HydraRing.Calculation.Test.csproj
===================================================================
diff -u -r7d7217b5823e5008579462c990e259e2bb5b4018 -rae3f19fd6f65363369b4a903ca75d35e65af8751
--- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Ringtoets.HydraRing.Calculation.Test.csproj (.../Ringtoets.HydraRing.Calculation.Test.csproj) (revision 7d7217b5823e5008579462c990e259e2bb5b4018)
+++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Ringtoets.HydraRing.Calculation.Test.csproj (.../Ringtoets.HydraRing.Calculation.Test.csproj) (revision ae3f19fd6f65363369b4a903ca75d35e65af8751)
@@ -61,6 +61,7 @@
+