Configuration Parameters
Configuration Parameters class in Rest API define key settings that influence the behavior of the route optimization process. These settings determine aspects such as optimization goals, search time limits, and flexibility in handling orders. Proper configuration ensures that the algorithm meets the operational constraints of the routing problem.
Configuration Parameters Structure
Each Configuration Parameter consists of:
| Name | Type | Description |
|---|---|---|
| Name | String | The name of the optimization/route configuration. |
| IgnoreTimeWindow | bool | Specifies whether time-windows are ignored during optimization. Default is |
| AllowDroppingOrders | bool | Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is |
| BalancedRoutes | Integer | Specifies the option to balance routes of an optimization. |
| OptimizationCriterion | Integer | Specifies the optimization criterion. |
| ArrangeCriterion | Integer | Specifies the arrangement criterion for optimizing time. |
| OptimizationQuality | Integer | Specifies the optimization quality (solution accuracy). |
| MaxSearchTime | unsigned int | Maximum time (in seconds) the algorithm can search for a solution. This parameter is considered only when the Optimization Quality is set to OQ_Best. Default is |
| MaxWaitTime | unsigned int | Maximum time (in seconds) that vehicles can wait at an order to align with the next order's time window. Default is |
| RouteType | Integer | Specifies the route type. |
| Restrictions | Integer | Specifies road restrictions for distance and time matrix calculations. |
| DistanceUnit | Integer | Specifies the unit of distance used in optimization and routing calculations. |
| OrderSequenceOptions | OrdersSequenceMap | Specifies the association between different orders that should be visited in a certain order. |
Example
- Schema View
- JSON Example
- JSON View
name(string)The name of the optimization/route configuration.ignoreTimeWindow(boolean)Specifies whether time-windows are ignored during optimization. Default is false.
Not available for optimizations with e-bikesallowDroppingOrders(boolean)Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false.
Not available for optimizations with e-bikesgroupingOrders(boolean)Specify if the orders will be grouped. If the distance between any two orders is less than 10 meters, those orders will be considered part of the same group. Default is false.balancedRoutes(integer)Specifies the option to balance routes of an optimization.
Not available for optimizations with e-bikes
Possible values:
•0- None: No balancing.
•1- By time: Balance by time.
•2- By number of orders: Balance by the number of orders.optimizationCriterion(integer)Specifies the optimization criterion.
Not available for optimizations with e-bikes. For e-bikes, optimization is always by time.
Possible values:
•0- Time: The problem will be optimized by distance.
•1- Distance: The problem will be optimized by time.arrangeCriterion(integer)Specifies the arrangement criterion for optimizing time.
Not available for optimizations with e-bikes
Used only if OptimizationCriterion = 1 (Distance).
Possible values:
•0- Matrix
•1- Euclidian
•2- Exact Euclidian
•3- Geodesic
•4- ManhattanarrangeCriterion(integer)Specifies the arrangement criterion for optimizing time.
Not available for optimizations with e-bikes
Used only if OptimizationCriterion = 1 (Distance).
Possible values:
•0- Matrix
•1- Euclidian
•2- Exact Euclidian
•3- Geodesic
•4- ManhattanmaxTimeToOptimize(integer)Maximum time (in seconds) the algorithm can search for a solution. Used only when Optimization Quality is set to Best. Default is 300 seconds.
Not available for optimizations with e-bikesmaxWaitTime(integer)Maximum time (in seconds) that vehicles can wait at an order to align with the next order's time window. Default is INT_MAX.
Not available for optimizations with e-bikesrouteType(integer)Specifies the route type.
Possible values:
•0- RoundRoute: The route will return at the first order (circuit).
•1- EndAnywhere: The route will end at the most efficient order selected by the algorithm.
•2- CustomEnd: The route will end at the specified order.restrictions(integer)Specifies road restrictions for distance and time matrix calculations.
This feature will be available in an upcoming release.
Possible values:
•0- None: No restrictions.
•1- Tolls: Avoid toll road restriction.
•2- Highways: Avoid highways restriction.distanceUnit(integer)Specifies the unit of distance used in optimization and routing calculations.
Possible values:
•0- Kilometers
•1- MilesorderSequenceOptions(OrdersSequenceMap)Specifies the association between different orders that should be visited in a certain order.
Not available for optimizations with e-bikes
Format: A map where each pair contains an enum and a list of lists, where each inner list is a sequence of order IDs.
{
"configurationParameters": {
"name": "Test Optimization",
"ignoreTimeWindow": false,
"allowDroppingOrders": true,
"groupingOrders": false,
"balancedRoutes": 0,
"optimizationCriterion": 1,
"arrangeCriterion": 0,
"optimizationQuality": 2,
"maxTimeToOptimize": 600,
"maxWaitTime": 18000,
"routeType": 0,
"restrictions": 0,
"distanceUnit": 0,
"orderSequenceOptions": []
}
}
{
"configurationParameters": {
"name": "string",
"ignoreTimeWindow": false,
"allowDroppingOrders": false,
"groupingOrders": false,
"balancedRoutes": 0,
"optimizationCriterion": 0,
"arrangeCriterion": 0,
"optimizationQuality": 0,
"maxTimeToOptimize": 0,
"maxWaitTime": 0,
"routeType": 0,
"restrictions": 0,
"distanceUnit": 0,
"orderSequenceOptions": []
}
}
Explanation
This setup configures an optimization with the following characteristics:
- "Test Optimization" as the instance name – Identifies the optimization session.
- Time windows are respected (
ignoreTimeWindow = false) – Ensures that orders are scheduled within their specified delivery windows. - Orders can be dropped if needed (
allowDroppingOrders = true) – Allows the algorithm to exclude unserviceable orders. - No grouping of nearby orders (
groupingOrders = false) – Each order is treated individually regardless of proximity. - No route balancing applied (
balancedRoutes = None (0)) – The algorithm does not attempt to balance workloads across routes. - Optimization is based on travel distance (
optimizationCriterion = Distance (1)) – The algorithm prioritizes routes with shorter total distance. - Arrangement is done using matrix-based distance (
arrangeCriterion = Matrix (0)) – Orders are arranged based on distance matrix calculations. - Optimized solution quality is targeted (
optimizationQuality = Optimized (2)) – Provides a well-refined solution without exhaustive search. - Maximum optimization time is limited to 600 seconds (
maxTimeToOptimize = 600) – Constrains algorithm runtime for performance. - Vehicles can wait up to 5 hours at an order (
maxWaitTime = 18000) – Allows schedule alignment with time windows. - Each route is circular (
routeType = RoundRoute (0)) – Routes start and end at the same location. - No road restrictions applied (
restrictions = None (0)) – All roads, including tolls and highways, are considered. - Distance is measured in kilometers (
distanceUnit = Kilometers (0)) – Units used in optimization calculations. - No specific order sequence constraints (
orderSequenceOptions = []) – Orders can be visited in any sequence.