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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["`VehicleTypeCurator` is a helper class in C++ used for managing and storing vehicles based on their type in routing problems."],["Vehicles are considered to have the same type if they share the same cost class and start/end nodes."],["The class provides methods to retrieve vehicles of a specific type, check compatibility, and manage vehicle reinjection into the routing model."],["You can access methods like `GetCompatibleVehicleOfType`, `GetVehicleOfType`, `NumTypes` to interact with and retrieve information about vehicle types."]]],["The `VehicleTypeCurator` class stores vehicles by type, defined by cost class and start/end nodes. It offers methods to manage these types: `GetCompatibleVehicleOfType` finds and returns a compatible vehicle of a specified type, removing it from storage. `GetVehicleOfType` retrieves a vehicle of a given type. `NumTypes` gets the total count of vehicle types. `ReinjectVehicleOfClass` adds a vehicle back. `Reset` clears the state, and `Type` returns the type of a given vehicle. The constructor is `VehicleTypeCurator`.\n"]]