Index: DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/Deltares.DamEngine.IntegrationTests.csproj =================================================================== diff -u -r6588 -r6752 --- DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/Deltares.DamEngine.IntegrationTests.csproj (.../Deltares.DamEngine.IntegrationTests.csproj) (revision 6588) +++ DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/Deltares.DamEngine.IntegrationTests.csproj (.../Deltares.DamEngine.IntegrationTests.csproj) (revision 6752) @@ -137,9 +137,6 @@ PreserveNewest - - PreserveNewest - Always Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.Designer.cs =================================================================== diff -u -r6716 -r6752 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 6716) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 6752) @@ -303,12 +303,6 @@ } } - internal static string OperationalCalculatorWaterLevelAlreadyExistsInInputTimeSerie { - get { - return ResourceManager.GetString("OperationalCalculatorWaterLevelAlreadyExistsInInputTimeSerie", resourceCulture); - } - } - internal static string SoilProfileValidator_General { get { return ResourceManager.GetString("SoilProfileValidator_General", resourceCulture); Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.nl-NL.resx =================================================================== diff -u -r6716 -r6752 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.nl-NL.resx (.../Resources.nl-NL.resx) (revision 6716) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.nl-NL.resx (.../Resources.nl-NL.resx) (revision 6752) @@ -177,9 +177,6 @@ Locatie '{0}', ondergrond profiel '{1}', tijdstap '{2}', tijdstip '{3}': Validatie is gefaald. - - Waarde voor locatie {0} en tijdstap {1} bestaat al. Controleer de tijdreeksgegevens. - Het aanpassen van de helling van het dijkprofiel is mislukt. Waarschijnlijk is de nieuwe helling te steil of te flauw. Fisheye: Tag 6752 refers to a dead (removed) revision in file `DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/IntegrationTests/CalamityTests.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.resx =================================================================== diff -u -r6716 -r6752 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.resx (.../Resources.resx) (revision 6716) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/Properties/Resources.resx (.../Resources.resx) (revision 6752) @@ -241,9 +241,6 @@ Location '{0}', subsoil scenario '{1}', timestep '{2}', timestamp '{3}': The validation for this calculation failed. - - Value for location {0} and time step {1} already exists. Check the time series data. - No input object defined for Macro Stability Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesOperational/OperationalCalculator.cs =================================================================== diff -u -r6673 -r6752 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesOperational/OperationalCalculator.cs (.../OperationalCalculator.cs) (revision 6673) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesOperational/OperationalCalculator.cs (.../OperationalCalculator.cs) (revision 6752) @@ -62,13 +62,9 @@ private readonly IDictionary>> values = new Dictionary>>(); - private readonly IDictionary> waterLevelValues = - new Dictionary>(); - private TimeSerieCollection inputTimeSerieCollection; private TimeSerieCollection outputTimeSerieCollection; private string outputParameter; - private bool isCalamity; /// /// Executes operational calculation. @@ -85,36 +81,25 @@ damProjectData.CalculationMessages.Clear(); } - isCalamity = damProjectData.SensorData == null; outputParameter = DetermineOutputParameter(damProjectData.DamProjectCalculationSpecification.CurrentSpecification); // counter to determine if locations are processed var locationCount = 0; inputTimeSerieCollection = damProjectData.Dike.InputTimeSerieCollection; outputTimeSerieCollection = new TimeSerieCollection(); - IEnumerable locations = isCalamity ? damProjectData.Dike.Locations : damProjectData.Dike.Locations.GetBySpecification(new LocationsWithSensorData()); + IEnumerable locations = damProjectData.Dike.Locations.GetBySpecification(new LocationsWithSensorData()); foreach (Location location in locations) { - if (isCalamity) - { - PrepareWaterLevelDataLookup(location); - } - else - { - location.ModelParametersForPlLines.PlLineCreationMethod = PlLineCreationMethod.Sensors; - PrepareSensorDataLookup(location); - } + location.ModelParametersForPlLines.PlLineCreationMethod = PlLineCreationMethod.Sensors; + PrepareSensorDataLookup(location); InitializeOutputSeries(location); locationCount++; } - if (!isCalamity) - { - damProjectData.CalculationMessages.Add(new LogMessage(LogMessageType.Info, null, + damProjectData.CalculationMessages.Add(new LogMessage(LogMessageType.Info, null, $"There are {locationCount} locations with sensor data")); - } if (!locations.Any()) { @@ -137,12 +122,8 @@ designScenario = location.Scenarios[0]; } - var canProcessCalculation = true; - if (!isCalamity) - { - IDictionary sensorValues = values[entry.DateTime][location]; - canProcessCalculation = !ContainsMissingValues(sensorValues, series.MissVal); - } + IDictionary sensorValues = values[entry.DateTime][location]; + bool canProcessCalculation = !ContainsMissingValues(sensorValues, series.MissVal); if (canProcessCalculation) { @@ -251,8 +232,8 @@ damKernelInput.SubSoilScenario = soiProfileProbability.Copy(); damKernelInput.TimeStepDateTime = timeSerieEntry.DateTime.Copy(); damKernelInput.DamFailureMechanismeCalculationSpecification = damFailureMechanismCalculationSpecification; - damKernelInput.RiverLevelHigh = isCalamity ? waterLevelValues[timeSerieEntry.DateTime][location] : double.NaN; - damKernelInput.RiverLevelLow = isCalamity ? waterLevelValues[timeSerieEntry.DateTime][location] : null; + damKernelInput.RiverLevelHigh = double.NaN; + damKernelInput.RiverLevelLow = null; damKernelInput.FilenamePrefix = $"Dik(dike)_Loc({location.Name})_Stp({timeStepIndex})_Mdl({damFailureMechanismCalculationSpecification.StabilityModelType})_{DateToTimeStamp(timeSerieEntry.DateTime)}"; damKernelInput.CurrentEmbankmentSoil = location.GetDikeEmbankmentSoil(); SynchronizeLocationDataWithScenarioData(designScenario, location); @@ -498,44 +479,6 @@ } /// - /// Prepares the water level data. - /// - /// The location. - private void PrepareWaterLevelDataLookup(Location location) - { - // these variable are used to determine differences in time series entries - var firstSeriesEntries = new HashSet(); - var hasFirstSeriesEntries = false; - - IEnumerable series = inputTimeSerieCollection.GetSeriesByLocationId(location.Name); - - // Set sensor values - foreach (TimeSerie timeSeries in series) - { - ThrowIfTimeEntryCountDontMatch(firstSeriesEntries, timeSeries, hasFirstSeriesEntries); - - foreach (TimeSerieEntry entry in timeSeries.Entries) - { - DateTime key = entry.DateTime; - if (hasFirstSeriesEntries) - { - ThrowIfTimeEntriesKeysDontMatch(key, firstSeriesEntries); - } - - if (!hasFirstSeriesEntries) - { - firstSeriesEntries.Add(key); - } - - // everything ok set data into internal lookup - SetWaterLevelValue(key, entry.Value, location); - } - - hasFirstSeriesEntries = true; - } - } - - /// /// Sets the sensor value. /// /// The time step. @@ -565,29 +508,6 @@ } /// - /// Sets the water level value. - /// - /// The time step. - /// The value. - /// The location. - private void SetWaterLevelValue(DateTime timeStep, double value, Location location) - { - if (!waterLevelValues.ContainsKey(timeStep)) - { - waterLevelValues.Add(timeStep, new Dictionary()); - } - - if (!waterLevelValues[timeStep].ContainsKey(location)) - { - waterLevelValues[timeStep].Add(location, value); - } - else - { - throw new OperationalCalculatorException(string.Format(Resources.OperationalCalculatorWaterLevelAlreadyExistsInInputTimeSerie, location.Name, timeStep.ToString(CultureInfo.CurrentCulture))); - } - } - - /// /// Throws when the sensor not exists. /// /// The sensor. Fisheye: Tag 6752 refers to a dead (removed) revision in file `DamEngine/trunk/src/Deltares.DamEngine.IntegrationTests/TestFiles/Calamity/PulauTekongCalamity.xml'. Fisheye: No comparison available. Pass `N' to diff?