About UPC scripts
UPC scripts are used to define logical controls for pump station and valve objects. The use of scripting to define controls is a more flexible alternative to using UPC scenarios.
UPC scripts are stored in the Control Data object. There are two types of script:
- Local scripts - Local scripts are associated with a particular network object and can be viewed and edited from the UPC Script page of the object property sheet. Definitions in the local script are used only by the network object (local regulator) that the script is associated with.
- Global scripts - Global scripts can be used to set up definitions and rules to be used by more than one network object. All scripts for the network can be stored in a global script.
If a network object has a local UPC script defined, the Has local UPC box (displayed in the object grid view), will be checked.
By default, a UPC script will override any other control data defined for an object. To disable UPC scripts for a network object, check the Disable UPC box, displayed in the grid view and also on the UPC Script page of the object property sheet. Checking the Disable UPC box will disable both local and global scripts for the object; other defined controls will be applied to the object.
To disable global UPC scripts, check the Disable UPC box displayed on the Global UPC Script view. Checking this option will disable global scripts for the network. Enabled local scripts for network objects will be applied where available, otherwise other defined controls will be applied.
UPC scripts cannot be used in conjunction with a UPC scenario when running a simulation. UPC scenarios can be imported into control data; definitions and rules in the UPC scenario will be converted into scripts on import.