Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class VehicleTypeCurator
Note: This documentation is automatically generated.
Helper class that manages vehicles. This class is based on the
RoutingModel::VehicleTypeContainer that sorts and stores vehicles based on
their "type".
Arguments:
int type, std::function<bool(int)> vehicle_is_compatible,
std::function<bool(int)> stop_and_return_vehicle
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 the function returns {vehicle, -1}.
If for some *vehicle* 'stop_and_return_vehicle' returns true before a
compatible vehicle is found, the function simply returns {-1, vehicle}.
Returns {-1, -1} if no compatible vehicle is found and the stopping
condition is never met.
[[["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."],[[["The `VehicleTypeCurator` is a helper class in C++ designed for managing and sorting vehicles within a routing model based on their type."],["It provides functionalities to search for compatible vehicles of a specific type based on given criteria and to manage the pool of available vehicles."],["The class can identify the vehicle with the lowest fixed cost within a given type."],["Users can update and reset the collection of stored vehicles based on custom functions."]]],[]]