modelManyEvents
Model with many events in when clauses
Information
The model contains N integrators x[i] with different integration rates. When each state values crosses the value of one, a when clause is triggered, switching the corresponding boolean e[i] from false to true.
The integration rates are such that if StopTime = 1, then M-1 equally spaced events are triggered during the simulation.
Summing up, the model contains N zero-crossing functions and generates M-1 state events if the simulation lasts 1 second.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | N | 5 | Number of states and event-generating functions |
| Integer | M | N | Number of events that are actually triggered |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Real[N] | x | ||
| Boolean[N] | e |