Route
Entity-Related Operation Statement
The Route statement immediately executes a processing Entity's routing block before finishing any remaining processing logic. The process does not continue until all Entities being routed for the particular block have begun executing their move logic and pass control back to the process. The processing logic may contain several Route statements. These statements may be selected individually using If Then statements, or they may be processed sequentially, with or without other process statements in between. If any Route statement appears in a process logic, ProModel assumes the user activated all routing for that process and does no automatic routing. If no Route statement appears in the processing logic, then all routing blocks are executed automatically once processing logic has completed.
The Route statement is most often the last statement in the process logic and is used with If Then statements to make routing decisions based on complex logic that is not available through other ProModel features (such as system functions or the User Condition routing rule). Route, if used with If Then properly, ensures that only one routing block is activated.
This statement can be used to route one or more Entities and leave behind a "ghost" Entity that processes the remaining logic after the route statement. The "ghost" Entity is also referred to as the parent Entity. The child Entity takes the route specified by the Route statement. If the child Entity cannot go to the next Location and is blocked, the parent Entity is also blocked and does not continue logic execution until the child Entity is no longer blocked.
Syntax
Route <expression>
Examples
Route 2
Route Attr1
Route Dist1()
Parameters
<expression>
A numerical expression, resulting in an integer, which determines the routing block that the Entity takes. The expression is evaluated every time it is encountered, allowing the chosen block to vary during the simulation.