starling_sim.basemodel.agent.vehicles.vehicle
Module Contents
Classes
This class describes the basic features of a vehicle agent |
- class starling_sim.basemodel.agent.vehicles.vehicle.Vehicle(simulation_model, agent_id, origin, seats, **kwargs)
Bases:
starling_sim.basemodel.agent.moving_agent.MovingAgent
This class describes the basic features of a vehicle agent
It should be extended to implement more specific features and behaviours
- SCHEMA
- __str__()
Give a string display to the simulation element
- change_position(new_position, mode)
The vehicle changes the position of all of its occupants along with its own.
- Parameters:
new_position –
mode –
- Returns:
- trace_event(event)
The vehicle adds its move and route traces to its occupants.
- Parameters:
event –
- Returns:
- load()
Compute the current load of the vehicle.
- Returns:
vehicle load
- add_passenger(passenger)
- get_passenger(passenger)
Add the passenger to the list of occupants.
- Parameters:
passenger – agent
- remove_passenger(passenger)
- leave_passenger(passenger)
Remove the passenger from the list of occupants.
- Parameters:
passenger – agent