jupedsim.stages
#
Module Contents#
- class NotifiableQueueStage(backing)[source]#
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.
Note
This type is used to interact with an already created stage. To create a stage of this type see
Simulation
- count_targeting() int [source]#
- Returns:
Number of agents currently targeting this stage.
- Return type:
- count_enqueued() int [source]#
- Returns:
Number of agents currently enqueued at this stage.
- Return type:
- class WaitingSetState(*args, **kwds)[source]#
Bases:
enum.Enum
Create a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3
Access them by:
attribute access:
>>> Color.RED <Color.RED: 1>
value lookup:
>>> Color(1) <Color.RED: 1>
name lookup:
>>> 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)[source]#
Models a set of waiting positions that can be activated or deactivated.
Similar as with a
NotifiableQueueStage
there needs to be a set of waiting positions defined which will be filled in order of definition. TheWaitingSetStage
now 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 theWaitingSetStage
acts as a simple waypoint at the position of the first defined waiting position.- property state: WaitingSetState[source]#
State of the set.
Can be active or inactive, see
WaitingSetState
- Return type:
- count_targeting() int [source]#
- Returns:
Number of agents currently targeting this stage.
- Return type:
- class WaypointStage(backing)[source]#
Models a waypoint.
A waypoint is considered to be reached if an agent is within the specified distance to the waypoint.