pycba.vehicle.make_train#
- make_train(vehicles, spacings)[source]#
Makes a train of vehicles from a sequence from multiple
pycba.bridge.Vehicle
objects behind one another (e.g. superload queued vehicles, train).- Parameters:
vehicles (List[Vehicles]) – A list of
pycba.bridge.Vehicle
objects, length one greater than the length of the vehicle spacings vector.spacings (np.ndarray) – A vector of spacings between vehicles, either of length one, for equal spacings between all vehicles, or of of length one fewer than the length of the list of vehicles.
- Raises:
ValueError – If the lengths of the list of vehicles and vector of spacings are inconsistent.
ValueError – If all list entries are not
pycba.bridge.Vehicle
objects
- Return type:
pycba.bridge.Vehicle
object