- class NotifiableQueueStage(backing)#
Models a queue where agents can wait until notified.
The queues waiting positions are predefined and agents will wait on the first empty position. When agents leave the queue the remaining waiting agents move up. If there are more agents trying to enqueue than there are waiting positions defined the overflow agents will wait at the last waiting position in the queue.
This type is used to interact with an already created stage. To create a stage of this type see
- pop(count) None #
Pop count number of agents from the front of the queue.
count – Number of agents to be popped from the front of the queue
- Return type:
- class WaitingSetState(*args, **kwds)#
Create a collection of name/value pairs.
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3
Access them by:
>>> Color.RED <Color.RED: 1>
>>> Color(1) <Color.RED: 1>
>>> Color['RED'] <Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3
>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
- class WaitingSetStage(backing)#
Models a set of waiting positions that can be activated or deactivated.
Similar as with a
NotifiableQueueStagethere needs to be a set of waiting positions defined which will be filled in order of definition. The
WaitingSetStagenow can be active or inactive. If active agents will fill waiting positions until all are occupied. Additional agents will all try to wait at the last defined waiting position. In inactive state the
WaitingSetStageacts as a simple waypoint at the position of the first defined waiting position.
- property state: WaitingSetState#
State of the set.
Can be active or inactive, see
- Return type:
- class WaypointStage(backing)#
Models a waypoint.
A waypoint is considered to be reached if an agent is within the specified distance to the waypoint.