Index: Ringtoets/Common/src/Ringtoets.Common.Data/Structures/IStructuresCalculationInput.cs
===================================================================
diff -u -r12cec002453a1828efc68633fbd25219632c6c47 -r6ebe864bf0138360fbba9a2772e9faf763287e8a
--- Ringtoets/Common/src/Ringtoets.Common.Data/Structures/IStructuresCalculationInput.cs (.../IStructuresCalculationInput.cs) (revision 12cec002453a1828efc68633fbd25219632c6c47)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Structures/IStructuresCalculationInput.cs (.../IStructuresCalculationInput.cs) (revision 6ebe864bf0138360fbba9a2772e9faf763287e8a)
@@ -19,16 +19,22 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
+using System;
using Ringtoets.Common.Data.Calculation;
namespace Ringtoets.Common.Data.Structures
{
///
/// Interface describing an object that is the input to a structures calculation.
///
+ public interface IStructuresCalculationInput : ICalculationInput, ICloneable {}
+
+ ///
+ /// Interface describing an object that is the input to a structures calculation.
+ ///
/// The type of the structure which can be assigned to the
/// calculation.
- public interface IStructuresCalculationInput : ICalculationInput where T : StructureBase
+ public interface IStructuresCalculationInput : IStructuresCalculationInput where T : StructureBase
{
///
/// Gets the structure.
Index: Ringtoets/Common/src/Ringtoets.Common.Data/Structures/StructuresInputBase.cs
===================================================================
diff -u -radbf2699810c35ead18e88e52127546aab78c23c -r6ebe864bf0138360fbba9a2772e9faf763287e8a
--- Ringtoets/Common/src/Ringtoets.Common.Data/Structures/StructuresInputBase.cs (.../StructuresInputBase.cs) (revision adbf2699810c35ead18e88e52127546aab78c23c)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Structures/StructuresInputBase.cs (.../StructuresInputBase.cs) (revision 6ebe864bf0138360fbba9a2772e9faf763287e8a)
@@ -43,13 +43,13 @@
private static readonly Range structureNormalOrientationValidityRange = new Range(new RoundedDouble(structureNormalOrientationNumberOfDecimals),
new RoundedDouble(structureNormalOrientationNumberOfDecimals, 360));
- private readonly NormalDistribution modelFactorSuperCriticalFlow;
- private readonly LogNormalDistribution allowedLevelIncreaseStorage;
- private readonly VariationCoefficientLogNormalDistribution storageStructureArea;
- private readonly LogNormalDistribution flowWidthAtBottomProtection;
- private readonly VariationCoefficientLogNormalDistribution criticalOvertoppingDischarge;
- private readonly NormalDistribution widthFlowApertures;
- private readonly VariationCoefficientLogNormalDistribution stormDuration;
+ private NormalDistribution modelFactorSuperCriticalFlow;
+ private LogNormalDistribution allowedLevelIncreaseStorage;
+ private VariationCoefficientLogNormalDistribution storageStructureArea;
+ private LogNormalDistribution flowWidthAtBottomProtection;
+ private VariationCoefficientLogNormalDistribution criticalOvertoppingDischarge;
+ private NormalDistribution widthFlowApertures;
+ private VariationCoefficientLogNormalDistribution stormDuration;
private T structure;
private RoundedDouble structureNormalOrientation;
@@ -148,6 +148,23 @@
/// When no structure is present, the input parameters are set to default values.
public abstract void SynchronizeStructureInput();
+ public object Clone()
+ {
+ var clone = (StructuresInputBase) MemberwiseClone();
+
+ clone.modelFactorSuperCriticalFlow = (NormalDistribution) ModelFactorSuperCriticalFlow.Clone();
+ clone.allowedLevelIncreaseStorage = (LogNormalDistribution) AllowedLevelIncreaseStorage.Clone();
+ clone.storageStructureArea = (VariationCoefficientLogNormalDistribution) StorageStructureArea.Clone();
+ clone.flowWidthAtBottomProtection = (LogNormalDistribution) FlowWidthAtBottomProtection.Clone();
+ clone.criticalOvertoppingDischarge = (VariationCoefficientLogNormalDistribution) CriticalOvertoppingDischarge.Clone();
+ clone.widthFlowApertures = (NormalDistribution) WidthFlowApertures.Clone();
+ clone.stormDuration = (VariationCoefficientLogNormalDistribution) StormDuration.Clone();
+
+ clone.BreakWater = (BreakWater) BreakWater.Clone();
+
+ return clone;
+ }
+
private void SetDefaultCommonStructureSchematizationProperties()
{
StructureNormalOrientation = RoundedDouble.NaN;