Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Translations.xml
===================================================================
diff -u -r2122 -r2153
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Translations.xml (.../Translations.xml) (revision 2122)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Translations.xml (.../Translations.xml) (revision 2153)
@@ -38,8 +38,8 @@
-
-
+
+
@@ -139,6 +139,7 @@
+
@@ -471,7 +472,6 @@
-
+
\ No newline at end of file
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Deltares.Dam.Data.csproj
===================================================================
diff -u -r2135 -r2153
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Deltares.Dam.Data.csproj (.../Deltares.Dam.Data.csproj) (revision 2135)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/Deltares.Dam.Data.csproj (.../Deltares.Dam.Data.csproj) (revision 2153)
@@ -257,7 +257,6 @@
-
Fisheye: Tag 2153 refers to a dead (removed) revision in file `DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamProjectSettings.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/LocationJob.cs
===================================================================
diff -u -r2135 -r2153
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/LocationJob.cs (.../LocationJob.cs) (revision 2135)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/LocationJob.cs (.../LocationJob.cs) (revision 2153)
@@ -317,9 +317,8 @@
}
[Data]
- [Label("Detriment factor")]
[Format("F3")]
- public double DetrimentFactor
+ public double RequiredFactorOfSafety
{
get
{
@@ -376,7 +375,7 @@
{
if (ProbabilisticType == ProbabilisticType.Deterministic)
{
- return JobResultInterpreter.GetJobResult(SafetyFactor, DetrimentFactor, true);
+ return JobResultInterpreter.GetJobResult(SafetyFactor, RequiredFactorOfSafety, true);
}
return JobResultInterpreter.GetJobResult(FailureProbability, RequiredProbability, false);
}
@@ -386,16 +385,24 @@
[Browsable(false)]
public double X
{
- get { return this.Location.XRd; }
- set { this.Location.XRd = value; }
+ get { return this.XRd; }
+ set
+ {
+ if (Location != null)
+ Location.XRd = value;
+ }
}
[XmlIgnore]
[Browsable(false)]
public double Y
{
- get { return this.Location.YRd; }
- set { this.Location.YRd = value; }
+ get { return this.YRd; }
+ set
+ {
+ if (Location != null)
+ Location.YRd = value;
+ }
}
[XmlIgnore]
@@ -457,7 +464,7 @@
{
case "SafetyFactor": return this.Result != JobResult.NoRun && this.Result != JobResult.Failed &&
ProbabilisticType == ProbabilisticType.Deterministic;
- case "DetrimentFactor": return this.Result != JobResult.NoRun && this.Result != JobResult.Failed &&
+ case "RequiredFactorOfSafety": return this.Result != JobResult.NoRun && this.Result != JobResult.Failed &&
ProbabilisticType == ProbabilisticType.Deterministic;
case "RequiredProbability": return this.Result != JobResult.NoRun && this.Result != JobResult.Failed &&
ProbabilisticType != ProbabilisticType.Deterministic;
Index: DamClients/DamUI/trunk/src/Dam/Tests/DataPluginImporterDataShapeFilesTests.cs
===================================================================
diff -u -r875 -r2153
--- DamClients/DamUI/trunk/src/Dam/Tests/DataPluginImporterDataShapeFilesTests.cs (.../branches/CalcualtionIncluded/src/Dam/Tests/DataPluginImporterDataShapeFilesTests.cs) (revision 875)
+++ DamClients/DamUI/trunk/src/Dam/Tests/DataPluginImporterDataShapeFilesTests.cs (.../trunk/src/Dam/Tests/DataPluginImporterDataShapeFilesTests.cs) (revision 2153)
@@ -1,12 +1,24 @@
-//-----------------------------------------------------------------------
-//
-// Copyright (c) 2011 Deltares. All rights reserved.
-//
-// Tom The
-// tom.the@deltares.nl
-// 05-04-2011
-// Test for importing MGeobase data in DataPlugin
-//-----------------------------------------------------------------------
+// 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 Deltares.Dam.Data;
using Deltares.Dam.Data.DataPlugins.Configuration;
using Deltares.Dam.Data.Importers;
@@ -107,19 +119,5 @@
Assert.AreEqual("-1", locationDetails.First(
x => x.ParameterName.Equals("PenetrationLength")).ParameterValue);
}
-
- [Test, Ignore("Waiting on proper test file")]
- public void CanRetrieveDetrimentFactorFromDataShapeFile()
- {
- string dikeRingId = dataPluginImporter.GetDikeRingIdList(DamType.Primary).FirstOrDefault();
- dataPluginImporter.ImportDataForDikeRings(new List { dikeRingId }, DamType.Primary, null);
-
- IEnumerable locationDetails = dataPluginImporter.GetLocationDetails(dikeRingId, Location275Id);
- Assert.AreEqual("1.05", locationDetails.First(
- x => x.ParameterName.Equals("DetrimentFactor")).ParameterValue);
- locationDetails = dataPluginImporter.GetLocationDetails(dikeRingId, Location475Id);
- Assert.AreEqual("1.07", locationDetails.First(
- x => x.ParameterName.Equals("DetrimentFactor")).ParameterValue);
- }
}
}
Index: DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs
===================================================================
diff -u -r2135 -r2153
--- DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs (.../DamPlugin.cs) (revision 2135)
+++ DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs (.../DamPlugin.cs) (revision 2153)
@@ -381,6 +381,13 @@
{
var projectData = source as DamProjectData;
if (projectData == null) return;
+ if (projectData.DamProjectType == DamProjectType.AssessOld)
+ {
+ MessageBox.Show(LocalizationManager.GetTranslatedText(projectData, "InvalidDamProjectType"),
+ LocalizationManager.GetTranslatedText(projectData, "DamProjectType"), MessageBoxButtons.OK);
+ projectData.ClearResults();
+ }
+
initial = false;
// var args = Environment.GetCommandLineArgs();
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamProject.cs
===================================================================
diff -u -r2135 -r2153
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamProject.cs (.../DamProject.cs) (revision 2135)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamProject.cs (.../DamProject.cs) (revision 2153)
@@ -49,15 +49,13 @@
{
private string projectFileName;
private DamProjectData damProjectData;
- private DamProjectSettings damProjectSettings;
public static ProjectPathLocation ProjectWorkingPathLocation = ProjectPathLocation.InApplicationMap;
public static string UserWorkingPath = DamProject.GetNewTempDirectory();
public static string ProjectMapWorkingPath = DamProject.GetNewTempDirectory();
public DamProject()
{
- this.damProjectData = new DamProjectData();
- this.damProjectSettings = new DamProjectSettings();
+ this.damProjectData = new DamProjectData();
}
public static string GetNewTempDirectory()
@@ -113,13 +111,6 @@
}
}
- //[XmlIgnore]
- public DamProjectSettings DamProjectSettings
- {
- get { return this.damProjectSettings; }
- set { this.damProjectSettings = value; }
- }
-
public object ImportWithDefinitionFile(string fileName, DamType damType, DamProjectType damProjectType, DamEngine.Data.Standard.Calculation.ProgressDelegate progress)
{
var dataSourceContainer = DataSourceContainer.Deserialize(fileName);
@@ -243,22 +234,22 @@
object project = xmlSerializer.XmlDeserialize(fileName, typeof(DamProjectData), new DefaultClassFactory());
this.damProjectData = (DamProjectData)project;
-
+ if (damProjectData.DamProjectType == DamProjectType.AssessOld)
+ {
+ ClearProject();
+ damProjectData.DamProjectType = DamProjectType.AssessOld;
+ }
// Project still needs a reference to soilmaterials database; to be resolved later
-
UpdateSoilDatabaseReferences(damProjectFolder);
-
UpdateSoilPropertiesToSoilDatabase();
});
// Add stability as standard mechanism when not yet available.
- if (damProjectData.DamProjectCalculationSpecification.DamCalculationSpecifications.Count == 0)
+ if ((damProjectData.DamProjectCalculationSpecification.DamCalculationSpecifications.Count == 0) && (damProjectData.DamProjectType != DamProjectType.AssessOld))
{
damProjectData.DamProjectCalculationSpecification.DamCalculationSpecifications.Add(new DamFailureMechanismeCalculationSpecification());
+ UpdateForOlderProjects();
}
-
- UpdateForOlderProjects();
-
return damProjectData;
}
@@ -693,9 +684,10 @@
{
// DeleteResultData();
damProjectData = null;
+ DamProject.CalculationMap = "";
+ DamProject.ProjectMap = "";
damProjectData = new DamProjectData();
- damProjectSettings = null;
- damProjectSettings = new DamProjectSettings();
+
LogManager.Clear();
}
Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DAMEnumerations.cs
===================================================================
diff -u -r2135 -r2153
--- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DAMEnumerations.cs (.../DAMEnumerations.cs) (revision 2135)
+++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DAMEnumerations.cs (.../DAMEnumerations.cs) (revision 2153)
@@ -45,6 +45,8 @@
public enum DamProjectType
{
Calamity,
+ [XmlOldName("Assessment")]
+ AssessOld,
Design,
DamLiveConfiguration
}
@@ -53,9 +55,22 @@
{
// The Classic models all use DGMStabDam.dll to generate a sti file from the input (so also pl-lines only)
// DAM classic uses the Delphi version of DGS (as exe) to solve the calculation
+ [XmlOldName("DamClassic")]
DamClassicStability,
+
+ // DAM classic .Net uses the .Net version of DGS which is based on the old Delphi code to solve the calculation
+ DamClassicDotNet,
+ // DAM classic WTI uses the .Net version of DGS which is based on the new C# code to solve the calculation
+ DamClassicWti,
+
+ // The advanced models use the geotechnics and DGS classes to generate the required data from input,
+ // using the waternet only. This requires the -rto option for starting
+ // Advanced .Net uses the .Net version of DGS which is based on the old Delphi code to solve the calculation
+ AdvancedDotNet,
+
// WtiMacroStabilityKernel uses the latest MacroStability kernel as used by the new C# version of DGeoStabilty.
+ [XmlOldName("AdvancedWti")]
WtiMacroStabilityKernel
};