Initialising Pumps in InfoWorks WS UPC Scripts

Have you ever noticed that the INITIALISE command doesn’t always set the initial status of a  pump ?  Well there is a reason….

If you have a UPC script like the following

INITIALISE PUMP = OFF
RULE RULE1
IF NODE X PRESSURE < 72.0 THEN
PUMP = ON
ELSEIF NODE X PRESSURE > 75.5 THEN
PUMP = OFF
ENDIF

Check the log file for messages like this
00:00 PST Y set by Rule: RULE1; Action: Pump 1 ON Activated. (Local script line 4.)

What is happening is that as there is no initial pressure set on Node X (i.e it is not a Reservoir, Well or Fixed Head) the starting pressure is 0 – hence the pump is turned ON.

If this is not the behavior you wish to model then try explicitly defining what is to happen at the first timestep as this will overcome the initialization statement being overruled by subsequent conditions in the rules.

RULE RULE1
IF RUN SIMTIME = 00:00 THEN
PUMP = OFF
ELSEIF NODE X PRESSURE < 72.0 THEN
PUMP = ON
ELSEIF NODE X PRESSURE > 75.5 THEN
PUMP = OFF
ENDIF

Share this post!

    About Ann Pugh

    Ann has worked in system planning, operations, strategic analysis and marketing roles for water companies and consulting firms. She has worked for Innovyze (and earlier incarnations) since 2000.
    This entry was posted in InfoWorks WS. Bookmark the permalink.