In the options
field you can specify global constraints, which will be taken into account when generating a solution. The options field is an object consisting of key:value pairs that define the optimization objective.
{
"routeScenario": {
"options": {
"transportationMode": "car",
"squashDuration": 30,
"excludeTolls": true,
"minimizeRoutes": true,
"excludeFerry": true
},
...
}
}
Fields | Type | Default Value |
---|---|---|
transportationMode | String Enum (car | bicycle) | car |
squashDuration | Num (secs) | 0 |
excludeTolls | Boolean | false |
minimizeRoutes | Boolean | false |
excludeFerry | Boolean | true |
minimizeRoutes
Use this parameter if you are interested in minimizing the number of routes required to service all of your orders. This allows you to figure out how many drivers you should call in. When using this parameter, make sure you provide ample routes in the input, so all the orders can be served. The idle routes will just be empty in the solution.
squashDuration
Useful when you have many orders at the same location, which could be an apartment complex. Normally, each order has a duration value of let's say 10 minutes, which accounts for parking and finding the entrance. If you had 6 orders assigned to a driver at the same location, it doesn't take an hour in total! Use this parameter to squash the durations of each subsequent delivery at the same address. If you set it to 60 secs, it will squash it to 1 minute, so the total duration for the above 6 stops would be 15 minutes.
excludeTolls
This option is useful if you would like to avoid toll roads in your routes. When the option is enabled, the end solution will contain routes that do not traverse through any of the toll roads in the region.
excludeFerry
Enable this option if you'd like Routific to avoid generating any legs of a route where the driver would need to take a ferry to service an order location.
transportationMode:
This option instructs Routific to generate routes based on the road network for either cars or bicycles. Please note that we do not accept mixed routes of both car and bicycle types.