flatland.envs.agent_utils module

class flatland.envs.agent_utils.Agent(initial_position, initial_direction, direction, target, moving, speed_data, malfunction_data, handle, status, position, old_direction, old_position)

Bases: tuple

direction

Alias for field number 2

handle

Alias for field number 7

initial_direction

Alias for field number 1

initial_position

Alias for field number 0

malfunction_data

Alias for field number 6

moving

Alias for field number 4

old_direction

Alias for field number 10

old_position

Alias for field number 11

position

Alias for field number 9

speed_data

Alias for field number 5

status

Alias for field number 8

target

Alias for field number 3

class flatland.envs.agent_utils.EnvAgent(initial_position: Tuple[int, int], initial_direction: flatland.core.grid.grid4.Grid4TransitionsEnum, direction: flatland.core.grid.grid4.Grid4TransitionsEnum, target: Tuple[int, int], moving: bool = False, speed_data=NOTHING, malfunction_data=NOTHING, handle=None, status: flatland.envs.agent_utils.RailAgentStatus = <RailAgentStatus.READY_TO_DEPART: 0>, position: Optional[Tuple[int, int]] = None, old_direction=None, old_position=None)[source]

Bases: object

classmethod from_schedule(schedule:flatland.envs.schedule_utils.Schedule)[source]

Create a list of EnvAgent from lists of positions, directions and targets

classmethod load_legacy_static_agent(static_agents_data:Tuple)[source]
reset(self)[source]

Resets the agents to their initial values of the episode

to_agent(self) → flatland.envs.agent_utils.Agent[source]
class flatland.envs.agent_utils.RailAgentStatus[source]

Bases: enum.IntEnum

An enumeration.

ACTIVE = 1
DONE = 2
DONE_REMOVED = 3
READY_TO_DEPART = 0