Marks the entry to the section (area) of the process where you wish to limit the maximum number of agents. Such area can only have one entry and arbitrary number of exits, each of those must be marked with block referring to this RestrictedAreaStart, see the picture below. Once the number of times RestrictedAreaStart has been entered minus the number of times RestrictedAreaEnd has been exited reaches the limit, the RestrictedAreaStart block blocks the entry and would not allow a new agent in until one of the agents exits the area.
The RestrictedAreaStart block is implemented using Hold block, so the agent is just passed to the next block and does not spend any time in RestrictedAreaStart.
- Capacity (max allowed)
The maximum number of agents allowed in the restricted area.
Syntax: int capacity
Default value: 10
- On enter
Code executed when the agent enters the block.
Local variable: agent — the agent.
|int entitiesInside()||Returns the number of agents currently in the restricted area.|
|boolean isBlocked()||Returns true if the entry to the area is blocked, otherwise false.|
- Hold block
- The embedded block that used to block the entry to the restricted area depending on the number of agents there.
- The input port.
- The output port.
How can we improve this article?