- class Agent(backing)#
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 sim.agent(id) # all agents as iterator sim.agents() # agents in a specific distance to a point as iterator sim.agents_in_range(position, distance) # agents in a polygon as iterator sim.agents_in_polygon(polygon)
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 journey_id: int#
Id of the
JourneyDescriptionthe agent is currently following.
- Return type:
- property orientation: tuple[float, float]#
Orientation of the agent.
- property model: jupedsim.models.GeneralizedCentrifugalForceModelState | jupedsim.models.CollisionFreeSpeedModelState#
Access model specific state of this agent.