C++ Reference: class VehicleTypeCurator

This documentation is automatically generated.

Helper class that stores vehicles by their type. Two vehicles have the same "vehicle type" iff they have the same cost class and start/end nodes.
Method
GetCompatibleVehicleOfType

Return type: int

Arguments: int type, std::function<bool(int)> vehicle_is_compatible

Searches for the best compatible vehicle of the given type, i.e. the first vehicle v of type 'type' for which vehicle_is_compatible(v) returns true. If a compatible vehicle is found, its index is removed from vehicles_per_vehicle_class_ and returned. Returns -1 otherwise.

GetVehicleOfType

Return type: int

Arguments: int type

NumTypes

Return type: int

ReinjectVehicleOfClass

Return type: void

Arguments: int vehicle, int vehicle_class, int64 fixed_cost

Reset

Return type: void

Type

Return type: int

Arguments: int vehicle

VehicleTypeCurator

Return type: explicit

Arguments: const RoutingModel::VehicleTypeContainer& vehicle_type_container