Module Contents#

class Agent(backing)[source]#

Represents an Agent in the simulation.

Agent objects are always retrieved from the simulation and never created directly.

Agents can be accessed with:

# a specific agent

# all agents as iterator

# agents in a specific distance to a point as iterator
sim.agents_in_range(position, distance)

# agents in a polygon as iterator


You need to be aware that currently there are no checks done when setting properties on an Agent instance. For example it is possible to set an Agent position outside the walkable area of the Simulation resulting in a crash.

Do not use.

Retrieve agents from the simulation.

property id: int[source]#

Numeric id of the agent in this simulation.

Return type:


property journey_id: int[source]#

Id of the JourneyDescription the agent is currently following.

Return type:


property stage_id: int[source]#

Id of the Stage the Agent is currently targeting.

Return type:


property position: tuple[float, float][source]#

Position of the agent.

Return type:

tuple[float, float]

property orientation: tuple[float, float][source]#

Orientation of the agent.

Return type:

tuple[float, float]

property model: jupedsim.models.GeneralizedCentrifugalForceModelState | jupedsim.models.CollisionFreeSpeedModelState[source]#

Access model specific state of this agent.

Return type:

jupedsim.models.GeneralizedCentrifugalForceModelState | jupedsim.models.CollisionFreeSpeedModelState