Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesOperational/OperationalCalculator.cs =================================================================== diff -u -r4053 -r4132 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesOperational/OperationalCalculator.cs (.../OperationalCalculator.cs) (revision 4053) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/DikesOperational/OperationalCalculator.cs (.../OperationalCalculator.cs) (revision 4132) @@ -188,7 +188,7 @@ /// /// The date time. /// - public static string DateToTimeStamp(DateTime dateTime) + public string DateToTimeStamp(DateTime dateTime) { // Following 2 lines is an example how to handle customization of this format. // TNO at the last moment decided they did not need this change so we change it back to @@ -291,6 +291,7 @@ out CalculationResult calculationResult, List calculationMessages) { + // Perform validation var designResults = new List(); var locationCalculationMessages = new List(); @@ -327,7 +328,10 @@ calculationResult = CalculationResult.Succeeded; kernelWrapper.PostProcess(damKernelInput, kernelDataOutput, null, resultMessage, out designResults); - timeSerieEntry.Value = designResults[0].SafetyFactor.Value; + if (designResults.Count > 0) + { + timeSerieEntry.Value = designResults[0].SafetyFactor.Value; + } } catch (Exception exception) { @@ -485,7 +489,7 @@ /// /// The sensor. /// if set to true [has series by sensor ID]. - private static void ThrowIfSensorNotExists(Sensor sensor, bool hasSeriesBySensorID) + private void ThrowIfSensorNotExists(Sensor sensor, bool hasSeriesBySensorID) { if (!hasSeriesBySensorID) { @@ -503,7 +507,7 @@ /// The first series entries. /// The time series. /// if set to true [has first series entries]. - private static void ThrowIfTimeEntryCountDontMatch(HashSet firstSeriesEntries, TimeSerie timeSeries, + private void ThrowIfTimeEntryCountDontMatch(HashSet firstSeriesEntries, TimeSerie timeSeries, bool hasFirstSeriesEntries) { if (hasFirstSeriesEntries) @@ -534,7 +538,7 @@ } } - private static void ThrowIfTimeEntriesKeysDontMatch(DateTime key, HashSet firstSeriesEntries) + private void ThrowIfTimeEntriesKeysDontMatch(DateTime key, HashSet firstSeriesEntries) { // TODO log info if (!firstSeriesEntries.Contains(key))