Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingSellmeijerVnk/DamPipingSellmeijerVnkKernelWrapper.cs
===================================================================
diff -u -r1203 -r1211
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingSellmeijerVnk/DamPipingSellmeijerVnkKernelWrapper.cs (.../DamPipingSellmeijerVnkKernelWrapper.cs) (revision 1203)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingSellmeijerVnk/DamPipingSellmeijerVnkKernelWrapper.cs (.../DamPipingSellmeijerVnkKernelWrapper.cs) (revision 1211)
@@ -269,17 +269,20 @@
/// The dam kernel input.
/// The kernel data input.
/// The kernel data output.
+ /// The design advise.
/// The evaluation message.
///
/// if the design was succesful
///
///
- public bool EvaluateDesign(DamKernelInput damKernelInput, IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, out string evaluationMessage)
+ public bool EvaluateDesign(DamKernelInput damKernelInput, IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput,
+ out DesignAdvise designAdvise, out string evaluationMessage)
{
throw new NotImplementedException();
}
- public void InitDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput, out EmbankmentDesignParameters embankmentDesignParameters)
+ public void PrepareDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput,
+ int iterationIndex, out EmbankmentDesignParameters embankmentDesignParameters)
{
throw new NotImplementedException();
}
Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingSellmeijer4Forces/DamPipingSellmeijer4ForcesKernelWrapper.cs
===================================================================
diff -u -r1203 -r1211
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingSellmeijer4Forces/DamPipingSellmeijer4ForcesKernelWrapper.cs (.../DamPipingSellmeijer4ForcesKernelWrapper.cs) (revision 1203)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingSellmeijer4Forces/DamPipingSellmeijer4ForcesKernelWrapper.cs (.../DamPipingSellmeijer4ForcesKernelWrapper.cs) (revision 1211)
@@ -348,12 +348,13 @@
/// The dam kernel input.
/// The kernel data input.
/// The kernel data output.
+ /// The design advise.
/// The evaluation message.
///
/// if the design was succesful
///
public bool EvaluateDesign(DamKernelInput damKernelInput, IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput,
- out string evaluationMessage)
+ out DesignAdvise designAdvise, out string evaluationMessage)
{
var damPipingInput = kernelDataInput as DamPipingSellmeijer4ForcesInput;
var damPipingOutput = (DamPipingSellmeijer4ForcesOutput)kernelDataOutput;
@@ -363,10 +364,12 @@
double fosRequiered = damKernelInput.Location.ModelFactors.RequiredSafetyFactorPiping.Value;
double fosAchieved = damPipingOutput.FoSp;
evaluationMessage = String.Format(Resources.FactorAchievedVsFactorRequired, fosAchieved, fosRequiered);
+ designAdvise = DesignAdvise.None;
return (fosAchieved >= fosRequiered);
}
- public void InitDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput, out EmbankmentDesignParameters embankmentDesignParameters)
+ public void PrepareDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput,
+ int iterationIndex, out EmbankmentDesignParameters embankmentDesignParameters)
{
throw new NotImplementedException();
}
Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingBligh/DamPipingBlighKernelWrapper.cs
===================================================================
diff -u -r1203 -r1211
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingBligh/DamPipingBlighKernelWrapper.cs (.../DamPipingBlighKernelWrapper.cs) (revision 1203)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamPipingBligh/DamPipingBlighKernelWrapper.cs (.../DamPipingBlighKernelWrapper.cs) (revision 1211)
@@ -330,12 +330,14 @@
/// The dam kernel input.
/// The kernel data input.
/// The kernel data output.
+ /// The design advise.
/// The evaluation message.
///
/// if the design was succesful
///
///
- public bool EvaluateDesign(DamKernelInput damKernelInput, IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, out string evaluationMessage)
+ public bool EvaluateDesign(DamKernelInput damKernelInput, IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput,
+ out DesignAdvise designAdvise, out string evaluationMessage)
{
DamPipingBlighInput damPipingBlighInput = kernelDataInput as DamPipingBlighInput;
DamPipingBlighOutput damPipingBlighOutput = (DamPipingBlighOutput)kernelDataOutput;
@@ -345,10 +347,12 @@
double fosRequiered = damKernelInput.Location.ModelFactors.RequiredSafetyFactorPiping.Value;
double fosAchieved = damPipingBlighOutput.FoSp;
evaluationMessage = String.Format(Resources.FactorAchievedVsFactorRequired, fosAchieved, fosRequiered);
+ designAdvise = DesignAdvise.None;
return (fosAchieved >= fosRequiered);
}
- public void InitDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput, out EmbankmentDesignParameters embankmentDesignParameters)
+ public void PrepareDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput,
+ int iterationIndex, out EmbankmentDesignParameters embankmentDesignParameters)
{
throw new NotImplementedException();
}
Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Interfaces/IKernelWrapper.cs
===================================================================
diff -u -r1203 -r1211
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Interfaces/IKernelWrapper.cs (.../IKernelWrapper.cs) (revision 1203)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/Interfaces/IKernelWrapper.cs (.../IKernelWrapper.cs) (revision 1211)
@@ -70,6 +70,17 @@
}
///
+ /// Based on DesignEvaluation, the advise for the next design step
+ ///
+ public enum DesignAdvise
+ {
+ None,
+ ShoulderInwards,
+ SlopeInwards,
+ Height
+ }
+
+ ///
/// Interface to implement external failure mechanisms
///
public interface IKernelWrapper : ICalculation
@@ -132,12 +143,26 @@
/// The dam kernel input.
/// The kernel data input.
/// The kernel data output.
+ /// The design advise.
/// The evaluation message.
- /// if the design was succesful
- bool EvaluateDesign(DamKernelInput damKernelInput, IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, out string evaluationMessage);
+ ///
+ /// if the design was succesful
+ ///
+ bool EvaluateDesign(DamKernelInput damKernelInput, IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput,
+ out DesignAdvise designAdvise, out string evaluationMessage);
- void InitDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput, out EmbankmentDesignParameters embankmentDesignParameters);
///
+ /// Prepares the design.
+ ///
+ /// The kernel data input.
+ /// The kernel data output.
+ /// The dam kernel input.
+ /// Index of the iteration.
+ /// The embankment design parameters.
+ void PrepareDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput,
+ int iterationIndex, out EmbankmentDesignParameters embankmentDesignParameters);
+
+ ///
/// Gets the design strategy
///
///
Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityHorizontalBalance/DamMacroStabilityHorizontalBalanceKernelWrapper.cs
===================================================================
diff -u -r1203 -r1211
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityHorizontalBalance/DamMacroStabilityHorizontalBalanceKernelWrapper.cs (.../DamMacroStabilityHorizontalBalanceKernelWrapper.cs) (revision 1203)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityHorizontalBalance/DamMacroStabilityHorizontalBalanceKernelWrapper.cs (.../DamMacroStabilityHorizontalBalanceKernelWrapper.cs) (revision 1211)
@@ -216,17 +216,20 @@
/// The dam kernel input.
/// The kernel data input.
/// The kernel data output.
+ /// The design advise.
/// The evaluation message.
///
/// if the design was succesful
///
///
- public bool EvaluateDesign(DamKernelInput damKernelInput, IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, out string evaluationMessage)
+ public bool EvaluateDesign(DamKernelInput damKernelInput, IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput,
+ out DesignAdvise designAdvise, out string evaluationMessage)
{
throw new NotImplementedException();
}
- public void InitDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput, out EmbankmentDesignParameters embankmentDesignParameters)
+ public void PrepareDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput,
+ int iterationIndex, out EmbankmentDesignParameters embankmentDesignParameters)
{
throw new NotImplementedException();
}
Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs
===================================================================
diff -u -r1203 -r1211
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs (.../DamMacroStabilityInwardsKernelWrapper.cs) (revision 1203)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs (.../DamMacroStabilityInwardsKernelWrapper.cs) (revision 1211)
@@ -458,12 +458,14 @@
/// The dam kernel input.
/// The kernel data input.
/// The kernel data output.
+ /// The design advise.
/// The evaluation message.
///
/// if the design was succesful
///
///
- public bool EvaluateDesign(DamKernelInput damKernelInput, IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, out string evaluationMessage)
+ public bool EvaluateDesign(DamKernelInput damKernelInput, IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput,
+ out DesignAdvise designAdvise, out string evaluationMessage)
{
throw new NotImplementedException();
}
@@ -477,13 +479,12 @@
return DesignStrategy.SlopeAdaptionBeforeShoulderAdaption;
}
- public void InitDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput, out EmbankmentDesignParameters embankmentDesignParameters)
+ public void PrepareDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput,
+ int iterationIndex, out EmbankmentDesignParameters embankmentDesignParameters)
{
DamMacroStabilityInput damMacroStabilityInput = kernelDataInput as DamMacroStabilityInput;
DamMacroStabilityUtils.ThrowWhenMacroStabilityKernelInputNull(damMacroStabilityInput);
- const int iterationIndex = -1;
-
string projectWorkingPath = damKernelInput.ProjectDir; //TODO #The
MStabModelType model = MStabModelType.Bishop; //TODO #The
string initialgeometryFile = DamMacroStabilityUtils.GetStabilityInputFileName(damKernelInput, iterationIndex, model, projectWorkingPath);
Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorFirstSlopeAdaptionThenShoulderAdaption.cs
===================================================================
diff -u -r1203 -r1211
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorFirstSlopeAdaptionThenShoulderAdaption.cs (.../DesignCalculatorFirstSlopeAdaptionThenShoulderAdaption.cs) (revision 1203)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorFirstSlopeAdaptionThenShoulderAdaption.cs (.../DesignCalculatorFirstSlopeAdaptionThenShoulderAdaption.cs) (revision 1211)
@@ -21,26 +21,16 @@
using System;
using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Xml.Linq;
-using Deltares.DamEngine.Calculators.DikesDesign;
using Deltares.DamEngine.Calculators.KernelWrappers.Common;
using Deltares.DamEngine.Calculators.KernelWrappers.Interfaces;
-using Deltares.DamEngine.Calculators.Stability;
using Deltares.DamEngine.Data.Design;
using Deltares.DamEngine.Data.General;
using Deltares.DamEngine.Data.General.Results;
-using Deltares.DamEngine.Data.Geometry;
using Deltares.DamEngine.Data.Geotechnics;
using Deltares.DamEngine.Data.Standard.Calculation;
using Deltares.DamEngine.Data.Standard.Logging;
-using Deltares.DamEngine.Data.Standard.Validation;
-using Deltares.DamMacroStability.Calculator;
-namespace Deltares.DamEngine.Calculators
+namespace Deltares.DamEngine.Calculators.DikesDesign
{
///
/// Design strategy: first slope adaption, then shoulder adaption
@@ -62,7 +52,7 @@
// Create the file with the initial geometry to be used to determine which layers have to be defined as dike embankment material
var EmbankmentDesignParameters = new EmbankmentDesignParameters();
- kernelWrapper.InitDesign(kernelDataInput, kernelDataOutput, damKernelInput, out EmbankmentDesignParameters);
+ kernelWrapper.PrepareDesign(kernelDataInput, kernelDataOutput, damKernelInput, iterationIndex, out EmbankmentDesignParameters);
string previousFilename = EmbankmentDesignParameters.PreviousGeometry2DFilename;
// CreateInitialGeometry(scenario, stabilityCalculator, soilProfileProbability, orgSurfaceLine, out previousFilename);
SurfaceLine2 surfaceLine = designScenario.GetMostRecentSurfaceLine(subSoilScenario.SoilProfile1D, subSoilScenario.StiFileName).FullDeepClone();
@@ -73,35 +63,41 @@
// PreviousGeometry2DFilename = previousFilename
// };
//
-// try
-// {
-// double? beta;
-// bool isRedesignRequired;
-// double? exitPointXCoordinate;
-// scenario.Location.AlignBoundaryPointsOfPL1LineWithAdaptedSurfaceLine(surfaceLine);
-// stabilityCalculator.Calculate(scenario, soilProfileProbability.SoilProfile,
-// GetFullSoilGeometry2DName(soilProfileProbability.SoilGeometry2DName),
-// iterationIndex, mstabDesignEmbankment);
+ try
+ {
+ double? beta;
+ bool isRedesignRequired;
+ double? exitPointXCoordinate;
+ location.AlignBoundaryPointsOfPL1LineWithAdaptedSurfaceLine(surfaceLine);
+ List locationCalculationMessages;
+ PrepareResult prepareResult = kernelWrapper.Prepare(damKernelInput, 0, out kernelDataInput, out kernelDataOutput);
+ if (prepareResult == PrepareResult.Successful)
+ {
+ kernelWrapper.Execute(kernelDataInput, kernelDataOutput, out locationCalculationMessages);
+ }
+ // stabilityCalculator.Calculate(designScenario, subSoilScenario.SoilProfile1D,
+ // GetFullSoilGeometry2DName(subSoilScenario.StiFileName),
+ // iterationIndex, mstabDesignEmbankment);
// mstabDesignEmbankment.PreviousGeometry2DFilename = stabilityCalculator.StabilityProjectFilename;
// mstabDesignEmbankment.EmbankmentMaterialname = location.ShoulderEmbankmentMaterial;
-// MStabResults? mStabResults = scenario.GetMStabResults(soilProfileProbability.SoilProfile,
-// soilProfileProbability.SoilGeometry2DName);
+// MStabResults? mStabResults = designScenario.GetMStabResults(subSoilScenario.SoilProfile1D,
+// subSoilScenario.StiFileName);
// double? safetyFactor = mStabResults.Value.zone1.safetyFactor;
-// beta = scenario.GetFailureProbabilityStability(soilProfileProbability.SoilProfile,
-// soilProfileProbability.SoilGeometry2DName);
+// beta = designScenario.GetFailureProbabilityStability(subSoilScenario.SoilProfile1D,
+// subSoilScenario.StiFileName);
// isRedesignRequired = IsRedesignRequired(safetyFactor, requiredSafetyFactor, betaRequired, beta);
// exitPointXCoordinate = mStabResults.Value.zone1.circleSurfacePointRightXCoordinate;
//
// if (!isRedesignRequired && surfaceLine != null)
// {
// // Set redesigned surfaceline to original, so in case no redesign is needed, the original surfaceline will be returned
-// scenario.SetRedesignedSurfaceLine(soilProfileProbability.SoilProfile,
-// soilProfileProbability.SoilGeometry2DName, surfaceLine);
+// designScenario.SetRedesignedSurfaceLine(subSoilScenario.SoilProfile1D,
+// subSoilScenario.StiFileName, surfaceLine);
// }
// else
// {
-// double maxFractionOfDikeHeightForShoulderHeight = scenario.Location.UseNewMaxHeightShoulderAsFraction ?
-// scenario.Location.NewMaxHeightShoulderAsFraction : defaultMaxFractionOfDikeHeightForShoulderHeight;
+// double maxFractionOfDikeHeightForShoulderHeight = designScenario.Location.UseNewMaxHeightShoulderAsFraction ?
+// designScenario.Location.NewMaxHeightShoulderAsFraction : defaultMaxFractionOfDikeHeightForShoulderHeight;
// double maxShoulderLevel = CalculateMaximumShoulderLevel(surfaceLine, maxFractionOfDikeHeightForShoulderHeight);
// while (isRedesignRequired && surfaceLine != null)
// {
@@ -128,7 +124,7 @@
// {
// throw new MaximumRedesignIterationsReachedException();
// }
-// var surfaceLineSlopeAdapter = new SurfaceLineSlopeAdapter(surfaceLine, scenario.Location);
+// var surfaceLineSlopeAdapter = new SurfaceLineSlopeAdapter(surfaceLine, designScenario.Location);
// // The parameter for ConstructNewSurfaceLineBySlope is the tangent of the slope, so use reciproce value
// surfaceLine = surfaceLineSlopeAdapter.ConstructNewSurfaceLineBySlope(1 / coTangent);
// currentCoTangent = coTangent;
@@ -138,20 +134,20 @@
// {
// throw new SurfaceLineException(validationError.Text);
// }
-// scenario.SetRedesignedSurfaceLine(soilProfileProbability.SoilProfile,
-// soilProfileProbability.SoilGeometry2DName, surfaceLine);
+// designScenario.SetRedesignedSurfaceLine(subSoilScenario.SoilProfile1D,
+// subSoilScenario.StiFileName, surfaceLine);
//
// // Recalculate new surfaceline
-// scenario.Location.AlignBoundaryPointsOfPL1LineWithAdaptedSurfaceLine(surfaceLine);
-// stabilityCalculator.Calculate(scenario, soilProfileProbability.SoilProfile,
-// GetFullSoilGeometry2DName(soilProfileProbability.SoilGeometry2DName),
+// designScenario.Location.AlignBoundaryPointsOfPL1LineWithAdaptedSurfaceLine(surfaceLine);
+// stabilityCalculator.Calculate(designScenario, subSoilScenario.SoilProfile1D,
+// GetFullSoilGeometry2DName(subSoilScenario.StiFileName),
// iterationIndex, mstabDesignEmbankment);
-// mStabResults = scenario.GetMStabResults(soilProfileProbability.SoilProfile,
-// soilProfileProbability.SoilGeometry2DName);
+// mStabResults = designScenario.GetMStabResults(subSoilScenario.SoilProfile1D,
+// subSoilScenario.StiFileName);
// safetyFactor = mStabResults.Value.zone1.safetyFactor;
// exitPointXCoordinate = mStabResults.Value.zone1.circleSurfacePointRightXCoordinate;
-// beta = scenario.GetFailureProbabilityStability(soilProfileProbability.SoilProfile,
-// soilProfileProbability.SoilGeometry2DName);
+// beta = designScenario.GetFailureProbabilityStability(subSoilScenario.SoilProfile1D,
+// subSoilScenario.StiFileName);
// isRedesignRequired = IsRedesignRequired(safetyFactor, requiredSafetyFactor, betaRequired, beta);
// limitPointForShoulderDesign = surfaceLine.GetLimitPointForShoulderDesign();
//
@@ -170,11 +166,11 @@
// // Determine new width and height for shoulder
// double shoulderHeight;
// double shoulderWidth;
-// DetermineNewShoulderWidthAndHeight(scenario.Location.StabilityShoulderGrowDeltaX,
-// scenario.Location.StabilityShoulderGrowSlope, surfaceLine, limitPointForShoulderDesign, out shoulderHeight, out shoulderWidth);
+// DetermineNewShoulderWidthAndHeight(designScenario.Location.StabilityShoulderGrowDeltaX,
+// designScenario.Location.StabilityShoulderGrowSlope, surfaceLine, limitPointForShoulderDesign, out shoulderHeight, out shoulderWidth);
//
// // Create new shoulder
-// var surfaceLineShoulderAdapter = new SurfaceLineShoulderAdapter(surfaceLine, scenario.Location);
+// var surfaceLineShoulderAdapter = new SurfaceLineShoulderAdapter(surfaceLine, designScenario.Location);
// surfaceLineShoulderAdapter.MaxShoulderLevel = maxShoulderLevel;
// surfaceLineShoulderAdapter.SlopeOfNewShoulder = currentCoTangent;
// surfaceLine = surfaceLineShoulderAdapter.ConstructNewSurfaceLine(shoulderWidth, shoulderHeight, false);
@@ -184,37 +180,37 @@
// {
// throw new SurfaceLineException(validationError.Text);
// }
-// scenario.SetRedesignedSurfaceLine(soilProfileProbability.SoilProfile, soilProfileProbability.SoilGeometry2DName, surfaceLine);
+// designScenario.SetRedesignedSurfaceLine(subSoilScenario.SoilProfile1D, subSoilScenario.StiFileName, surfaceLine);
//
// // Recalculate new surfaceline
-// scenario.Location.AlignBoundaryPointsOfPL1LineWithAdaptedSurfaceLine(surfaceLine);
-// stabilityCalculator.Calculate(scenario, soilProfileProbability.SoilProfile,
-// GetFullSoilGeometry2DName(soilProfileProbability.SoilGeometry2DName),
+// designScenario.Location.AlignBoundaryPointsOfPL1LineWithAdaptedSurfaceLine(surfaceLine);
+// stabilityCalculator.Calculate(scenario, subSoilScenario.SoilProfile1D,
+// GetFullSoilGeometry2DName(subSoilScenario.StiFileName),
// iterationIndex, mstabDesignEmbankment);
-// mStabResults = scenario.GetMStabResults(soilProfileProbability.SoilProfile, soilProfileProbability.SoilGeometry2DName);
+// mStabResults = designScenario.GetMStabResults(subSoilScenario.SoilProfile1D, subSoilScenario.StiFileName);
// safetyFactor = mStabResults.Value.zone1.safetyFactor;
-// beta = scenario.GetFailureProbabilityStability(soilProfileProbability.SoilProfile, soilProfileProbability.SoilGeometry2DName);
+// beta = designScenario.GetFailureProbabilityStability(subSoilScenario.SoilProfile1D, subSoilScenario.StiFileName);
// isRedesignRequired = IsRedesignRequired(safetyFactor, requiredSafetyFactor, betaRequired, beta);
// limitPointForShoulderDesign = surfaceLine.GetLimitPointForShoulderDesign();
// }
// }
// }
-// scenario.SetResultMessage(soilProfileProbability.SoilProfile, soilProfileProbability.SoilGeometry2DName, "Succes");
-// }
-// catch (Exception exception)
-// {
-// string errorMessage = "FAIL: " + exception.Message;
-// Exception innerException = exception.InnerException;
-// while (innerException != null)
-// {
-// errorMessage = errorMessage + ";" + innerException.Message;
-// innerException = innerException.InnerException;
-// }
-// scenario.SetResultMessage(soilProfileProbability.SoilProfile, soilProfileProbability.SoilGeometry2DName, errorMessage);
-// scenario.CalculationResult = CalculationResult.RunFailed;
-// // Redesign not succesful, so no redesigned surfaceline will be returned
-// scenario.SetRedesignedSurfaceLine(soilProfileProbability.SoilProfile, soilProfileProbability.SoilGeometry2DName, null);
-// }
+ designScenario.SetResultMessage(subSoilScenario.SoilProfile1D, subSoilScenario.StiFileName, "Succes");
+ }
+ catch (Exception exception)
+ {
+ string errorMessage = "FAIL: " + exception.Message;
+ Exception innerException = exception.InnerException;
+ while (innerException != null)
+ {
+ errorMessage = errorMessage + ";" + innerException.Message;
+ innerException = innerException.InnerException;
+ }
+ designScenario.SetResultMessage(subSoilScenario.SoilProfile1D, subSoilScenario.StiFileName, errorMessage);
+ designScenario.CalculationResult = CalculationResult.RunFailed;
+ // Redesign not succesful, so no redesigned surfaceline will be returned
+ designScenario.SetRedesignedSurfaceLine(subSoilScenario.SoilProfile1D, subSoilScenario.StiFileName, null);
+ }
// foreach (var errorMessage in stabilityCalculator.ErrorMessages)
// {
// errorMessages.Add(errorMessage);
Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorShoulderPerPoint.cs
===================================================================
diff -u -r1152 -r1211
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorShoulderPerPoint.cs (.../DesignCalculatorShoulderPerPoint.cs) (revision 1152)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesDesign/DesignCalculatorShoulderPerPoint.cs (.../DesignCalculatorShoulderPerPoint.cs) (revision 1211)
@@ -153,7 +153,8 @@
}
string evaluationMessage;
- bool designSuccessful = kernelWrapper.EvaluateDesign(damKernelInput, kernelDataInput, kernelDataOutput, out evaluationMessage);
+ DesignAdvise designAdvise;
+ bool designSuccessful = kernelWrapper.EvaluateDesign(damKernelInput, kernelDataInput, kernelDataOutput, out designAdvise, out evaluationMessage);
if (!designSuccessful)
{
throw new DesignCalculatorException(String.Format(Resources.DesignUnsuccessful,
Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityOutwards/DamMacroStabilityOutwardsKernelWrapper.cs
===================================================================
diff -u -r1203 -r1211
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityOutwards/DamMacroStabilityOutwardsKernelWrapper.cs (.../DamMacroStabilityOutwardsKernelWrapper.cs) (revision 1203)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityOutwards/DamMacroStabilityOutwardsKernelWrapper.cs (.../DamMacroStabilityOutwardsKernelWrapper.cs) (revision 1211)
@@ -327,17 +327,20 @@
/// The dam kernel input.
/// The kernel data input.
/// The kernel data output.
+ /// The design advise.
/// The evaluation message.
///
/// if the design was succesful
///
///
- public bool EvaluateDesign(DamKernelInput damKernelInput, IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, out string evaluationMessage)
+ public bool EvaluateDesign(DamKernelInput damKernelInput, IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput,
+ out DesignAdvise designAdvise, out string evaluationMessage)
{
throw new NotImplementedException();
}
- public void InitDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput, out EmbankmentDesignParameters embankmentDesignParameters)
+ public void PrepareDesign(IKernelDataInput kernelDataInput, IKernelDataOutput kernelDataOutput, DamKernelInput damKernelInput,
+ int iterationIndex, out EmbankmentDesignParameters embankmentDesignParameters)
{
throw new NotImplementedException();
}