PDA

View Full Version : ICM, SQL "Duration()" or Pump Runtimes



DCJ
July 24, 2015, 07:39 AM
Is there a way to find the pump runtime during a simulation?

I know that WS has a "duration()" SQL aggregate function that can be used to find the "duration the flow was greater than 0"... Is there an equivalent SQL function in ICM?

Duncan Kitts
July 24, 2015, 08:40 AM
Yes, if you are using version 6 or later then this functionality is available.

You can return the number of minutes that the pump flow is greater than 0 using the following query:-

Select Duration (tsr.ds_flow>0)

Note, that this will be the total duration and may not be contiguous. It is possible to limit the time periods within which the query is run.

DCJ
July 24, 2015, 09:18 AM
We're using 5.0.2.10020 (32 bit) July 2014. I guess their isn't a way to do it pre-version 6.

Duncan Kitts
July 27, 2015, 01:59 AM
The specific SQL functionality is not available in earlier versions. Depending on your model, it might be possible to determine the duration using statistics reports based on downstream flow or similar.