|
Maps SDK for C++ 1.0.0
|
A route is a part of the optimization's solution. More...


Public Member Functions | |
| Route ()=default | |
| Default constructor. | |
| Route (const Route &)=default | |
| Default copy constructor. | |
| Route (Route &&) noexcept=default | |
| Default move constructor noexcept is deduced. | |
| Route & | operator= (const Route &)=default |
| Default copy assignment operator. | |
| Route & | operator= (Route &&) noexcept=default |
| Default move assignment operator. | |
| bool | operator== (Route const &route) const |
| Compares two Route objects for equality. | |
| bool | operator!= (Route const &route) const |
| Compares two Route objects for equality. | |
| LargeInteger | getId () const noexcept |
| Get the id of the route; it is used to identify the route when you have to update or delete it. | |
| LargeInteger | getOptimizationId () const noexcept |
| Get the optimization id to which the route belongs. | |
| const ConfigurationParametersRef | getConfigurationParameters () const noexcept |
| Get the ConfigurationParameters for which the route was generated. | |
| Route & | setConfigurationParameters (const ConfigurationParameters ¶ms) noexcept |
| Set the ConfigurationParameters of the route. | |
| const RouteOrderListRef | getOrders () const noexcept |
| Get the list of orders that are ordered in the visiting order. | |
| const VehicleRef | getVehicle () const noexcept |
| Get the Vehicle object upon which constraints are applied. | |
| Route & | setVehicle (const IVehicle &vehicle) noexcept |
| Set the vehicle object on which constraints are applied. | |
| const VehicleConstraintsRef | getVehicleConstraints () const noexcept |
| Get the VehicleConstraints of the route. | |
| Route & | setVehicleConstraints (const VehicleConstraints &vehConstr) noexcept |
| Set the VehicleConstraints of the route. | |
| const DepartureRef | getDeparture () const noexcept |
| Get the departure of the route. | |
| Route & | setDeparture (const Departure &departure) noexcept |
| Set the departure, from where the vehicle has to start the route. | |
| const DestinationRef | getDestination () const noexcept |
| Get the destination of the route. | |
| Route & | setDestination (const Destination &destination) noexcept |
| Set the destination of the route. | |
| EMatrixBuildType | getMatrixBuildType () const noexcept |
| Retrieves the method used for building the distance and time matrices. | |
| Route & | 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. | |
| const std::map< EVehicleType, IntListList > & | getTimeMatrices () const noexcept |
| Retrieves custom time matrices set for each vehicle type. | |
| ERideStatus | getRideStatus () const noexcept |
| Return the status of the ride. | |
| const TimeRef | getCreationTime () const noexcept |
| Get the time when the route was created. | |
| float | getTotalDistance () const noexcept |
| Get the total distance of the route in the distance unit set in the ConfigurationParameters. | |
| int | getTotalTime () const noexcept |
| Get the total duration of the route in seconds. | |
| int | getTotalServiceTime () const noexcept |
| Get the total service time of all the orders of the route in seconds. | |
| int | getTotalWaitTime () const noexcept |
| Get the total wait time of the route in seconds. | |
| float | getCost () const noexcept |
| Get the cost of the route (the price for the total fuel that will be consumed). | |
| float | getNeededFuel () const noexcept |
| Get the total amount of fuel used during the route. | |
| const std::vector< vrp::VRPActualBreak > & | getBreaks () const noexcept |
| Retrieves the list of actual breaks associated with the current object. | |
| const CoordinatesListRef | getShape () const noexcept |
| Get the shape of the route. | |
| int | reoptimize (ProgressListener listener, Request &request) noexcept |
| Async reoptimize the route. | |
| int | unlink (ProgressListener listener) noexcept |
| Async unlinks the route from its optimization and a new Optimization is made for the route. | |
| int | addOrders (ProgressListener listener, const RouteOrderList &orders, bool optimalPosition, 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 add orders to the route. | |
| int | deleteOrder (ProgressListener listener, RouteOrder &order) noexcept |
| Async deletes an order from a route. | |
| int | exportInFile (const String &fileName, const String &folderPath, int format) const noexcept |
| Export route data in the desired format. | |
A route is a part of the optimization's solution.
After an optimization is added, it receives a solution, which is a list of routes.
A route is the trip that a vehicle travels to visit the orders, so the number of routes returned is maximum the number of vehicles set in the optimization. If in the optimization only one vehicle is used, then the solution will contain only one route.
Implements share-read / copy-on-write Api object over IRoute.
|
inlinenoexcept |
Async add orders to the route.
The orders will also be added in the orders list of the route's optimization.
| [in] | listener | Operation progress listener. Returns:
|
| [in] | orders | The Order objects list |
| [in] | optimalPosition | If the orders should be added at the optimal position or not |
| [in] | reoptimize | If the route should be reoptimized after addition or not |
| [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] | distancesToTheOtherLocations | The distances from each added order 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 to the other orders of the optimization, for each vehicle type used (if the matrices are set by the user) |
|
inlinenoexcept |
Async deletes an order from a route.
The order will also be deleted from the optimization.
| [in] | listener | Operation progress listener. Returns:
|
| [in] | order | The order that will be deleted. If the operation succeeded the object will have the id 0. |
|
inlinenoexcept |
Export route data in the desired format.
| [in] | fileName | the name of the file where the route is exported |
| [in] | folderPath | the folder where the file route is created |
| [in] | format | the file format: 0 = db, 1 = gpx |
|
inlinenoexcept |
Retrieves the list of actual breaks associated with the current object.
|
inlinenoexcept |
Get the ConfigurationParameters for which the route was generated.
|
inlinenoexcept |
Get the cost of the route (the price for the total fuel that will be consumed).
If the used vehicle is a car or truck, than the price is calculated depending on the vehicle’s consumption, the price of the vehicle's fuel type and the total distance; otherwise the price is 0.
|
inlinenoexcept |
Get the time when the route was created.
|
inlinenoexcept |
Get the departure of the route.
|
inlinenoexcept |
Get the destination of the route.
|
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 route; it is used to identify the route when you have to update or delete it.
|
inlinenoexcept |
Retrieves the method used for building the distance and time matrices.
|
inlinenoexcept |
Get the total amount of fuel used during the route.
|
inlinenoexcept |
Get the optimization id to which the route belongs.
|
inlinenoexcept |
Get the list of orders that are ordered in the visiting order.
|
inlinenoexcept |
Return the status of the ride.
|
inlinenoexcept |
Get the shape of the route.
|
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 total distance of the route in the distance unit set in the ConfigurationParameters.
|
inlinenoexcept |
Get the total service time of all the orders of the route in seconds.
|
inlinenoexcept |
Get the total duration of the route in seconds.
|
inlinenoexcept |
Get the total wait time of the route in seconds.
|
inlinenoexcept |
|
inlinenoexcept |
Get the VehicleConstraints of the route.
|
inline |
Default copy assignment operator.
Replaces the contents of this object with a copy of another Route object.
Default move assignment operator.
Moves the contents of another Route object into this one.
|
inline |
|
inlinenoexcept |
Async reoptimize the route.
| [in] | listener | Operation progress listener. Returns:
|
| [out] | request | The request created for this operation. Use the request'id to get the current status of the operation. |
|
inlinenoexcept |
Set the ConfigurationParameters of the route.
Used when you want to update the route's configuration parameters.
| params | The new configuration parameters of the route |
Set the departure, from where the vehicle has to start the route.
Used when you want to update the route's start order using the method Service::updateRoute().
| departure | The new departure of the route |
|
inlinenoexcept |
Set the destination of the route.
This method can be used when route type is ERouteType::RT_CustomEnd in order to update the route's end order using the method Service::updateRoute().
| destination | The new destination of the route |
|
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 vehicle object on which constraints are applied.
| vehicle | The new vehicle object of this route |
|
inlinenoexcept |
Set the VehicleConstraints of the route.
Used when you want to update the route's vehicle constraints using the method Service::updateRoute()
| vehConstr | The new constraints for the route's vehicle |
|
inlinenoexcept |
Async unlinks the route from its optimization and a new Optimization is made for the route.
| [in] | listener | Operation progress listener. Returns:
|