Crash when using alerts that trigger between reporting timesteps

Product(s): WaterCAD, WaterGEMS, HAMMER
Area: Calculations


When attempting to compute a model that uses the Alerts feature, the follow error occurs:

System.IndexOutOfRangeException: Index was outside the bounds of the array.

at Haestad.Calculations.Pressure.Domain.WaterResultRecordDataBrokerBase.TimeStepInSecondsForIndex(Int32 scenarioID, Int32 elementID, Int32 timeStepIndex)
at Haestad.Calculations.Pressure.Domain.WaterLinkRecordDataBroker.GetValuesForElementIDs(HmIDCollection elementIDs, Int32 scenarioID, String fieldTypeName, Int32 timeStep)
at Haestad.Domain.ModelingObjects.ResultTimeVariantUnitizedFieldBase.GetValuesForElementIDsImpl(HmIDCollection ids, Int32 scenarioID, Int32 timeStep)
at Haestad.Calculations.Pressure.Alerts.AlertDefinition.CheckForAlerts(Int32 scenarioID, Int32 currentTimeStepIndex)
at Haestad.Calculations.Pressure.Alerts.AlertManager.CheckForHydraulicResultsAlerts(Int32 simulationStartTimeInSeconds, List`1 timeStepsInSecondstimeStepCount)
at Haestad.Calculations.Pressure.Domain.WaterNumericalEngine.RunBasicHydraulic(EngineAdapter engineAdapter, Boolean isWaterQuality)


This is a known issue with version (initial CONNECT Edition release). Reference Defect # 664757. This can occur when using the Alerts feature, when the alert occurs at a timestep that is not part of the Reporting Timesteps. For example of the reporting timesteps calculation option is set to report only at every 1.0 hours and the alert triggers at 9.5 hours (between the reporting times), this crash can occur. Note that even if your hydraulic timestep and reporting time step are set the same (such as 1.0 hours), intermediate timesteps can sometimes be inserted automatically as events are predicted to occur between hydraulic timesteps.

In your calculation options, check the "Reporting Time Step" field and try setting it to "<all>".

Note that this issue will be resolved in the upcoming CONNECT Edition Update 1 release (10.01.XX.XX), due on December 15th, 2017. See the following article for information on being alerted when the new release is available:

How to receive alerts on new version availability

See Also