Stop
General Operation Statement
The Stop statement halts the current simulation replication and optionally display a message. The simulation moves on to the next replication of the simulation. If the Stop statement is executed on the final simulation replication, the simulation ends. The Stop statement can be used to end a replication once you have received enough statistical data for your purposes.
Syntax
Stop {<string expression>}
Syntax Examples
Stop
Stop "Normal termination"
Parameters
{<string expression>}
The message to display when the replication terminates. If the message field is blank, no message displays.
Parameter Example
Suppose you wanted to end each replication when 100 Entities have been completed. First, define a Variable with an initial value of 0 to represent the total Entities completed (vCompleted). Next, define the statements...
Inc vCompleted
If vCompleted = 100 Then Stop "100 Completed"
...in the model's final Location. Each time an Entity reaches the final Location, the value for vCompleted increases by one. Once the vCompleted value reaches 100, the replication stops, and the message "100 Completed" displays. The simulation then moves on to the next replication.
For more information on the statements used in this example, see If Then Statements and Inc.