Dispatch Optimization Service
Dispatch method accepts two parameters. The first is a list of vehicles objects. The vehicle object has Start lat/lon and lat/lon for an optional Finish location. The second parameter to the web service is a list of stop locations that must be visited by the vehicles. The location object can contain name, street, city, state, zip, country and lat/lon fields. TrackService will geocode locations addresses on-the-fly. In the event lat/lon are present, they will be used for the location and no geocoding will be performed, otherwise geocoding is carried out to find lat/lon for the given location.
Dispatch returns a list of vehicle items. Each vehicle has a list of stops that contains the route assigned to the vehicle. The list is optimized based on stop location, weight, time and other factors. The return list may also contain start/finish locations of the vehicle.
Suppose we call Dispatch() method with one vehicle V1 and six stops B, A, C, F, E, D.
Dispatch() result will be:
V1---->A--->B---->C---->D---->F---->E (order is optimized route)
Suppose we call Dispatch() method with two vehicles V1 and V2 and six stops B, A, C, F, E, D.
Depending on factors such as geographic dispersed, time, weight, etc. Dispatch() can assign A, E to V1 and B, C, D, F to V2 vehicle.
V1---->A---->E (order is optimized route)
V2---->B---->D---->C---->F (order is optimized route)
You can use the location TimeConstraintArrival property only if you have time-sensentive deliveries.
Except for the TimeWindow mode, Dispatching mode only applies when there are mutiple vehicles. When there is one vehicle available then only route optimization is performed since there is nothing to dispatch (all stops are assigned to a single vehicle). Leave on 'Auto' for system if you are not sure and to select the best match.
Dispatch Mode
Auto |
Select Auto for best performance. |
Optima |
Single Vehicle Only. Released in 2014. Highly recommended. This is our latest mode that gives best result. Use this mode with or without Time Windows, and/or if you wish to have the highest possible accuracy. Optima can take slightly longer than Auto but the results are excellent. |
MinimumVehicles |
Released in 2014. Use this if you need minimum number of vehicles to visit all of the stops. This mode uses the new Optima technology. Given a number of vehicles and a number of stops, a minimum number of vehicles is selected to visit all stops. Several factors can play into which vehicles are selected including Fuel Cost (FC).
Suppose V1 and V2 are at the same location
V1.MaxWeight=25000 and FC=2.00 Dist=10
V2.MaxWeight=10000 and FC=3.00 Dist=10
Cost1 = 2.0*10=20
Cost2 = 3.0*10=30
we prefer V1 with cost 20
Suppose V1 and V2 are in different locations
V1.MaxWeight=25000 and FC=2.00 Dist=50
V2.MaxWeight=10000 and FC=3.00 Dist=30
Cost1 = 2.0*50=100
Cost2 = 3.0*30=90
we prefer V2 with cost 90
If one of vehicles does not have FC then FC is ignored
|
BalanceLocation |
Introduced in 2014. To get an equal number of stops in routes with multiple drivers and multiple stops. This mode uses the new Optima technology. |
BalanceTime |
Introduced in 2014. To get an equal time in routes with multiple drivers and multiple stops. This mode uses the new Optima technology. |
|
The followings are older but still valid modes. |
EqualDistance |
Route is divided into equal segment of approximately same distance. Works well for deliveries orginating from warehouse or a single depot(central) or when all vehicles start from same location and everyone is supposed to drive same distance. |
EqualStop |
Driver's max stops is changed to an equal number. Use this if you want every driver to have same number of stops. Not terribly efficient but may apply in some situations. |
SingleRegion |
Drivers are sent to the same area. Very efficient when vehicles are scattered. Not efficient if drivers start at same location. However, this mode is fastest for servicing clients who are in the same area. |
MultipleRegion |
Dispatches in geographically dispersed mode. Works great when vehicles are in completely different cities, constantly on the move or are in different areas of the same city. This is probably the best method for time-sensitive and mission-critical application like courier, dispatching or trucking. Itc can work well in real-time mode using GPS devices. |
TimeWindow |
Uses the times in each stop to determine best route option. See Time Window page for more info. Please note that when using this mode, optimization can be lost in favor of achieving best arrival/departure times. |
TimeWindowDepot |
Same as TimeWindow with the exception that this mode uses first vehicle start/finish position as central depot. Use this if you need time window and all your vehicles start/finish from a warehouse or depot. This mode can determine exactly how many vehicles are needed to visit all the stops within times required. Best to use when you need to know before hand how many vehicles are needed. This mode assumes no limits on capacity or weight of vehicles since it must determine number of vehicles required. |
Objects
CurrentTime |
Use CurrentTime when TimeConstraintArrival is specified. System uses CurrentTime to calculate approximate arrival time. |
DispatchMode |
Auto or EqualDistance or EqualStop or SingleRegion or MultipleRegion |
MinimumOptimization |
Number of iterations to find best route (minimum is 1). This value is usually set at 8 or 9. |
DistanceUnit |
Mile or Kilometer |
RoutingService |
NetRoad, TrackRoad or Bing. Default is NetRoad. It is fastest way to get distance, time and turn-by-turn directions |
|
Vehicle Object |
Name |
Vehicle name or ID. String |
Email |
Vehicle email. String |
Group |
Group the vehilce belongs. String |
Roles |
If not left blank, it must satisfiy "Conditions" in the stops separated by comma, i.e. Plumber, Electrician. String |
Speed |
Speed of the vehicle. A constanct variable. Integer. It can be Mile or Kilometer per hour. Logic of many dispatching modes can use Speed internally. If vehicle Speed is specified then logic uses it instead of the road speed. Speed can change calculations dramatically. If you want to use default road speed, then set Speed to 0. No matter what vehicle Speed is, it cannot be greater than allowable road speed. In other words, even if you set Speed to 1000 Km/h, it will not go faster than 80Km/hour on a road with 80Km/h speed limit. |
MaxMinutes |
Maximum number of minutes vehicle can make in each single route. When MaxMinutes is reached the route is split into v_, v_2, v_3, etc. Integer |
MaxStops |
Maximum number of stops vehicle can make in each single route. When MaxStops is reached the route is split into v_, v_2, v_3, etc. Integer |
MaxWeight |
Each Location is given a weight variable. MaxWeight is total weight (double) a vehicle can accomodate before it is set aside. |
MaxSkids |
Maximum number of skids a vehicle can accomodate. When this value is reached, the vehicle is set aside. |
MaxVolume |
Maximum volume a vehicle can accoumodate. This value could be tonnage, metric, liter or anything you want it to be. |
OnTheRoad |
OnTheRoad feature allows specifying whether the vehicle should come back to the start point before starting the next route sequence. The OnTheRoad only applies when MaxStops or MaxMinutes for a vehicle are greater than 0 and stops/minutes count reach maximum value.
For example, a vehicle with a MaxStops of 10 per day and 50 stops will have a route that will last 5 days with 10 stops every day. When we have more than one day for a vehicle's route, the question becomes: do we want to start from the vehicle's initial starting point the next day (a warehouse) or do start from last day's finish location (we are on-the-road)?
If a route spans over several days and you do not wish to return back to initial start point every time then set OnTheRoad to true.
A daily route example of enabled versus disabled:
In the above, when disabled, every day the route starts and finishes at the office.
|
Tin/Tout |
Time in/Time out for the vehicle. System uses time in/time out to calculate time windows and estimated arrival times. Always good to specify if you know when vehicle starts the route. |
StartLocation |
Vehicle initial position and an important variable since all route optimization are calculated relative to this location |
FinishLocation |
An optional end location for the vehicle. Using a finish location can increase optimization even more. Use it if finish location at the end of the route is known. |
|
|
|
Location Object |
Name |
Location name |
Delivery |
Optional delivery name. If not blank, this should be the name of another location object in the series of locations sent to server. Use only if you have pickup and delivery. Otherwise leave blank. It is possible to daisy chaine one pickup and multiple deliveries (pickup-del-del-del-del.) |
Vehicle |
Vehicle name. Use only if you have preassigned vehicle for location. Otherwise leave blank. |
LatLong |
LatLong of the location. You can either specify lat/lon or an address. In case a lat/lon is provided it will be used. Otherwise system will try to parse and geocode the address provided. |
Address |
Address of the location. If Lat/Long is provided address will be ignored. |
Priority |
Scale of 0-10 (10 highest, 0 lowest). |
Wait |
Waiting time at the location. Examples, loading time, boarding time, waiting time to vist someone. This value is in seconds for the API and will be added to the route time. Please note the vehicle MaxMinutes value is in Minutes. |
Volume |
Volume or any other quantity at this location |
Weight |
Weight or any other quantity at the location |
Skids |
Number of skids (or boxes) at the location |
TimeConstraintArrival |
Desired arrival time at the location. |
TimeConstraintDeparture |
Desired departure time from the location. |
TimeEstimatedArrival |
ETA at each stop. |
LocationType |
Midway or Start or Finish or MidwayDrop or Break. |
CanArriveEarly |
When a TimeConstraintArrival is specified, is it possible to arrive early at the location? For example, if a store opens at 9am then vehicle should not arrive anytime sooner than 9am. |
Distance |
Distance to the next location. This is calculated for each leg of the journey and returned by system. |
Time |
Time to the next location (in seconds). This value is calculated and returned by system. It does not include waiting time at each location. |
|
|