End Events
Icon
Function
An end event destroys the Trigger to terminate the current process execution. It signifies the end of a process.
Key Points
Graphical Modeling Syntax
- The End Event should be placed within the process.
- Every process should have at least one End Event, but can also have multiple End Events.
Working Mechanism
- Triggers will be destroyed when they reach any End Event in a process.
- Once all Triggers are destroyed, the model run will end prematurely, regardless of whether the maximum Tick has been reached.
- End events have no data output.
Types of End Events
Normal End Events
A Normal End Event signifies the end of the current run of a process which is triggered by the arrival of the Trigger at the End Event.
Terminate Events
A Terminate Events, once triggered, will halt the entire simulation run.
Terminate Events are typically used when there's no need to continue simulating once a specific extreme condition is met.
- For instance, in designing a token economy system for a Web3 protocol, the simulation immediately terminates when the protocol's market value falls to zero.
- In a grassland ecosystem simulation, the simulation ends immediately when the entire sheep population goes extinct.
Setup Methods
First, choose the event type, Normal End Event or Terminate Event. Details for each type are provided below.
Normal End Events
If you choose the Normal End Event, no settings are required.
Terminate Events
- Tips Setting
-
Once checked, you can customize the message you would like the system to display when the Terminate Event is triggered. Simply enter your message text in the input box.
-
When Terminate is triggered, this message will appear in the system's temporary popup and the output information in the Console.
Example
The model is set to run for a maximum of 100 Ticks. Starting from the first Tick, the Count variable (initially set to 0) increases by 1 each Tick. When the Count exceeds 10, a Terminate Event is triggered, and the message "Exceed Limit!" is printed. As a result, the model runs for a total of 11 Ticks.