|
Maps SDK for C++ 1.0.0
|
Defines a vehicle routing problem that has to be optimized. More...


Public Member Functions | |
| Optimization ()=default | |
| Default constructor. | |
| Optimization (const Optimization &)=default | |
| Default copy constructor. | |
| Optimization (Optimization &&) noexcept=default | |
| Default move constructor noexcept is deduced. | |
| Optimization & | operator= (const Optimization &)=default |
| Default copy assignment operator. | |
| Optimization & | operator= (Optimization &&) noexcept=default |
| Default move assignment operator. | |
| bool | operator== (Optimization const &optimization) const |
| Compares two Optimization objects for equality. | |
| bool | operator!= (Optimization const &optimization) const |
| Compares two Optimization objects for equality. | |
| LargeInteger | getId () const noexcept |
| Get the id of the optimization; used only to identify the optimization when you have to update or delete it. | |
| const ConfigurationParametersRef | getConfigurationParameters () const noexcept |
| Get the ConfigurationParameters of the optimization. | |
| Optimization & | setConfigurationParameters (const ConfigurationParameters ¶ms) noexcept |
| Set the ConfigurationParameters of the optimization. | |
| const OrderListRef | getOrders () const noexcept |
| Get the orders that have to be visited. | |
| Optimization & | setOrders (const OrderList &orders) noexcept |
| Set the orders that have to be visited. | |
| const VehicleListRef | getVehicles () const noexcept |
| Get the vehicles list of the optimization. | |
| Optimization & | setVehicles (const VehicleList &vehicles) noexcept |
| Set vehicles that will be used in the optimization. | |
| const VehicleConstraintsListRef | getVehiclesConstraints () const noexcept |
| Get the VehicleConstraints list of the optimization. | |
| Optimization & | setVehiclesConstraints (const VehicleConstraintsList &list) noexcept |
| Set the VehicleConstraints list of the optimization. | |
| const DepartureListRef | getDepartures () const noexcept |
| Get the departures points from where the vehicles have to start their routes. | |
| Optimization & | setDepartures (const DepartureList &departureList) noexcept |
| Set the departures points from where the vehicles have to start their routes. | |
| const DestinationListRef | getDestinations () const noexcept |
| Get the destinations points where the vehicles will end their routes. | |
| Optimization & | setDestinations (const DestinationList &destinationList) noexcept |
| Set the destination points where the vehicles will end their routes. | |
| EMatrixBuildType | getMatrixBuildType () const noexcept |
| Retrieves the method used for building the distance and time matrices. | |
| Optimization & | setMatrixBuildType (EMatrixBuildType matrixBuildType) noexcept |
| Sets the method to be used for constructing the distance and time matrices for the optimization. | |
| const std::map< EVehicleType, FloatListList > & | getDistanceMatrices () const noexcept |
| Retrieves custom distance matrices set for each vehicle type. | |
| Optimization & | setDistanceMatrices (const std::map< EVehicleType, FloatListList > &matrices) noexcept |
| Sets custom distance matrices for each vehicle type. | |
| const std::map< EVehicleType, IntListList > & | getTimeMatrices () const noexcept |
| Retrieves custom time matrices set for each vehicle type. | |
| Optimization & | setTimeMatrices (const std::map< EVehicleType, IntListList > &matrices) noexcept |
| Sets custom time matrices for each vehicle type. | |
| const TimeRef | getCreationTime () const noexcept |
| Get the time when the optimization was created. | |
| int | getSolution (ProgressListener listener, RouteList &routes) noexcept |
| Async returns the solution for an optimization. | |
| int | reoptimize (ProgressListener listener, Request &request) noexcept |
| Async reoptimize the optimization. | |
| int | addOrders (ProgressListener listener, const OrderList &orders, Request &request, bool reoptimize=false, const std::map< vrp::EVehicleType, FloatListList > distancesToTheOtherLocations=std::map< vrp::EVehicleType, FloatListList >(), const std::map< vrp::EVehicleType, IntListList > timesToTheOtherLocations=std::map< vrp::EVehicleType, IntListList >()) noexcept |
| Async adds orders to the optimization. | |
| int | updateOrder (ProgressListener listener, const Order &order) noexcept |
| Async saves the updates made to the optimization order. | |
| int | deleteOrder (ProgressListener listener, Order &order) noexcept |
| Async removes a order from the optimization. | |
Defines a vehicle routing problem that has to be optimized.
Implements share-read / copy-on-write Api object over IOptimization.
|
inlinenoexcept |
Async adds orders to the optimization.
The orders will be added at the end of the existing optimization's orders list
| [in] | listener | Operation progress listener. Returns:
|
| [in] | orders | The orders data to be added, as a list of Order objects |
| [out] | request | If the optimization is reoptimized, then a request is created for this operation. Use the request's id to get the current status of the operation. |
| [in] | reoptimize | If the optimization should be reoptimized after addition or not. If is not reoptimized, the added orders will not be in the solution of the optimization. |
| [in] | distancesToTheOtherLocations | The distances from each added order's location to the other orders of the optimization, for each vehicle type used (if the matrices are set by the user) |
| [in] | timesToTheOtherLocations | The times from each added order's location to the other orders of the optimization, for each vehicle type used (if the matrices are set by the user) |
|
inlinenoexcept |
Async removes a order from the optimization.
It will also be deleted from the route in which it is visited. The start order of the optimization or its routes can't be deleted!
| [in] | order | The order that will be deleted. If the operation succeeded the object will have the id 0. |
| [in] | listener | Operation progress listener. Returns:
|
|
inlinenoexcept |
Get the ConfigurationParameters of the optimization.
|
inlinenoexcept |
Get the time when the optimization was created.
|
inlinenoexcept |
|
inlinenoexcept |
Get the destinations points where the vehicles will end their routes.
|
inlinenoexcept |
Retrieves custom distance matrices set for each vehicle type.
This is used when distances between locations vary based on the type of vehicle, and precise control over routing is needed.
|
inlinenoexcept |
Get the id of the optimization; used only to identify the optimization when you have to update or delete it.
|
inlinenoexcept |
Retrieves the method used for building the distance and time matrices.
|
inlinenoexcept |
Get the orders that have to be visited.
|
inlinenoexcept |
Async returns the solution for an optimization.
| [out] | routes | The result Route objects list |
| [in] | listener | Operation progress listener. Returns:
|
|
inlinenoexcept |
Retrieves custom time matrices set for each vehicle type.
Similar to distance matrices but specifies the travel time between locations for different vehicle types.
|
inlinenoexcept |
Get the vehicles list of the optimization.
|
inlinenoexcept |
Get the VehicleConstraints list of the optimization.
|
inline |
Compares two Optimization objects for equality.
| optimization | Another Optimization object to compare against. |
|
default |
Default copy assignment operator.
Replaces the contents of this object with a copy of another Optimization object.
|
defaultnoexcept |
Default move assignment operator.
Moves the contents of another Optimization object into this one.
|
inline |
Compares two Optimization objects for equality.
| optimization | Another Optimization object to compare against. |
|
inlinenoexcept |
Async reoptimize the optimization.
| [in] | listener | Operation progress listener. Returns:
|
| [out] | request | The request created for this operation. Use the request's id to get the current status of the operation. |
|
inlinenoexcept |
Set the ConfigurationParameters of the optimization.
| params | The new configuration parameters set for this optimization |
|
inlinenoexcept |
Set the departures points from where the vehicles have to start their routes.
You can set one departure for each vehicle or the same one for all the vehicles (the parameter "departureList" will have only one element).
| departureList | The list of Departure objects |
|
inlinenoexcept |
Set the destination points where the vehicles will end their routes.
This method can be used when the route type is ERouteType::RT_CustomEnd. You can set one Destination for each vehicle or the same one for all the vehicles (the parameter "destinationList" will have only one element).
| destinationList | The list of Destination objects |
|
inlinenoexcept |
Sets custom distance matrices for each vehicle type.
Allows specifying exact distances between locations for different types of vehicles, providing fine-grained control over route optimization.
| matrices | A map of vehicle types to their respective distance matrices. |
|
inlinenoexcept |
Sets the method to be used for constructing the distance and time matrices for the optimization.
This can significantly impact the optimization's realism and accuracy.
| matrixBuildType | The matrix build type as an EMatrixBuildType enumeration value. |
|
inlinenoexcept |
Set the orders that have to be visited.
Required field.
| orders | The orders to be visited |
|
inlinenoexcept |
Sets custom time matrices for each vehicle type.
This method allows for the specification of travel times between locations, tailored to different types of vehicles.
| matrices | A map of vehicle types to their respective time matrices. |
|
inlinenoexcept |
Set vehicles that will be used in the optimization.
If you set more than 1 vehicle, the algorithm may find a solution where not all the vehicles are used; but if you want to be sure that all of them are used, you can set in the VehicleConstraints the minimum number of orders to visit or the minimum distance to 1.
| vehicles | The vehicles which will be used |
|
inlinenoexcept |
Set the VehicleConstraints list of the optimization.
If you use multiple vehicles (number of vehicles > 1), you can set a set of vehicle constraints for each vehicle or you can set only one set that will be applied to all the vehicles used. So the size of the "list" parameter should be equal to the number of vehicles or 1.
| list | The list of vehicle constraints |
|
inlinenoexcept |
Async saves the updates made to the optimization order.
It will be also be updated in the route were it is used. The coordinates of a order cannot be changed.
| [in] | order | The new order data, as Order object |
| [in] | listener | Operation progress listener. Returns:
|