Airports#

class airlift.envs.airport.Airport(pos, id, processing_time=1, working_capacity=1000000)#

Airports are represented by nodes in the route map graph.

add_cargo(cargo: Cargo)#

Adds a cargo item to an airport.

Parameters:

cargo – Cargo to be added

add_to_capacity(agent: EnvAgent) None#

Adds an agent to the processing queue of an airport if it has capacity available.

Parameters:

agent – Adds an agent to Airport capacity for processing.

airport_has_capacity() bool#

Checks to see if the current airport has capacity in order to start processing an agent.

Returns:

Boolean, True if there is space available

remove_cargo(cargo: Cargo)#

Removes cargo from the airport’s cargo list

Parameters:

cargo – Cargo to be removed

remove_from_capacity(agent: EnvAgent) None#

Removes the agent from the processing queue.

Parameters:

agent – Removes an agent from an airport capacity that has completed processing.