Configuration Parameters
Overview
Configuration Parameters
class in RestAPI 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 false . |
AllowDroppingOrders | bool | Specifies whether the algorithm is allowed to drop orders if no solution is found by visiting all of them. Default is false . |
GroupingOrders | bool | 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. |
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 300 seconds. |
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 INT_MAX . |
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
{
"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": []
}
}
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.