Cythonic VehicleState

The class vehicle_state_cython.VehicleState is the cython implementation of the pure-python equivalent vehicle_state.VehicleState. They can be used interchangeably, but it is not possible to mix pure-python and cython components: If you want to go with the cythonic dispatchers, then you need to use cythonic data_structures and spaces.

class VehicleState(int vehicle_id, initial_stoplist, TransportSpace space, Dispatcher dispatcher, int seat_capacity)

Single vehicle insertion logic is implemented in Cython here. Can be used interchangeably with its pure-python equivalent vehicle_state.VehicleState.

fast_forward_time(self, double t: float) Tuple[List[StopEvent], List[Stop]]

Update the vehicle_state to the simulator time t.

Parameters:

t (float) – time to be updated to

Returns:

  • events – List of stop events emitted through servicing stops upto time=t

  • new_stoplist – Stoplist remaining after servicing the stops upto time=t

Return type:

Tuple[List[StopEvent], List[Stop]]