Index: DamClients/DamUI/trunk/src/Dam/Data/DamEngineIo/FillDamUiFromXmlOutput.cs
===================================================================
diff -u -r1015 -r1025
--- DamClients/DamUI/trunk/src/Dam/Data/DamEngineIo/FillDamUiFromXmlOutput.cs (.../FillDamUiFromXmlOutput.cs) (revision 1015)
+++ DamClients/DamUI/trunk/src/Dam/Data/DamEngineIo/FillDamUiFromXmlOutput.cs (.../FillDamUiFromXmlOutput.cs) (revision 1025)
@@ -218,7 +218,6 @@
desResult.ResultMessage = designResult.StabilityDesignResults.ResultMessage;
if (designResult.StabilityDesignResults.RedesignedSurfaceLine != null)
{
- desResult.RedesignedSurfaceLine2 = new SurfaceLine2();
var surfaceLine = ConvertXmlSurfaceLineToSurfaceLine2(designResult.StabilityDesignResults.RedesignedSurfaceLine);
desResult.RedesignedSurfaceLine2 = surfaceLine;
}
Index: DamClients/DamUI/trunk/src/Dam/Data/CsvExportData.cs
===================================================================
diff -u -r875 -r1025
--- DamClients/DamUI/trunk/src/Dam/Data/CsvExportData.cs (.../branches/CalcualtionIncluded/src/Dam/Data/CsvExportData.cs) (revision 875)
+++ DamClients/DamUI/trunk/src/Dam/Data/CsvExportData.cs (.../trunk/src/Dam/Data/CsvExportData.cs) (revision 1025)
@@ -1,67 +1,67 @@
-//-----------------------------------------------------------------------
-//
-// Copyright (c) 2010 Deltares. All rights reserved.
-//
-// B.S.T.I.M. The
-// tom.the@deltares.nl
-// 05-10-2010
-// Data definition for results export to csv
-//-----------------------------------------------------------------------
+// Copyright (C) Stichting Deltares 2018. All rights reserved.
+//
+// This file is part of the application DAM - UI.
+//
+// DAM - UI 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.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Xml.Serialization;
using Deltares.Geographic;
using Deltares.Geometry;
-using Deltares.Geotechnics;
-using Deltares.Geotechnics.Converter;
using Deltares.Geotechnics.GeotechnicalGeometry;
using Deltares.Standard;
using Deltares.Standard.EventPublisher;
using Deltares.Standard.Units;
using System;
-using System.Collections.Generic;
using Deltares.Geotechnics.Soils;
using Deltares.Geotechnics.SurfaceLines;
using Deltares.Standard.Attributes;
namespace Deltares.Dam.Data
{
///
- ///1:"Id":invoer
- ///2:"Dijkringnaam":invoer
- ///3:"RDX":invoer
- ///4:"RDY":invoer
- ///5:"Scenarionummer (waterhoogtenummer, hoeveelste \"entry\" uit tabel; 1, 2, 3, 4 of 5)":invoer
- ///6:"Waterhoogtewaarde":invoer
- ///7:"Dijkhoogte bestaand":invoer
- ///8:"Huidige locatie teen":invoer
- ///9:"Dijktafelhoogte":invoer
- ///10:"1Dprofiel":invoer
- ///11:"Mechanisme":invoer
- ///12:"1Dprofiel kans":invoer
- ///13:"Berekende lokatie teen":uitvoer
- ///14:"Bermhoogte":uitvoer
- ///15:"Dijkbasis bestaand":invoer
- ///16:"Dijkbasis nieuw":uitvoer
+ /// Class for presenting Design results.
///
- public class CsvExportData : ICloneable, IVisibleEnabled, IGeographicPoint
+ ///
+ ///
+ ///
+ public class CsvExportData : IVisibleEnabled, IGeographicPoint
{
- private string id;
private string baseFileName;
+ private string scenarioName;
+ private string locationName;
+ private int locationScenarioCount;
+ private double xRd;
+ private double yRd;
+ private string profileName;
+
private string calculationSubDir;
- private Dike dike;
+ private string dikeName;
private AnalysisType analysisType;
private ProbabilisticType probabilisticType;
private DamFailureMechanismeCalculationSpecification damFailureMechanismeCalculationSpecification;
private Scenario scenario;
private SoilProfile1D soilProfile;
private string soilGeometry2DName;
- private double? safetyFactorFlowSlide;
private double? failureProbabilityPiping;
private double? localPipingExitPointX;
- private SurfaceLine2 redesignedSurfaceLinePiping;
private double? safetyFactorStability;
private double? failureProbabilityStability;
private double? zone1SafetyFactorStability;
@@ -89,186 +89,33 @@
private double? pl4MinUplift;
private double? pl4HeadAdjusted;
private double? pl4LocalLocationXMinUplift;
- private string nwoId;
- private int nwoResultIndex;
- private double? locationXrdStart;
- private double? locationYrdStart;
- private double? locationZrdStart;
- private double? locationXrdEnd;
- private double? locationYrdEnd;
- private double? locationZrdEnd;
private CalculationResult calculationResult = CalculationResult.NoRun;
private string resultMessage = "";
private int numberOfIterations;
+
private ResultEvaluation resultEvaluation = ResultEvaluation.NotEvaluated;
private string notes = "";
- private bool dirty = true;
- private List points = new List();
+
private StabilityKernelType selectedStabilityKernelType = StabilityKernelType.DamClassic;
- private SurfaceLine2 redesignedSurfaceLineStability;
+ // redesigned LOCAL surfaceline (initialized with original local surfaceline)
+ private SurfaceLine2 redesignedSurfaceLine;
+ // redesigned Global surfaceline in use for this result (either piping or stability)
+ private SurfaceLine2 redesignedSurfaceLineGlobal;
public CsvExportData()
{
+ // this contructor is needed for the UI table eventhough is seems not to be referenced.
}
- public CsvExportData(string id, Dike dike, DamFailureMechanismeCalculationSpecification damFailureMechanismeCalculationSpecification, Scenario scenario, SoilProfile1D soilProfile,
- string soilGeometry2DName, AnalysisType analysisType, int nwoResultIndex, ProbabilisticType probabilisticType)
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Name of the location.
+ /// Name of the scenario.
+ public CsvExportData(string locationName, string scenarioName)
{
- this.id = id;
- this.BaseFileName = "";
- this.CalculationSubDir = "";
- this.dike = dike;
- this.damFailureMechanismeCalculationSpecification = damFailureMechanismeCalculationSpecification;
- this.scenario = scenario;
- this.soilProfile = soilProfile;
- this.SoilGeometry2DName = soilGeometry2DName;
- this.analysisType = analysisType;
- this.failureProbabilityPiping = null;
- this.redesignedSurfaceLinePiping = null;
- this.safetyFactorStability = null;
- this.failureProbabilityStability = null;
- this.redesignedSurfaceLineStability = null;
- this.zone1SafetyFactorStability = null;
- this.LocalZone1EntryPointX = null;
- this.LocalZone1ExitPointX = null;
- this.zone2SafetyFactorStability = null;
- this.LocalZone2EntryPointX = null;
- this.LocalZone2ExitPointX = null;
- this.blighPipingFactor = null;
- this.blighHCritical = null;
- this.sellmeijer2ForcesPipingFactor = null;
- this.sellmeijer2ForcesHCritical = null;
- this.sellmeijer4ForcesPipingFactor = null;
- this.sellmeijer4ForcesHCritical = null;
- this.sellmeijerPipingFactor = null;
- this.sellmeijerHCritical = null;
- this.wti2017PipingFactor = null;
- this.wti2017HCritical = null;
- this.isUplift = null;
- this.pl3MinUplift = null;
- this.pl3HeadAdjusted = null;
- this.pl3LocalLocationXMinUplift = null;
- this.pl4MinUplift = null;
- this.pl4HeadAdjusted = null;
- this.pl4LocalLocationXMinUplift = null;
- this.nwoId = "";
- this.nwoResultIndex = nwoResultIndex;
- this.locationXrdStart = null;
- this.locationXrdEnd = null;
- this.locationYrdStart = null;
- this.locationYrdEnd = null;
- this.locationZrdStart = null;
- this.locationZrdEnd = null;
- this.dirty = true;
-
- if (damFailureMechanismeCalculationSpecification != null)
- {
- this.probabilisticType = probabilisticType;
- switch (damFailureMechanismeCalculationSpecification.FailureMechanismSystemType)
- {
- case FailureMechanismSystemType.StabilityInside:
- case FailureMechanismSystemType.StabilityOutside:
-
- if (analysisType == AnalysisType.AdaptNWO)
- {
- // an index of 0 can also indicate an error message. That has no futher data so check if there actualy is any.
- if (scenario.NwoResults.Count > 0)
- {
- this.nwoId = scenario.NwoResults[nwoResultIndex].NwoId;
- this.locationXrdStart = scenario.NwoResults[nwoResultIndex].LocationXrdStart;
- this.locationYrdStart = scenario.NwoResults[nwoResultIndex].LocationYrdStart;
- this.locationZrdStart = scenario.NwoResults[nwoResultIndex].LocationZrdStart;
- this.locationXrdEnd = scenario.NwoResults[nwoResultIndex].LocationXrdEnd;
- this.locationYrdEnd = scenario.NwoResults[nwoResultIndex].LocationYrdEnd;
- this.locationZrdEnd = scenario.NwoResults[nwoResultIndex].LocationZrdEnd;
- this.dirty = true;
- this.BaseFileName = scenario.NwoResults[nwoResultIndex].MStabResults.CalculationName;
- this.CalculationSubDir =
- scenario.NwoResults[nwoResultIndex].MStabResults.CalculationSubDir;
- this.numberOfIterations =
- scenario.NwoResults[nwoResultIndex].MStabResults.IterationNumber;
- this.safetyFactorStability = scenario.NwoResults[nwoResultIndex].MStabResults.zone1.safetyFactor;
- this.zone1SafetyFactorStability = scenario.NwoResults[nwoResultIndex].MStabResults.zone1.safetyFactor;
- this.LocalZone1EntryPointX = scenario.NwoResults[nwoResultIndex].MStabResults.zone1.entryPointXCoordinate;
- this.LocalZone1ExitPointX = scenario.NwoResults[nwoResultIndex].MStabResults.zone1.exitPointXCoordinate;
- if (scenario.NwoResults[nwoResultIndex].MStabResults.zone2 != null)
- {
- this.zone2SafetyFactorStability = scenario.NwoResults[nwoResultIndex].MStabResults.zone2.Value.safetyFactor;
- this.LocalZone2EntryPointX = scenario.NwoResults[nwoResultIndex].MStabResults.zone2.Value.entryPointXCoordinate;
- this.LocalZone2ExitPointX = scenario.NwoResults[nwoResultIndex].MStabResults.zone2.Value.exitPointXCoordinate;
- }
- }
- }
- else
- {
- MStabResults? mstabResults = scenario.GetMStabResults(this.SoilProfile, this.SoilGeometry2DName);
- this.resultMessage = scenario.GetResultMessage(this.SoilProfile, this.SoilGeometry2DName);
- calculationResult = DetermineStabilityCalculationResult(this.resultMessage, mstabResults);
- if (mstabResults != null)
- {
-
- BaseFileName = mstabResults.Value.CalculationName;
- CalculationSubDir = mstabResults.Value.CalculationSubDir;
- numberOfIterations = mstabResults.Value.IterationNumber;
- this.safetyFactorStability = mstabResults.Value.zone1.safetyFactor;
- this.zone1SafetyFactorStability = mstabResults.Value.zone1.safetyFactor;
- this.LocalZone1EntryPointX = mstabResults.Value.zone1.entryPointXCoordinate;
- this.LocalZone1ExitPointX = mstabResults.Value.zone1.exitPointXCoordinate;
- if (mstabResults.Value.zone2 != null)
- {
- this.zone2SafetyFactorStability = mstabResults.Value.zone2.Value.safetyFactor;
- this.LocalZone2EntryPointX = mstabResults.Value.zone2.Value.entryPointXCoordinate;
- this.LocalZone2ExitPointX = mstabResults.Value.zone2.Value.exitPointXCoordinate;
- }
- }
- }
- this.failureProbabilityStability = scenario.GetFailureProbabilityStability(this.SoilProfile, this.SoilGeometry2DName);
- this.redesignedSurfaceLineStability = scenario.GetRedesignedSurfaceLine(this.SoilProfile, this.SoilGeometry2DName);
-
- UpliftSituation? upliftSituation = scenario.GetStabilityUpliftSituation(this.SoilProfile, this.SoilGeometry2DName);
- if (upliftSituation != null)
- {
- SetUpliftSituationResults(upliftSituation.Value);
- }
-
- break;
-
- case FailureMechanismSystemType.Piping:
-
- this.failureProbabilityPiping = scenario.GetFailureProbabilityPiping(this.SoilProfile, this.SoilGeometry2DName);
- this.resultMessage = scenario.GetResultMessage(this.SoilProfile, this.SoilGeometry2DName);
- this.redesignedSurfaceLinePiping = scenario.GetRedesignedSurfaceLine(this.SoilProfile, this.SoilGeometry2DName);
- UpliftSituation? upliftSituationPiping = scenario.GetStabilityUpliftSituation(this.SoilProfile, this.SoilGeometry2DName);
- if (upliftSituationPiping != null)
- {
- SetUpliftSituationResults(upliftSituationPiping.Value);
- }
- PipingResults? pipingResults = scenario.GetPipingResults(this.SoilProfile, this.SoilGeometry2DName);
- if (pipingResults != null)
- {
- BaseFileName = pipingResults.Value.CalculationName;
- CalculationSubDir = pipingResults.Value.CalculationSubDir;
- this.blighPipingFactor = pipingResults.Value.BlighPipingFactor;
- this.blighHCritical = pipingResults.Value.BlighHCritical;
- this.sellmeijer2ForcesPipingFactor = pipingResults.Value.Sellmeijer2ForcesPipingFactor;
- this.sellmeijer2ForcesHCritical = pipingResults.Value.Sellmeijer2ForcesHCritical;
- this.sellmeijer4ForcesPipingFactor = pipingResults.Value.Sellmeijer4ForcesPipingFactor;
- this.sellmeijer4ForcesHCritical = pipingResults.Value.Sellmeijer4ForcesHCritical;
- this.sellmeijerPipingFactor = pipingResults.Value.SellmeijerPipingFactor;
- this.sellmeijerHCritical = pipingResults.Value.SellmeijerHCritical;
- this.wti2017PipingFactor = pipingResults.Value.Wti2017PipingFactor;
- this.wti2017HCritical = pipingResults.Value.Wti2017HCritical;
- this.localPipingExitPointX = pipingResults.Value.PipingExitPointX;
- this.HeaveFactor = pipingResults.Value.HeaveFactor;
- this.UpliftFactor = pipingResults.Value.UpliftFactor;
- }
- this.calculationResult = (this.PipingFactor == null && this.PipingFailureProbability == null) ? CalculationResult.RunFailed : CalculationResult.Succeeded;
- break;
- case FailureMechanismSystemType.FlowSlide:
- this.safetyFactorFlowSlide = scenario.GetSafetyFactorFlowSlide(this.SoilProfile, this.SoilGeometry2DName);
- break;
- }
- }
+ this.locationName = locationName;
+ this.scenarioName = scenarioName;
}
///
@@ -286,75 +133,45 @@
return localPoint;
}
- ///
- /// Determines the stability calculation run result.
- ///
- /// The result message.
- /// The mstab results.
- ///
- private CalculationResult DetermineStabilityCalculationResult(string message, MStabResults? mstabResults)
- {
- CalculationResult result;
- if ((message != null) && this.resultMessage.Contains("FAIL"))
- {
- result = CalculationResult.UnexpectedError;
- }
- else
- {
- // If no failure and no results, then no run has been made
- result = mstabResults != null ? CalculationResult.Succeeded : CalculationResult.NoRun;
- }
- return result;
- }
-
- ///
- /// Sets the uplift situation results.
- ///
- /// The uplift situation.
- private void SetUpliftSituationResults(UpliftSituation upliftSituation)
- {
- this.isUplift = upliftSituation.IsUplift;
- if (upliftSituation.Pl3MinUplift < double.MaxValue)
- {
- this.pl3MinUplift = upliftSituation.Pl3MinUplift;
- }
- if (upliftSituation.Pl3HeadAdjusted < double.MaxValue)
- {
- this.pl3HeadAdjusted = upliftSituation.Pl3HeadAdjusted;
- }
- if (upliftSituation.Pl3LocationXMinUplift < double.MaxValue)
- {
- this.pl3LocalLocationXMinUplift = upliftSituation.Pl3LocationXMinUplift;
- }
- if (upliftSituation.Pl4MinUplift < double.MaxValue)
- {
- this.pl4MinUplift = upliftSituation.Pl4MinUplift;
- }
- if (upliftSituation.Pl4HeadAdjusted < double.MaxValue)
- {
- this.pl4HeadAdjusted = upliftSituation.Pl4HeadAdjusted;
- }
- if (upliftSituation.Pl4LocationXMinUplift < double.MaxValue)
- {
- this.pl4LocalLocationXMinUplift = upliftSituation.Pl4LocationXMinUplift;
- }
- }
-
[Browsable(false)]
public StabilityKernelType SelectedStabilityKernelType
{
get { return selectedStabilityKernelType; }
set { selectedStabilityKernelType = value; }
}
+ ///
+ /// Gets or sets the number of iterations (as used in the design calculation).
+ ///
+ ///
+ /// The number of iterations.
+ ///
[Label("Number of iterations")]
[ReadOnly(true)]
public int NumberOfIterations
{
- get { return numberOfIterations; }
+ get
+ {
+ if (damFailureMechanismeCalculationSpecification.FailureMechanismSystemType == FailureMechanismSystemType.StabilityInside ||
+ damFailureMechanismeCalculationSpecification.FailureMechanismSystemType == FailureMechanismSystemType.StabilityOutside)
+ {
+ var mstabResults = scenario.GetMStabResults(soilProfile, soilGeometry2DName);
+ if (mstabResults != null)
+ {
+ numberOfIterations = mstabResults.Value.IterationNumber;
+ }
+ }
+ return numberOfIterations;
+ }
set { numberOfIterations = value; }
}
+ ///
+ /// Gets the result file.
+ ///
+ ///
+ /// The result file.
+ ///
[Browsable(false)]
[Label("Image file")]
public string ResultFile
@@ -385,9 +202,15 @@
}
}
+ ///
+ /// Gets the input file.
+ ///
+ ///
+ /// The input file.
+ ///
[Browsable(false)]
[Label("Input file")]
- public string InputFile
+ private string InputFile
{
get
{
@@ -411,9 +234,15 @@
}
}
+ ///
+ /// Gets the piping result file.
+ ///
+ ///
+ /// The piping result file.
+ ///
[Browsable(false)]
[Label("Input file")]
- public string PipingResultFile
+ private string PipingResultFile
{
// Path of piping is not based on the working dir but on assembly (Assembly.GetExecutingAssembly().Location)
get
@@ -437,7 +266,7 @@
[Label("Analysis")]
[PropertyOrder(1, 2)]
[ReadOnly(true)]
- public AnalysisType AnalysisType
+ public AnalysisType AnalysisType // moet vanuit invoer komen
{
get { return analysisType; }
set { analysisType = value; }
@@ -446,46 +275,57 @@
[Label("Probabilistic")]
[PropertyOrder(1, 3)]
[ReadOnly(true)]
- public ProbabilisticType ProbabilisticType
+ public ProbabilisticType ProbabilisticType // moet vanuit invoer komen
{
get { return probabilisticType; }
set { probabilisticType = value; }
}
[Browsable(false)]
- public DamFailureMechanismeCalculationSpecification DamFailureMechanismeCalculation
+ public DamFailureMechanismeCalculationSpecification DamFailureMechanismeCalculation // moet vanuit invoer komen
{
get { return damFailureMechanismeCalculationSpecification; }
- set { damFailureMechanismeCalculationSpecification = value; }
+ set
+ {
+ // Clone the specification to ensure a non-changeable version.
+ damFailureMechanismeCalculationSpecification = value.Clone();
+ }
}
- [CsvExportColumn("id", 1)]
- [Browsable(false)]
- public string ID
- {
- get { return this.id; }
- }
-
[CsvExportColumn("DikeName", 2)]
[Browsable(false)]
[Label("Dike")]
public string DikeName
{
- get { return dike.Name; }
+ get
+ {
+ return dikeName;
+ }
+ set
+ {
+ dikeName = value;
+ }
}
[CsvExportColumn("Calculation", 3)]
[Browsable(false)]
public string Calculation
{
- get { return this.damFailureMechanismeCalculationSpecification != null ? this.damFailureMechanismeCalculationSpecification.ToString() : ""; }
+ get { return damFailureMechanismeCalculationSpecification != null ? damFailureMechanismeCalculationSpecification.ToString() : ""; }
}
[CsvExportColumn("Scenario", 4)]
[Browsable(false)]
public string ScenarioName
{
- get { return this.Scenario.LocationScenarioID; }
+ get
+ {
+ return scenarioName;
+ }
+ set
+ {
+ scenarioName = value;
+ }
}
[CsvExportColumn("LocationName", 5)]
@@ -494,25 +334,27 @@
[ReadOnly(true)]
public string LocationName
{
- get { return this.Scenario.Location.Name; }
+ get
+ {
+ return locationName;
+ }
+ set
+ {
+ locationName = value;
+ }
}
- [Browsable(false)]
- public int LocationScenarioCount
- {
- get { return this.Scenario.Location.Scenarios.Count; }
- }
-
[Label("Scenario")]
[PropertyOrder(0, 2)]
[ReadOnly(true)]
public string ScenarioDefinitionName
{
- get { return this.Scenario.LocationScenarioID + " of " + this.LocationScenarioCount.ToString(); }
+ get { return scenarioName + " of " + locationScenarioCount.ToString(); }
}
[Label("Calculation result")]
[PropertyOrder(0, 3)]
+ [ReadOnly(true)]
public CalculationResult CalculationResult
{
get
@@ -545,14 +387,11 @@
{
get
{
- return (this.Scenario != null) ? this.Scenario.Location.XRd : 0.0;
+ return xRd;
}
set
{
- if (this.Scenario != null)
- {
- this.Scenario.Location.XRd = value;
- }
+ xRd = value;
}
}
@@ -567,22 +406,19 @@
{
get
{
- return (this.Scenario != null) ? this.Scenario.Location.YRd : 0.0;
+ return yRd;
}
set
{
- if (this.Scenario != null)
- {
- this.Scenario.Location.YRd = value;
- }
+ yRd = value;
}
}
[CsvExportColumn("LocationScenarioId", 8)]
[Browsable(false)]
public string LocationScenarioId
{
- get { return this.Scenario.LocationScenarioID; }
+ get { return scenarioName; }
}
[Label("River level")]
@@ -592,7 +428,7 @@
[ReadOnly(true)]
public double? RiverLevel
{
- get { return this.Scenario.RiverLevel; }
+ get { return scenario.RiverLevel; }
}
[Label("River level low")]
@@ -602,7 +438,7 @@
[ReadOnly(true)]
public double? RiverLevelLow
{
- get { return this.Scenario.RiverLevelLow; }
+ get { return scenario.RiverLevelLow; }
}
[Label("Dike table height")]
@@ -612,7 +448,7 @@
[ReadOnly(true)]
public double? DikeTableHeight
{
- get { return this.Scenario.DikeTableHeight; }
+ get { return scenario.DikeTableHeight; }
}
[Label("Slope damping factor")]
@@ -622,72 +458,73 @@
[ReadOnly(true)]
public double? SlopeDampingPiezometricHeightPolderSide
{
- get { return this.Scenario.Location.SlopeDampingPiezometricHeightPolderSide; }
+ get { return scenario.Location.SlopeDampingPiezometricHeightPolderSide; }
}
+ ///
+ /// Gets the height of the current original dike (so not of the redesigned surfaceline).
+ ///
+ ///
+ /// The height of the current dike.
+ ///
[CsvExportColumn("CurrentDikeHeight", 13)]
[Browsable(false)]
public double? CurrentDikeHeight
{
- get { return this.Scenario.Location.SurfaceLine2.GetDikeHeight(); }
+ get { return scenario.Location.SurfaceLine2.GetDikeHeight(); }
}
+ ///
+ /// Gets the current original dike toe at polder x (so not of the redesigned surfaceline).
+ ///
+ ///
+ /// The current global dike toe at polder x.
+ ///
[CsvExportColumn("CurrentDikeToeAtPolderX", 14)]
[Browsable(false)]
public double? CurrentDikeToeAtPolderX
{
get
{
double? x = null;
- GeometryPoint point = this.Scenario.Location.SurfaceLine2.GetDikeToeInward();
+ GeometryPoint point = scenario.Location.SurfaceLine2.GetDikeToeInward();
if (point != null)
x = point.X;
return x;
}
}
+ ///
+ /// Gets the current original dike toe at polder z (so not of the redesigned surfaceline).
+ ///
+ ///
+ /// The current global dike toe at polder z.
+ ///
[CsvExportColumn("CurrentDikeToeAtPolderZ", 15)]
[Browsable(false)]
public double? CurrentDikeToeAtPolderZ
{
get
{
double? z = null;
- GeometryPoint point = this.Scenario.Location.SurfaceLine2.GetDikeToeInward();
+ GeometryPoint point = scenario.Location.SurfaceLine2.GetDikeToeInward();
if (point != null)
z = point.Z;
return z;
}
}
- private string GetSoilProfileName(FailureMechanismSystemType failureMechanismType)
- {
- string soilprofilename = "";
- if (this.SoilProfile != null)
- {
- soilprofilename = this.SoilProfile.Name;
- }
- else
- {
- if (this.SoilGeometry2DName != null)
- {
- soilprofilename = this.SoilGeometry2DName;
- }
- }
- return failureMechanismType == this.damFailureMechanismeCalculationSpecification.FailureMechanismSystemType ? soilprofilename : "";
- }
-
private double? GetSoilProfileProbability(FailureMechanismSystemType? failureMechanismType)
{
- return this.Scenario.Location.GetSoilProfileProbability(this.SoilProfile, failureMechanismType);
+ return scenario.Location.GetSoilProfileProbability(soilProfile, failureMechanismType);
}
[CsvExportColumn("StabilityProfileName", 16)]
[Label("Stability profile")]
[Browsable(false)]
public string StabilityProfileName
{
- get { return GetSoilProfileName(FailureMechanismSystemType.StabilityInside); }
+ get { return ProfileName; }
}
[CsvExportColumn("StabilityProfileProbability", 17)]
@@ -705,7 +542,7 @@
[Browsable(false)]
public string PipingProfileName
{
- get { return GetSoilProfileName(FailureMechanismSystemType.Piping); }
+ get { return ProfileName; }
}
[CsvExportColumn("PipingProfileProbability", 19)]
@@ -718,11 +555,17 @@
get { return GetSoilProfileProbability(FailureMechanismSystemType.Piping); }
}
+ ///
+ /// Gets the length of the current original dike (so not of the redesigned surfaceline).
+ ///
+ ///
+ /// The length of the current dike.
+ ///
[CsvExportColumn("CurrentDikeLength", 20)]
[Browsable(false)]
public double? CurrentDikeLength
{
- get { return this.Scenario.Location.SurfaceLine2.GetDikeLength(); }
+ get { return scenario.Location.SurfaceLine2.GetDikeLength(); }
}
[CsvExportColumn("StabilityToeAtPolderX", 21)]
@@ -734,14 +577,13 @@
{
get
{
- if (this.redesignedSurfaceLineStability == null)
+ if (redesignedSurfaceLineGlobal == null)
return null;
- GeometryPoint point = this.redesignedSurfaceLineStability.GetDikeToeInward();
+ GeometryPoint point = redesignedSurfaceLineGlobal.GetDikeToeInward();
if (point != null)
return point.X;
- else
- return null;
+ return null;
}
}
@@ -754,14 +596,13 @@
{
get
{
- if (this.redesignedSurfaceLineStability == null)
+ if (redesignedSurfaceLineGlobal == null)
return null;
- GeometryPoint point = this.redesignedSurfaceLineStability.GetDikeToeInward();
+ GeometryPoint point = redesignedSurfaceLineGlobal.GetDikeToeInward();
if (point != null)
return point.Z;
- else
- return null;
+ return null;
}
}
@@ -774,14 +615,13 @@
{
get
{
- if (this.redesignedSurfaceLineStability == null)
+ if (redesignedSurfaceLineGlobal == null)
return null;
- GeometryPoint point = this.redesignedSurfaceLineStability.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside);
+ GeometryPoint point = redesignedSurfaceLineGlobal.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside);
if (point != null)
return point.Z;
- else
- return null;
+ return null;
}
}
@@ -793,8 +633,8 @@
[Browsable(false)]
public double? StabilitySafetyFactor
{
- get { return this.safetyFactorStability; }
- set { this.safetyFactorStability = value; }
+ get { return safetyFactorStability; }
+ set { safetyFactorStability = value; }
}
[CsvExportColumn("StabilityFailureProbability", 25)]
@@ -805,8 +645,8 @@
[Browsable(false)]
public double? StabilityFailureProbability
{
- get { return this.failureProbabilityStability; }
- set { this.failureProbabilityStability = value; }
+ get { return failureProbabilityStability; }
+ set { failureProbabilityStability = value; }
}
[CsvExportColumn("RequiredSafetyFactorStabilityInnerSlope", 26)]
@@ -817,7 +657,7 @@
[Browsable(false)]
public double? RequiredSafetyFactorStabilityInnerSlope
{
- get { return this.Scenario.RequiredSafetyFactorStabilityInnerSlope;}
+ get { return scenario.RequiredSafetyFactorStabilityInnerSlope;}
}
[CsvExportColumn("RequiredSafetyFactorStabilityOuterSlope", 27)]
@@ -828,7 +668,7 @@
[Browsable(false)]
public double? RequiredSafetyFactorStabilityOuterSlope
{
- get { return this.Scenario.RequiredSafetyFactorStabilityOuterSlope; }
+ get { return scenario.RequiredSafetyFactorStabilityOuterSlope; }
}
[CsvExportColumn("RequiredSafetyFactorPiping", 28)]
@@ -839,7 +679,7 @@
[Browsable(false)]
public double? RequiredSafetyFactorPiping
{
- get { return this.Scenario.RequiredSafetyFactorPiping; }
+ get { return scenario.RequiredSafetyFactorPiping; }
}
[CsvExportColumn("PipingToeAtPolderX", 29)]
@@ -851,14 +691,13 @@
{
get
{
- if (this.redesignedSurfaceLinePiping == null)
+ if (redesignedSurfaceLineGlobal == null)
return null;
- GeometryPoint point = this.redesignedSurfaceLinePiping.GetDikeToeInward();
+ GeometryPoint point = redesignedSurfaceLineGlobal.GetDikeToeInward();
if (point != null)
return point.X;
- else
- return null;
+ return null;
}
}
@@ -871,14 +710,13 @@
{
get
{
- if (this.redesignedSurfaceLinePiping == null)
+ if (redesignedSurfaceLineGlobal == null)
return null;
- GeometryPoint point = this.redesignedSurfaceLinePiping.GetDikeToeInward();
+ GeometryPoint point = redesignedSurfaceLineGlobal.GetDikeToeInward();
if (point != null)
return point.Z;
- else
- return null;
+ return null;
}
}
@@ -891,14 +729,13 @@
{
get
{
- if (this.redesignedSurfaceLinePiping == null)
+ if (redesignedSurfaceLineGlobal == null)
return null;
- GeometryPoint point = redesignedSurfaceLinePiping.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside);
+ GeometryPoint point = redesignedSurfaceLineGlobal.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.ShoulderTopInside);
if (point != null)
return point.Z;
- else
- return null;
+ return null;
}
}
@@ -910,8 +747,8 @@
[Browsable(false)]
public double? PipingFailureProbability
{
- get { return this.failureProbabilityPiping; }
- set { this.failureProbabilityPiping = value; }
+ get { return failureProbabilityPiping; }
+ set { failureProbabilityPiping = value; }
}
[Label("Required piping failure probability")]
@@ -921,7 +758,7 @@
[Browsable(false)]
public double? RequiredFailureProbabilityPiping
{
- get { return this.Scenario.RequiredProbabilityOfFailurePiping; }
+ get { return scenario.RequiredProbabilityOfFailurePiping; }
}
[CsvExportColumn("DikeLength", 33)]
@@ -934,29 +771,11 @@
{
get
{
- double? maxDikeLength = null;
- List dikeLengths = new List();
- SurfaceLine2 surfaceLine = this.Scenario.Location.SurfaceLine2;
- if (surfaceLine != null)
- dikeLengths.Add(surfaceLine.GetDikeLength());
- switch (damFailureMechanismeCalculationSpecification.FailureMechanismSystemType)
+ if (redesignedSurfaceLineGlobal != null)
{
- case FailureMechanismSystemType.StabilityInside:
- if (redesignedSurfaceLineStability != null)
- dikeLengths.Add(redesignedSurfaceLineStability.GetDikeLength());
- break;
- case FailureMechanismSystemType.Piping:
- if (redesignedSurfaceLinePiping != null)
- dikeLengths.Add(redesignedSurfaceLinePiping.GetDikeLength());
- break;
+ return redesignedSurfaceLineGlobal.GetDikeLength();
}
-
- foreach (double? dikeLength in dikeLengths)
- {
- if (dikeLength.HasValue && (!maxDikeLength.HasValue || maxDikeLength < dikeLength))
- maxDikeLength = dikeLength;
- }
- return maxDikeLength;
+ return null;
}
}
@@ -968,8 +787,8 @@
[ReadOnly(true)]
public double? Zone1SafetyFactorStability
{
- get { return this.zone1SafetyFactorStability; }
- set { this.zone1SafetyFactorStability = value; }
+ get { return zone1SafetyFactorStability; }
+ set { zone1SafetyFactorStability = value; }
}
[Label("Zone 1 entry point (X-local)")]
@@ -994,11 +813,11 @@
{
get
{
- if (this.LocalZone1EntryPointX == null)
+ if (localZone1EntryPointX == null || redesignedSurfaceLineGlobal == null)
return null;
GeometryPoint point = DetermineGlobalPointCoordinatesBasedOnGlobalSurfaceLine(
- new GeometryPoint(this.LocalZone1EntryPointX.Value, 0.0, 0.0), this.Scenario.Location.SurfaceLine2);
+ new GeometryPoint(localZone1EntryPointX.Value, 0.0, 0.0), redesignedSurfaceLineGlobal);
return point.X;
}
@@ -1015,11 +834,11 @@
{
get
{
- if (this.LocalZone1EntryPointX == null)
+ if (localZone1EntryPointX == null || redesignedSurfaceLineGlobal == null)
return null;
GeometryPoint point = DetermineGlobalPointCoordinatesBasedOnGlobalSurfaceLine(
- new GeometryPoint(this.LocalZone1EntryPointX.Value, 0.0, 0.0), this.Scenario.Location.SurfaceLine2);
+ new GeometryPoint(localZone1EntryPointX.Value, 0.0, 0.0), redesignedSurfaceLineGlobal);
return point.Y;
}
@@ -1036,11 +855,11 @@
{
get
{
- if (this.LocalZone1EntryPointX == null)
+ if (localZone1EntryPointX == null)
return null;
- if (redesignedSurfaceLineStability == null)
+ if (redesignedSurfaceLine == null)
return null;
- return this.redesignedSurfaceLineStability.Geometry.GetZAtX(this.LocalZone1EntryPointX.Value);
+ return redesignedSurfaceLine.Geometry.GetZAtX(localZone1EntryPointX.Value);
}
}
@@ -1066,11 +885,11 @@
{
get
{
- if (this.LocalZone1ExitPointX == null)
+ if (localZone1ExitPointX == null || redesignedSurfaceLineGlobal == null)
return null;
GeometryPoint point = DetermineGlobalPointCoordinatesBasedOnGlobalSurfaceLine(
- new GeometryPoint(this.LocalZone1ExitPointX.Value, 0.0, 0.0), this.Scenario.Location.SurfaceLine2);
+ new GeometryPoint(localZone1ExitPointX.Value, 0.0, 0.0), redesignedSurfaceLineGlobal);
return point.X;
}
@@ -1086,11 +905,11 @@
{
get
{
- if (this.LocalZone1ExitPointX == null)
+ if (localZone1ExitPointX == null || redesignedSurfaceLineGlobal == null)
return null;
GeometryPoint point = DetermineGlobalPointCoordinatesBasedOnGlobalSurfaceLine(
- new GeometryPoint(this.LocalZone1ExitPointX.Value, 0.0, 0.0), this.Scenario.Location.SurfaceLine2);
+ new GeometryPoint(localZone1ExitPointX.Value, 0.0, 0.0), redesignedSurfaceLineGlobal);
return point.Y;
}
@@ -1106,11 +925,11 @@
{
get
{
- if (this.LocalZone1ExitPointX == null)
+ if (localZone1ExitPointX == null)
return null;
- if (redesignedSurfaceLineStability == null)
+ if (redesignedSurfaceLine == null)
return null;
- return this.redesignedSurfaceLineStability.Geometry.GetZAtX(this.LocalZone1ExitPointX.Value);
+ return redesignedSurfaceLine.Geometry.GetZAtX(localZone1ExitPointX.Value);
}
}
@@ -1122,8 +941,8 @@
[ReadOnly(true)]
public double? Zone2SafetyFactorStability
{
- get { return this.zone2SafetyFactorStability; }
- set { this.zone2SafetyFactorStability = value; }
+ get { return zone2SafetyFactorStability; }
+ set { zone2SafetyFactorStability = value; }
}
[CsvExportColumn("LocalZone2EntryPointX", 44)]
@@ -1148,11 +967,11 @@
{
get
{
- if (this.LocalZone2EntryPointX == null)
+ if (localZone2EntryPointX == null || redesignedSurfaceLineGlobal == null)
return null;
GeometryPoint point = DetermineGlobalPointCoordinatesBasedOnGlobalSurfaceLine(
- new GeometryPoint(this.LocalZone2EntryPointX.Value, 0.0, 0.0), this.Scenario.Location.SurfaceLine2);
+ new GeometryPoint(localZone2EntryPointX.Value, 0.0, 0.0), redesignedSurfaceLineGlobal);
return point.X;
@@ -1169,11 +988,11 @@
{
get
{
- if (this.LocalZone2EntryPointX == null)
+ if (localZone2EntryPointX == null || redesignedSurfaceLineGlobal == null)
return null;
GeometryPoint point = DetermineGlobalPointCoordinatesBasedOnGlobalSurfaceLine(
- new GeometryPoint(this.LocalZone2EntryPointX.Value, 0.0, 0.0), this.Scenario.Location.SurfaceLine2);
+ new GeometryPoint(localZone2EntryPointX.Value, 0.0, 0.0), redesignedSurfaceLineGlobal);
return point.Y;
@@ -1190,11 +1009,11 @@
{
get
{
- if (this.LocalZone2EntryPointX == null)
+ if (localZone2EntryPointX == null)
return null;
- if (redesignedSurfaceLineStability == null)
+ if (redesignedSurfaceLine == null)
return null;
- return this.redesignedSurfaceLineStability.Geometry.GetZAtX(this.LocalZone2EntryPointX.Value);
+ return redesignedSurfaceLine.Geometry.GetZAtX(localZone2EntryPointX.Value);
}
}
@@ -1220,11 +1039,11 @@
{
get
{
- if (this.LocalZone2ExitPointX == null)
+ if (localZone2ExitPointX == null || redesignedSurfaceLineGlobal == null)
return null;
GeometryPoint point = DetermineGlobalPointCoordinatesBasedOnGlobalSurfaceLine(
- new GeometryPoint(this.LocalZone2ExitPointX.Value, 0.0, 0.0), this.Scenario.Location.SurfaceLine2);
+ new GeometryPoint(localZone2ExitPointX.Value, 0.0, 0.0), redesignedSurfaceLineGlobal);
return point.X;
}
@@ -1240,11 +1059,11 @@
{
get
{
- if (this.LocalZone2ExitPointX == null)
+ if (localZone2ExitPointX == null || redesignedSurfaceLineGlobal == null)
return null;
GeometryPoint point = DetermineGlobalPointCoordinatesBasedOnGlobalSurfaceLine(
- new GeometryPoint(this.LocalZone2ExitPointX.Value, 0.0, 0.0), this.Scenario.Location.SurfaceLine2);
+ new GeometryPoint(localZone2ExitPointX.Value, 0.0, 0.0), redesignedSurfaceLineGlobal);
return point.Y;
}
@@ -1260,11 +1079,9 @@
{
get
{
- if (this.LocalZone2ExitPointX == null)
+ if (localZone2ExitPointX == null || redesignedSurfaceLine == null)
return null;
- if (redesignedSurfaceLineStability == null)
- return null;
- return this.redesignedSurfaceLineStability.Geometry.GetZAtX(this.LocalZone2ExitPointX.Value);
+ return redesignedSurfaceLine.Geometry.GetZAtX(localZone2ExitPointX.Value);
}
}
@@ -1274,8 +1091,8 @@
[ReadOnly(true)]
public bool? IsUplift
{
- get { return this.isUplift; }
- set { this.isUplift = value; }
+ get { return isUplift; }
+ set { isUplift = value; }
}
[CsvExportColumn("Pl3MinUplift", 53)]
@@ -1286,8 +1103,8 @@
[ReadOnly(true)]
public double? Pl3MinUplift
{
- get { return this.pl3MinUplift; }
- set { this.pl3MinUplift = value; }
+ get { return pl3MinUplift; }
+ set { pl3MinUplift = value; }
}
[CsvExportColumn("Pl3HeadAdjusted", 54)]
@@ -1298,8 +1115,8 @@
[ReadOnly(true)]
public double? Pl3HeadAdjusted
{
- get { return this.pl3HeadAdjusted; }
- set { this.pl3HeadAdjusted = value; }
+ get { return pl3HeadAdjusted; }
+ set { pl3HeadAdjusted = value; }
}
[CsvExportColumn("pl3LocalLocationXMinUplift", 55)]
@@ -1310,8 +1127,8 @@
[ReadOnly(true)]
public double? Pl3LocalLocationXMinUplift
{
- get { return this.pl3LocalLocationXMinUplift; }
- set { this.pl3LocalLocationXMinUplift = value; }
+ get { return pl3LocalLocationXMinUplift; }
+ set { pl3LocalLocationXMinUplift = value; }
}
[CsvExportColumn("Pl3LocationXMinUplift", 56)]
@@ -1325,11 +1142,11 @@
{
get
{
- if (this.pl3LocalLocationXMinUplift == null)
+ if (pl3LocalLocationXMinUplift == null || redesignedSurfaceLineGlobal == null)
return null;
GeometryPoint point = DetermineGlobalPointCoordinatesBasedOnGlobalSurfaceLine(
- new GeometryPoint(this.pl3LocalLocationXMinUplift.Value, 0.0, 0.0), this.Scenario.Location.SurfaceLine2);
+ new GeometryPoint(pl3LocalLocationXMinUplift.Value, 0.0, 0.0), redesignedSurfaceLineGlobal);
return point.X;
}
@@ -1346,11 +1163,11 @@
{
get
{
- if (this.pl3LocalLocationXMinUplift == null)
+ if (pl3LocalLocationXMinUplift == null || redesignedSurfaceLineGlobal == null)
return null;
GeometryPoint point = DetermineGlobalPointCoordinatesBasedOnGlobalSurfaceLine(
- new GeometryPoint(this.pl3LocalLocationXMinUplift.Value, 0.0, 0.0), this.Scenario.Location.SurfaceLine2);
+ new GeometryPoint(pl3LocalLocationXMinUplift.Value, 0.0, 0.0), redesignedSurfaceLineGlobal);
return point.Y;
}
@@ -1364,8 +1181,8 @@
[ReadOnly(true)]
public double? Pl4MinUplift
{
- get { return this.pl4MinUplift; }
- set { this.pl4MinUplift = value; }
+ get { return pl4MinUplift; }
+ set { pl4MinUplift = value; }
}
[CsvExportColumn("Pl4HeadAdjusted", 59)]
@@ -1376,8 +1193,8 @@
[ReadOnly(true)]
public double? Pl4HeadAdjusted
{
- get { return this.pl4HeadAdjusted; }
- set { this.pl4HeadAdjusted = value; }
+ get { return pl4HeadAdjusted; }
+ set { pl4HeadAdjusted = value; }
}
[CsvExportColumn("pl4LocalLocationXMinUplift", 60)]
@@ -1388,8 +1205,8 @@
[ReadOnly(true)]
public double? Pl4LocalLocationXMinUplift
{
- get { return this.pl4LocalLocationXMinUplift; }
- set { this.pl4LocalLocationXMinUplift = value; }
+ get { return pl4LocalLocationXMinUplift; }
+ set { pl4LocalLocationXMinUplift = value; }
}
[CsvExportColumn("Pl4LocationXMinUplift", 61)]
@@ -1403,11 +1220,11 @@
{
get
{
- if (this.pl4LocalLocationXMinUplift == null)
+ if (pl4LocalLocationXMinUplift == null || redesignedSurfaceLineGlobal == null)
return null;
GeometryPoint point = DetermineGlobalPointCoordinatesBasedOnGlobalSurfaceLine(
- new GeometryPoint(this.pl4LocalLocationXMinUplift.Value, 0.0, 0.0), this.Scenario.Location.SurfaceLine2);
+ new GeometryPoint(pl4LocalLocationXMinUplift.Value, 0.0, 0.0), redesignedSurfaceLineGlobal);
return point.X;
}
@@ -1424,11 +1241,11 @@
{
get
{
- if (this.pl4LocalLocationXMinUplift == null)
+ if (pl4LocalLocationXMinUplift == null || redesignedSurfaceLineGlobal == null)
return null;
GeometryPoint point = DetermineGlobalPointCoordinatesBasedOnGlobalSurfaceLine(
- new GeometryPoint(this.pl4LocalLocationXMinUplift.Value, 0.0, 0.0), this.Scenario.Location.SurfaceLine2);
+ new GeometryPoint(pl4LocalLocationXMinUplift.Value, 0.0, 0.0), redesignedSurfaceLineGlobal);
return point.Y;
}
@@ -1441,8 +1258,8 @@
//[Browsable(false)]
public double? UpliftFactor
{
- get { return this.upliftFactor; }
- set { this.upliftFactor = value; }
+ get { return upliftFactor; }
+ set { upliftFactor = value; }
}
[Label("Heave Factor")]
@@ -1452,8 +1269,8 @@
//[Browsable(false)]
public double? HeaveFactor
{
- get { return this.heaveFactor; }
- set { this.heaveFactor = value; }
+ get { return heaveFactor; }
+ set { heaveFactor = value; }
}
[CsvExportColumn("BlighPipingFactor", 63)]
@@ -1464,8 +1281,8 @@
[Browsable(false)]
public double? BlighPipingFactor
{
- get { return this.blighPipingFactor; }
- set { this.blighPipingFactor = value; }
+ get { return blighPipingFactor; }
+ set { blighPipingFactor = value; }
}
[CsvExportColumn("BlighHCritical", 64)]
@@ -1476,8 +1293,8 @@
[Browsable(false)]
public double? BlighHCritical
{
- get { return this.blighHCritical; }
- set { this.blighHCritical = value; }
+ get { return blighHCritical; }
+ set { blighHCritical = value; }
}
[CsvExportColumn("Sellmeijer2ForcesPipingFactor", 65)]
@@ -1488,8 +1305,8 @@
[Browsable(false)]
public double? Sellmeijer2ForcesPipingFactor
{
- get { return this.sellmeijer2ForcesPipingFactor; }
- set { this.sellmeijer2ForcesPipingFactor = value; }
+ get { return sellmeijer2ForcesPipingFactor; }
+ set { sellmeijer2ForcesPipingFactor = value; }
}
[CsvExportColumn("Sellmeijer2ForcesHCritical", 66)]
@@ -1500,8 +1317,8 @@
[Browsable(false)]
public double? Sellmeijer2ForcesHCritical
{
- get { return this.sellmeijer2ForcesHCritical; }
- set { this.sellmeijer2ForcesHCritical = value; }
+ get { return sellmeijer2ForcesHCritical; }
+ set { sellmeijer2ForcesHCritical = value; }
}
[CsvExportColumn("Sellmeijer4ForcesPipingFactor", 67)]
@@ -1512,8 +1329,8 @@
[Browsable(false)]
public double? Sellmeijer4ForcesPipingFactor
{
- get { return this.sellmeijer4ForcesPipingFactor; }
- set { this.sellmeijer4ForcesPipingFactor = value; }
+ get { return sellmeijer4ForcesPipingFactor; }
+ set { sellmeijer4ForcesPipingFactor = value; }
}
[CsvExportColumn("Sellmeijer4ForcesHCritical", 68)]
@@ -1524,8 +1341,8 @@
[Browsable(false)]
public double? Sellmeijer4ForcesHCritical
{
- get { return this.sellmeijer4ForcesHCritical; }
- set { this.sellmeijer4ForcesHCritical = value; }
+ get { return sellmeijer4ForcesHCritical; }
+ set { sellmeijer4ForcesHCritical = value; }
}
[CsvExportColumn("SellmeijerPipingFactor", 69)]
@@ -1536,8 +1353,8 @@
[Browsable(false)]
public double? SellmeijerPipingFactor
{
- get { return this.sellmeijerPipingFactor; }
- set { this.sellmeijerPipingFactor = value; }
+ get { return sellmeijerPipingFactor; }
+ set { sellmeijerPipingFactor = value; }
}
[CsvExportColumn("SellmeijerHCritical", 70)]
@@ -1548,8 +1365,8 @@
[Browsable(false)]
public double? SellmeijerHCritical
{
- get { return this.sellmeijerHCritical; }
- set { this.sellmeijerHCritical = value; }
+ get { return sellmeijerHCritical; }
+ set { sellmeijerHCritical = value; }
}
///
@@ -1586,165 +1403,116 @@
set { wti2017HCritical = value; }
}
- [CsvExportColumn("NonWaterRetainingObjectId", 71)]
- [Browsable(false)]
- public string NwoId { get { return this.nwoId; } }
-
- [CsvExportColumn("NWOResultIndex", 72)]
- [Browsable(false)]
- public int NwoResultIndex
- {
- get { return this.nwoResultIndex; }
- }
-
- [CsvExportColumn("NWOPoint1Xrd", 73)]
- [Browsable(false)]
- public double? NWOLocationXrdStart
- {
- get { return this.locationXrdStart; }
- }
-
- [CsvExportColumn("NWOPoint1Yrd", 74)]
- [Browsable(false)]
- public double? NWOLocationYrdStart
- {
- get { return this.locationYrdStart; }
- }
-
- [CsvExportColumn("NWOPoint1Zrd", 75)]
- [Browsable(false)]
- public double? NWOLocationZrdStart
- {
- get { return this.locationZrdStart; }
- }
-
- [CsvExportColumn("NWOPoint4Yrd", 76)]
- [Browsable(false)]
- public double? NWOLocationXrdEnd
- {
- get { return this.locationXrdEnd; }
- }
-
- [CsvExportColumn("NWOPoint4Xrd", 77)]
- [Browsable(false)]
- public double? NWOLocationYrdEnd
- {
- get { return this.locationYrdEnd; }
- }
-
- [CsvExportColumn("NWOPoint4Zrd", 78)]
- [Browsable(false)]
- public double? NWOLocationZrdEnd { get { return this.locationZrdEnd; } }
- //Note: using SurfaceLine instead of LocalXzSurfaceLine must give the proper RD coors. If this is not the case, error is somewhere else. Do not convert here!
-
[CsvExportColumn("DikeToeAtRiverXrd", 79)]
[Browsable(false)]
public double? DikeToeAtRiverXrd
{
- get { return this.Scenario.Location.SurfaceLine2.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtRiver).X; }
+ get { return redesignedSurfaceLineGlobal.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtRiver).X; }
}
[CsvExportColumn("DikeToeAtRiverYrd", 80)]
[Browsable(false)]
public double? DikeToeAtRiverYrd
{
- get { return this.Scenario.Location.SurfaceLine2.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtRiver).Y; }
+ get { return redesignedSurfaceLineGlobal.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtRiver).Y; }
}
[CsvExportColumn("DikeToeAtRiverZrd", 81)]
[Browsable(false)]
public double? DikeToeAtRiverZrd
{
- get { return this.Scenario.Location.SurfaceLine2.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtRiver).Z; }
+ get { return redesignedSurfaceLineGlobal.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtRiver).Z; }
}
[CsvExportColumn("DikeTopAtRiverXrd", 82)]
[Browsable(false)]
public double? DikeTopAtRiverXrd
{
- get { return this.Scenario.Location.SurfaceLine2.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtRiver).X; }
+ get { return redesignedSurfaceLineGlobal.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtRiver).X; }
}
[CsvExportColumn("DikeTopAtRiverYrd", 83)]
[Browsable(false)]
public double? DikeTopAtRiverYrd
{
- get { return this.Scenario.Location.SurfaceLine2.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtRiver).Y; }
+ get { return redesignedSurfaceLineGlobal.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtRiver).Y; }
}
[CsvExportColumn("DikeTopAtRiverZrd", 84)]
[Browsable(false)]
public double? DikeTopAtRiverZrd
{
- get { return this.Scenario.Location.SurfaceLine2.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtRiver).Z; }
+ get { return redesignedSurfaceLineGlobal.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtRiver).Z; }
}
[CsvExportColumn("DikeTopAtPolderXrd", 85)]
[Browsable(false)]
public double? DikeTopAtPolderXrd
{
- get { return this.Scenario.Location.SurfaceLine2.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).X; }
+ get { return redesignedSurfaceLineGlobal.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).X; }
}
[CsvExportColumn("DikeTopAtPolderYrd", 86)]
[Browsable(false)]
public double? DikeTopAtPolderYrd
{
- get { return this.Scenario.Location.SurfaceLine2.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).Y; }
+ get { return redesignedSurfaceLineGlobal.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).Y; }
}
[CsvExportColumn("DikeTopAtPolderZrd", 87)]
[Browsable(false)]
public double? DikeTopAtPolderZrd
{
- get { return this.Scenario.Location.SurfaceLine2.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).Z; }
+ get { return redesignedSurfaceLineGlobal.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).Z; }
}
[CsvExportColumn("DikeToeAtPolderXrd", 88)]
[Browsable(false)]
public double? DikeToeAtPolderXrd
{
- get { return this.Scenario.Location.SurfaceLine2.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).X; }
+ get { return redesignedSurfaceLineGlobal.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).X; }
}
[CsvExportColumn("DikeToeAtPolderYrd", 89)]
[Browsable(false)]
public double? DikeToeAtPolderYrd
{
- get { return this.Scenario.Location.SurfaceLine2.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Y; }
+ get { return redesignedSurfaceLineGlobal.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Y; }
}
[CsvExportColumn("DikeToeAtPolderZrd", 90)]
[Browsable(false)]
public double? DikeToeAtPolderZrd
{
- get { return this.Scenario.Location.SurfaceLine2.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z; }
+ get { return redesignedSurfaceLineGlobal.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtPolder).Z; }
}
- [CsvExportColumn("FlowSlideSafetyFactor", 91)]
- [Label("Flowslide safety factor")]
- [Format("F3")]
- [Unit(UnitType.None)]
- [ReadOnly(true)]
[Browsable(false)]
- public double? FlowSlideSafetyFactor
- {
- get { return this.safetyFactorFlowSlide; }
- set { this.safetyFactorFlowSlide = value; }
- }
-
- [Browsable(false)]
public Scenario Scenario
{
get { return scenario; }
- set { scenario = value; }
+ set
+ {
+ scenario = value;
+ if (scenario != null)
+ {
+ scenarioName = scenario.LocationScenarioID;
+ locationName = scenario.Location.Name;
+ locationScenarioCount = scenario.Location.Scenarios.Count;
+ xRd = scenario.Location.XRd;
+ yRd = scenario.Location.YRd;
+ }
+ }
}
[Browsable(false)]
public SoilProfile1D SoilProfile
{
get { return soilProfile; }
- set { soilProfile = value; }
+ set
+ {
+ soilProfile = value;
+ }
}
[Browsable(false)]
@@ -1755,69 +1523,36 @@
}
///
- /// Creates a new instance based on
+ /// Creates a new instance based on
/// with global coordinates instead of local coordinates.
///
[Browsable(false)]
- public SurfaceLine2 CreateRedesignedSurfaceLineStabilityGlobal()
+ public SurfaceLine2 CreateRedesignedSurfaceLineGlobal()
{
- if (this.RedesignedSurfaceLine2Stability == null)
+ if (redesignedSurfaceLine == null)
return null;
- SurfaceLine2 originalSurfaceLine = this.Scenario.Location.SurfaceLine2;
+ SurfaceLine2 originalSurfaceLine = scenario.Location.SurfaceLine2;
var coordinateSystemConverter = new CoordinateSystemConverter();
coordinateSystemConverter.DefineGlobalXYZBasedOnLine(originalSurfaceLine.Geometry);
+ var localRedesignedSurfaceLineGlobal = redesignedSurfaceLine.FullDeepClone();
+ coordinateSystemConverter.ConvertLocalXZToGlobalXYZ(localRedesignedSurfaceLineGlobal.Geometry);
- var redesignedSurfaceLineStabilityGlobal = new SurfaceLine2
- {
- CharacteristicPoints = { GeometryMustContainPoint = true },
- Geometry = new LocalizedGeometryPointString()
- };
- redesignedSurfaceLineStabilityGlobal.Assign(this.RedesignedSurfaceLine2Stability);
- coordinateSystemConverter.ConvertLocalXZToGlobalXYZ(redesignedSurfaceLineStabilityGlobal.Geometry);
-
- return redesignedSurfaceLineStabilityGlobal;
+ return localRedesignedSurfaceLineGlobal;
}
[Browsable(false)]
- public SurfaceLine2 RedesignedSurfaceLine2Stability
+ public SurfaceLine2 RedesignedSurfaceLine2
{
- get { return redesignedSurfaceLineStability; }
- set { redesignedSurfaceLineStability = value; }
- }
-
- ///
- /// Creates a new instance based on
- /// with global coordinates instead of local coordinates.
- ///
- [Browsable(false)]
- public SurfaceLine2 CreateRedesignedSurfaceLinePipingGlobal()
- {
- if (this.RedesignedSurfaceLine2Piping == null)
- return null;
-
- SurfaceLine2 originalSurfaceLine = this.Scenario.Location.SurfaceLine2;
- var coordinateSystemConverter = new CoordinateSystemConverter();
- coordinateSystemConverter.DefineGlobalXYZBasedOnLine(originalSurfaceLine.Geometry);
-
- var redesignedSurfaceLinePipingGlobal = new SurfaceLine2
+ get { return redesignedSurfaceLine; }
+ set
{
- CharacteristicPoints = { GeometryMustContainPoint = true },
- Geometry = new LocalizedGeometryPointString()
- };
- redesignedSurfaceLinePipingGlobal.Assign(this.RedesignedSurfaceLine2Piping);
- coordinateSystemConverter.ConvertLocalXZToGlobalXYZ(redesignedSurfaceLinePipingGlobal.Geometry);
-
- return redesignedSurfaceLinePipingGlobal;
+ redesignedSurfaceLine = value;
+ // Also determine and set the correct global version in order to retrieve dependend properties
+ redesignedSurfaceLineGlobal = CreateRedesignedSurfaceLineGlobal();
+ }
}
- [Browsable(false)]
- public SurfaceLine2 RedesignedSurfaceLine2Piping
- {
- get { return redesignedSurfaceLinePiping; }
- set { redesignedSurfaceLinePiping = value; }
- }
-
[Label("Profile")]
[PropertyOrder(2, 1)]
[XmlIgnore]
@@ -1826,22 +1561,35 @@
{
get
{
- var res = "";
- switch (damFailureMechanismeCalculationSpecification.FailureMechanismSystemType)
+ if (scenario != null)
{
- case FailureMechanismSystemType.HorizontalBalance:
- case FailureMechanismSystemType.StabilityOutside:
- case FailureMechanismSystemType.StabilityInside:
- res = StabilityProfileName;
- break;
- case FailureMechanismSystemType.Piping:
- res = PipingProfileName;
- break;
+ profileName = GetSoilProfileName();
}
- return res;
+ return profileName;
}
+ set
+ {
+ profileName = value;
+ }
}
+ private string GetSoilProfileName()
+ {
+ string soilprofilename = "";
+ if (soilProfile != null)
+ {
+ soilprofilename = soilProfile.Name;
+ }
+ else
+ {
+ if (!String.IsNullOrEmpty(soilGeometry2DName))
+ {
+ soilprofilename = soilGeometry2DName;
+ }
+ }
+ return soilprofilename;
+ }
+
[Label("Profile probability")]
[Format("F3")]
[PropertyOrder(2, 2)]
@@ -1908,10 +1656,7 @@
break;
case FailureMechanismSystemType.Piping:
res = PipingFactor;
- break;
- case FailureMechanismSystemType.FlowSlide:
- res = FlowSlideSafetyFactor;
- break;
+ break;
}
return res;
}
@@ -2127,18 +1872,13 @@
get
{
GeometryPoint point = null;
- if (this.RedesignedSurfaceLine2Piping != null)
+ if (redesignedSurfaceLine != null)
{
- point = this.RedesignedSurfaceLine2Piping.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtRiver);
+ point = redesignedSurfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtRiver);
}
- else
- {
- point = this.scenario.Location.LocalXZSurfaceLine2.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtRiver);
- }
if (point != null)
return point.X;
- else
- return null;
+ return null;
}
}
@@ -2152,11 +1892,11 @@
{
get
{
- if (this.LocalPipingEntryPointX == null)
+ if (LocalPipingEntryPointX == null || redesignedSurfaceLineGlobal == null)
return null;
GeometryPoint point = DetermineGlobalPointCoordinatesBasedOnGlobalSurfaceLine(
- new GeometryPoint(this.LocalPipingEntryPointX.Value, 0.0, 0.0), this.Scenario.Location.SurfaceLine2);
+ new GeometryPoint(LocalPipingEntryPointX.Value, 0.0, 0.0), redesignedSurfaceLineGlobal);
return point.X;
}
@@ -2172,11 +1912,11 @@
{
get
{
- if (this.LocalPipingEntryPointX == null)
+ if (LocalPipingEntryPointX == null || redesignedSurfaceLineGlobal == null)
return null;
GeometryPoint point = DetermineGlobalPointCoordinatesBasedOnGlobalSurfaceLine(
- new GeometryPoint(this.LocalPipingEntryPointX.Value, 0.0, 0.0), this.Scenario.Location.SurfaceLine2);
+ new GeometryPoint(LocalPipingEntryPointX.Value, 0.0, 0.0), redesignedSurfaceLineGlobal);
return point.Y;
}
@@ -2203,11 +1943,11 @@
{
get
{
- if (this.LocalPipingExitPointX == null)
+ if (localPipingExitPointX == null || redesignedSurfaceLineGlobal == null)
return null;
GeometryPoint point = DetermineGlobalPointCoordinatesBasedOnGlobalSurfaceLine(
- new GeometryPoint(this.LocalPipingExitPointX.Value, 0.0, 0.0), this.Scenario.Location.SurfaceLine2);
+ new GeometryPoint(localPipingExitPointX.Value, 0.0, 0.0), redesignedSurfaceLineGlobal);
return point.X;
}
@@ -2223,11 +1963,11 @@
{
get
{
- if (this.LocalPipingExitPointX == null)
+ if (localPipingExitPointX == null || redesignedSurfaceLineGlobal == null)
return null;
GeometryPoint point = DetermineGlobalPointCoordinatesBasedOnGlobalSurfaceLine(
- new GeometryPoint(this.LocalPipingExitPointX.Value, 0.0, 0.0), this.Scenario.Location.SurfaceLine2);
+ new GeometryPoint(localPipingExitPointX.Value, 0.0, 0.0), redesignedSurfaceLineGlobal);
return point.Y;
}
@@ -2239,7 +1979,7 @@
[ReadOnly(true)]
public double? SeepageLength
{
- get { return LocalPipingExitPointX - LocalPipingEntryPointX; }
+ get { return localPipingExitPointX - LocalPipingEntryPointX; }
}
[Label("H critical")]
@@ -2320,91 +2060,30 @@
}
///
- /// Returns the begin point and and point as a list
- ///
- [XmlIgnore]
- public List Points
- {
- get
- {
- if (dirty)
- {
- dirty = false;
- points.Clear();
- if (this.locationXrdStart.HasValue && this.locationYrdStart.HasValue)
- {
- points.Add(new GeographicPoint(this.locationXrdStart.Value, this.locationYrdStart.Value));
- }
- if (this.locationXrdEnd.HasValue && this.locationYrdEnd.HasValue)
- {
- points.Add(new GeographicPoint(this.locationXrdEnd.Value, this.locationYrdEnd.Value));
- }
- }
-
- return points;
- }
- }
-
- ///
- /// Copy data
- ///
- ///
- public void Assign(CsvExportData csvExportData)
- {
- this.id = csvExportData.id;
- this.BaseFileName = csvExportData.BaseFileName;
- this.CalculationSubDir = csvExportData.CalculationSubDir;
- this.NumberOfIterations = csvExportData.NumberOfIterations;
- this.dike = csvExportData.dike;
- this.damFailureMechanismeCalculationSpecification = csvExportData.damFailureMechanismeCalculationSpecification;
- this.Scenario = csvExportData.Scenario;
- this.SoilProfile = csvExportData.SoilProfile;
- this.SoilGeometry2DName = csvExportData.SoilGeometry2DName;
- this.probabilisticType = csvExportData.ProbabilisticType;
-
- this.failureProbabilityPiping = csvExportData.failureProbabilityPiping;
- this.redesignedSurfaceLinePiping = csvExportData.redesignedSurfaceLinePiping;
- this.safetyFactorStability = csvExportData.safetyFactorStability;
- this.failureProbabilityStability = csvExportData.failureProbabilityStability;
- this.zone1SafetyFactorStability = csvExportData.zone1SafetyFactorStability;
- this.LocalZone1EntryPointX = csvExportData.LocalZone1EntryPointX;
- this.LocalZone1ExitPointX = csvExportData.LocalZone1ExitPointX;
- this.zone2SafetyFactorStability = csvExportData.zone2SafetyFactorStability;
- this.LocalZone2EntryPointX = csvExportData.LocalZone2EntryPointX;
- this.LocalZone2ExitPointX = csvExportData.LocalZone2ExitPointX;
- this.blighPipingFactor = csvExportData.blighPipingFactor;
- this.blighHCritical = csvExportData.blighHCritical;
- this.sellmeijer2ForcesPipingFactor = csvExportData.sellmeijer2ForcesPipingFactor;
- this.sellmeijer2ForcesHCritical = csvExportData.sellmeijer2ForcesHCritical;
- this.sellmeijer4ForcesPipingFactor = csvExportData.sellmeijer4ForcesPipingFactor;
- this.sellmeijer4ForcesHCritical = csvExportData.sellmeijer4ForcesHCritical;
- this.sellmeijerPipingFactor = csvExportData.sellmeijerPipingFactor;
- this.sellmeijerHCritical = csvExportData.sellmeijerHCritical;
- this.wti2017PipingFactor = csvExportData.wti2017PipingFactor;
- this.wti2017HCritical = csvExportData.wti2017HCritical;
- this.redesignedSurfaceLineStability = csvExportData.redesignedSurfaceLineStability;
- this.calculationResult = csvExportData.calculationResult;
- }
-
- ///
/// Copies the result file.
///
/// The extension.
private void CopyResultFile(string extension)
{
string copyResFile = Path.GetDirectoryName(InputFile) + Path.DirectorySeparatorChar + Path.GetFileNameWithoutExtension(InputFile) + " (copy)" + extension;
var resFile = Path.ChangeExtension(InputFile, extension);
- File.Copy(resFile, copyResFile, true);
+ if (resFile != null)
+ {
+ File.Copy(resFile, copyResFile, true);
+ }
}
private string GetCurrentExeForOpenCalculationFile()
{
- var exeName = StabilityCalculator.MStabExePath;
- if (SelectedStabilityKernelType != StabilityKernelType.DamClassic)
- {
- exeName = Path.GetDirectoryName(exeName) + "\\MStab.exe";
- }
- return exeName;
+ //var exeName = StabilityCalculator.MStabExePath;
+ //if (SelectedStabilityKernelType != StabilityKernelType.DamClassic)
+ //{
+ // exeName = Path.GetDirectoryName(exeName) + "\\MStab.exe";
+ //}
+ //return exeName;
+
+ //throw new NotImplementedException("To be implemented");
+ return "";
}
///
@@ -2426,9 +2105,14 @@
const string stoExtension = ".sto";
CopyResultFile(stoExtension);
}
- Process process = new Process();
- process.StartInfo.RedirectStandardOutput = false;
- process.StartInfo.FileName = exeName;
+ var process = new Process
+ {
+ StartInfo =
+ {
+ RedirectStandardOutput = false,
+ FileName = exeName
+ }
+ };
if (SelectedStabilityKernelType == StabilityKernelType.DamClassicWti ||
SelectedStabilityKernelType == StabilityKernelType.AdvancedWti)
{
@@ -2450,32 +2134,20 @@
Path.GetExtension(PipingResultFile);
File.Copy(PipingResultFile, copyFile, true);
- System.Diagnostics.Process.Start(copyFile);
+ Process.Start(copyFile);
}
}
}
- ///
- /// Make a clone of object
- ///
- ///
- public object Clone()
- {
- CsvExportData csvExportData = new CsvExportData(this.id, this.dike, this.damFailureMechanismeCalculationSpecification, this.Scenario,
- this.SoilProfile, this.SoilGeometry2DName, this.analysisType, this.nwoResultIndex, this.probabilisticType);
-
- csvExportData.Assign(this);
-
- return csvExportData;
- }
-
public bool IsEnabled(string property)
{
return true;
}
public bool IsVisible(string property)
{
+ if (damFailureMechanismeCalculationSpecification == null)
+ return false;
switch (property)
{
// #Bka note that using FailureMechanismSystemType here is only possible as long as multiple specifications are NOT allowed. Otherwise visibility would
@@ -2523,29 +2195,6 @@
return true;
}
- }
-
- #region Backwards compatibility
-
- [Obsolete("Do not use this method; Only exists for backwards compatibility purposes.", true)]
- [XmlIgnore]
- [Browsable(false)]
- public SurfaceLine RedesignedSurfaceLineStability
- {
- get { return null; }
- set { redesignedSurfaceLineStability = new OldSurfaceLineToNewConverter().Convert(value);}
- }
-
- [Obsolete("Do not use this method; Only exists for backwards compatibility purposes.", true)]
- [XmlIgnore]
- [Browsable(false)]
- public SurfaceLine RedesignedSurfaceLinePiping
- {
- get { return null; }
- set { redesignedSurfaceLinePiping = new OldSurfaceLineToNewConverter().Convert(value); }
- }
-
- #endregion
-
+ }
}
}
\ No newline at end of file
Index: DamClients/DamUI/trunk/src/Dam/Tests/FailureMechanismTests.cs
===================================================================
diff -u -r1016 -r1025
--- DamClients/DamUI/trunk/src/Dam/Tests/FailureMechanismTests.cs (.../FailureMechanismTests.cs) (revision 1016)
+++ DamClients/DamUI/trunk/src/Dam/Tests/FailureMechanismTests.cs (.../FailureMechanismTests.cs) (revision 1025)
@@ -75,6 +75,7 @@
[Test, Category("Work_In_Progress")]
public void TestStabilityClassicOutsideWith2DstiFiles()
{
+ const double diff = 0.001;
string projectFilename = @"..\..\..\data\DamEngineTestProjects\DAM Tutorial Design\DAM Tutorial Design.damx";
var allCalculationresults = ComputeStabilityOutsideProjectUsingClassic(projectFilename, 23);
@@ -94,7 +95,7 @@
Assert.AreEqual(ProbabilisticType.Deterministic, allCalculationresults[0].ProbabilisticType);
// * Uplift = true ??? MUST BE FALSE?! is not relevant for outside
//Assert.AreEqual(true, allCalculationresults[0].IsUplift); <++++++++++
- Assert.AreEqual(null, allCalculationresults[0].IsUplift);
+ Assert.AreEqual(false, allCalculationresults[0].IsUplift);
// * Profile = "" (empty) but must be name of profile (1D: profile name, 2D-sti: name of stifile used as base, in future with real 2D: profile name)
// Assert.AreEqual(null, allCalculationresults[0].ProfileName); <++++++++++++++++
Assert.AreEqual("DWP_1.sti", allCalculationresults[0].ProfileName);
@@ -134,13 +135,14 @@
// * Dike length = 36.150
Assert.AreEqual(36.150, allCalculationresults[0].DikeLength);
// * PL3 Min uplift = 1.141
- Assert.AreEqual(1.141, allCalculationresults[0].Pl3MinUplift);
+ // Assert.AreEqual(1.141, allCalculationresults[0].Pl3MinUplift); <+++++++++++++++ Dam classic geeft toch waarde terwijl niet aan voorwaarde wordt voldaan! getallen zijn gelijk (upliftFactor < pl3MinUplift) in UpdateOutputValuesForPl3_4
+ Assert.AreEqual(0.000, allCalculationresults[0].Pl3MinUplift);
// * PL3 Head adjusted = 4.400
- Assert.AreEqual(4.400, allCalculationresults[0].Pl3HeadAdjusted);
+ Assert.AreEqual(0.000, allCalculationresults[0].Pl3HeadAdjusted);
// * PL3 Min uplift (X local) = 60.640
- Assert.AreEqual(60.640, allCalculationresults[0].Pl3LocalLocationXMinUplift);
+ Assert.AreEqual(0.000, allCalculationresults[0].Pl3LocalLocationXMinUplift);
// * PL3 Min uplift (X global) = 69.060
- Assert.AreEqual(69.060, allCalculationresults[0].Pl3LocationXMinUplift);
+ Assert.AreEqual(8.42, allCalculationresults[0].Pl3LocationXMinUplift);
// * PL3 Min uplift (Y global) = 0.000
Assert.AreEqual(0.000, allCalculationresults[0].Pl3LocationYMinUplift);
// * PL4 Min uplift = 0.000
@@ -154,10 +156,9 @@
// * PL4 Min uplift (Y global) = 0.000
Assert.AreEqual(0.000, allCalculationresults[0].Pl4LocationYMinUplift);
// * Piping entrypoint (X local) = 16.190 THIS SHOULD BE NULL!
- Assert.AreEqual(16.190, allCalculationresults[0].LocalPipingEntryPointX);
-// * Piping entry point (X global) = 24.610 THIS SHOULD BE NULL!
- // Assert.AreEqual(24.610, allCalculationresults[0].PipingEntryPointX); <+++++++
- Assert.AreEqual(33.030, allCalculationresults[0].PipingEntryPointX);
+ Assert.AreEqual(16.190, allCalculationresults[0].LocalPipingEntryPointX, diff);
+// * Piping entry point (X global) = 24.610 THIS SHOULD BE NULL!
+ Assert.AreEqual(24.610, allCalculationresults[0].PipingEntryPointX, diff);
// * Piping entry point (Y global) = 0.00 THIS SHOULD BE NULL!
Assert.AreEqual(0.000, allCalculationresults[0].PipingEntryPointY);
// * 7 empty fields (3 * piping exit pount, seepage length piping, message, Heave factor, Notes)
@@ -179,7 +180,7 @@
[Test, Category("Work_In_Progress")]
public void TestStabilityClassicOutsideWith1DProfiles()
{
- var diff = 0.001;
+ const double diff = 0.001;
string projectFilename = @"..\..\..\data\DamEngineTestProjects\Actualisatie\Actualisatie.damx";
var allCalculationresults = ComputeStabilityOutsideProjectUsingClassic(projectFilename, 56);
@@ -237,19 +238,19 @@
// * Dike length = 14.12
Assert.AreEqual(14.12, allCalculationresults[1].DikeLength, diff * 10);
// * PL3 Min uplift = 1.851
- //Assert.AreEqual(1.851, allCalculationresults[1].Pl3MinUplift, diff); <++++++++++++++
+ //Assert.AreEqual(1.851, allCalculationresults[1].Pl3MinUplift, diff); <++++++++++++++ Uplift is false so this should be 0
Assert.AreEqual(0.000, allCalculationresults[1].Pl3MinUplift, diff);
// * PL3 Head adjusted = -5.370
- // Assert.AreEqual(-5.370, allCalculationresults[1].Pl3HeadAdjusted, diff); <++++++++++++++
+ // Assert.AreEqual(-5.370, allCalculationresults[1].Pl3HeadAdjusted, diff); <++++++++++++++ Uplift is false so this should be 0
Assert.AreEqual(0.000, allCalculationresults[1].Pl3HeadAdjusted, diff);
// * PL3 Min uplift (X local) = 31.329
- //Assert.AreEqual(31.329, allCalculationresults[1].Pl3LocalLocationXMinUplift, diff); <++++++++++++
+ //Assert.AreEqual(31.329, allCalculationresults[1].Pl3LocalLocationXMinUplift, diff); <++++++++++++ Uplift is false so this should be 0
Assert.AreEqual(0.000, allCalculationresults[1].Pl3LocalLocationXMinUplift, diff);
// * PL3 Min uplift (X global) = 88233.750
- //Assert.AreEqual(88233.750, allCalculationresults[1].Pl3LocationXMinUplift, diff); <++++++++++++++++
+ //Assert.AreEqual(88233.750, allCalculationresults[1].Pl3LocationXMinUplift, diff); <++++++++++++++++ Uplift is false so this should be 0
Assert.AreEqual(88209.150, allCalculationresults[1].Pl3LocationXMinUplift, diff);
// * PL3 Min uplift (Y global) = 448883.620
- //Assert.AreEqual(448883.620, allCalculationresults[1].Pl3LocationYMinUplift, diff); <+++++++++++++++++++
+ //Assert.AreEqual(448883.620, allCalculationresults[1].Pl3LocationYMinUplift, diff); <+++++++++++++++++++ Uplift is false so this should be 0
Assert.AreEqual(448864.220, allCalculationresults[1].Pl3LocationYMinUplift, diff);
// * PL4 Min uplift = 0.000
Assert.AreEqual(0.000, allCalculationresults[1].Pl4MinUplift);