User Tools

Site Tools


events

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
events [2020/10/12 14:26]
erik [Time events]
events [2021/11/12 14:12]
mina [Reacting to events]
Line 13: Line 13:
  
 ====Discrete events====  ====Discrete events==== 
-Discrete events are very flexible and allow an event to trigger based on a condition which compares two values in the model. They are defined using the [[discrete event|discrete event block]]. Example use cases could be:+Discrete events are very flexible and allow an event to trigger based on a condition which compares two values in the model. They are defined using the [[discrete event|discrete event block]]. 
  
-  - When ball reaches ground, set velocity to negative +Example use cases could be: 
-  When bucket is full, move excess to ground+ 
 +  * When ball reaches ground, set velocity to negative 
 +  When bucket is full, move excess to ground 
 + 
 +====Reacting to events==== 
 + 
 +  * The [[transfer]] block allows an event to specify when transfer should occur. This allows discrete/instantaneous transfer into, between or out of a compartment. 
 +  * The [[snapshot]] block requires an event to know when to take snapshots. 
 +  * The [[min_max|min max]] block allows an event to reset the current minimum/maximum, which is required for (instance)   yearly maximums. The block can also be switched on/off in order to only record under certain conditions - for instance, give me the maximum of A when B is below X.  
 +  * The [[running mean]] block can be reset for a specific event. It can also be turned on or off by an event. This way one can calculate the running mean of an output for a specific period - say 5th of March until 29th of August.  
  
 ====See also==== ====See also====
events.txt · Last modified: 2021/11/12 14:12 by mina