Declare equations which should only be evaluated when specific events occur
discrete <section name>
<discrete section statements>
Discrete section equations/statements are only evaluated when specific (user-defined) event occur in the simulation. Such events include: 1) events which occur when the simulation reaches a specific time, or 2) events which occur because a quantity in the model crosses zero. Discrete sections are triggered by one of three mechanisms:
- A SCHEDULE AT statement, indicating that the section with the specified name should be evaluated at a particular time.
- A SCHEDULE XZ/XP/XN statement, indicating that the section with the specified name should be evaluated when the corresponding expressions crosses zero.
- An INTEVAL statement, indicating that the encompassing DISCRETE section should be evaluated at the specified interval in simulated time.
! Bump the value of state variable ‘x’ by 10%
x = 1.1*x