ASPL User Manual v 1.00
© 2025 SetSphere.com
Monitoring the water level rising between two bays is shown in this similation using the shell script bay12.sh. You can also see ASPL script bay12mon.pl see SECTION 12.24.1 [Monitoring Water Level Between Two Bays: bay12mon.pl]
Line 3 the TRANSIENT workspace (whose grouping class BAYLEVELGROUP) is created. The temporary TRANSIENT workspace is used for the life time of this simulation. Line 4 the set variable is initialize with the first data of the GG-function ggbaylevel(). Line 5 start the interrogative loop for the set variable waterleveltoday: looping 20 times with a delay of 1 second. Line 6 split the set variable waterleveltoday into five groups: BAY1 BAY2 CRITICAL GOOD WARN. Line 7 set the ks-vector to mean123 mtime aelm. Line 8 calls the ASPL setadic expression to display when the water level riched a critical point (above 7 feets).
The grouping class BAYLEVELGROUP has the definition of the meta data for several points tied to sensors, and in addition to the attribute mean123 that is tied to a lambda procedure that calculates the mean of the aggregated water level. Refer to the sample workspace BAYS12MON see SECTION 11.16.1 [WATER LEVEL BETWEEN BAY1 AND BAY2] for more information about the attributes definition.1. # . ./bay12.sh 2. asplcmd " \ 3. createworkspace TRANSIENT BAYLEVELGROUP; \ 4. waterleveltoday = ggbaylevel(); \ 5. ?20,1 waterleveltoday; \ 6. split waterleveltoday into BAY1 BAY2 CRITICAL GOOD WARN; \ 7. ks mean123 mtime aelm ; \ 8. {fU {f&\`ks= CRITICAL BAY1}{f&\`ks= CRITICAL BAY2}} \ 9. "
The following figure shows when the water level is critical. Notice that at times 2025-03-28 01:20:48, 01:20:54, and 01:21:05, the water level riched the critical level between BAY1 and BAY2. Before and after these times, the water level was fluctuating, some time it is being critical at BAY1 and some other time at BAY2.
The runtime of the command is shown in the following terminal.