|
|
|
|
Free Open Street Map tiles
|
|
|
|
|
What is TrackService? |
|
|
|
TrackService is a web API for dispatching and route
planning & optimization. These services are available to your application and
may be accessed anywhere on the net.
|
|
|
TrackRoad.com
|
Whether you are launching a new web site or looking for a way to integrate route
optimization and intelligent dispatching solution into your existing application
we can help you with our TrackService web services. For developers, we have
provided the same powerful engine in the API that runs our auto dispatching and
route optimization of
TrackRoad.com
. Now you can seemlessly integrate our routing technology into your application.
|
|
|
XML Reference
|
The vehicle routing problem (VRP) is a computationally
complex issue. There are also different variations to routing which require
different approachs to solving the problem. Our API helps hide most of the
complexity that is inherent in vehicle routing and route optimization. And our
logic makes auto dispatching and route optimization simple to use and easy to
implement in your production environment. |
|
|
For additional info please call 1-800-876-2060 or
email us
|
|
In the following pages, you will be guided on how to use TrackService using Soap
and XML. You may also download sample for further study. |
|
|
Download Sample
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Getting Started with API |
|
|
|
What you need to get started with TrackService web API. |
|
|
|
How to get a key? |
|
|
|
To use TrackService you must first get an Account ID. A developer Account ID
will grant you access to all the API functions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Free Map Tiles |
|
|
|
We are proud to offer (free of charge) OpenStreetMap tiles
to our users. Every one is encouraged to use these tiles. Available immediately,
this service can be used freely under the terms of the Creative Commons
Attribution-ShareAlike 2.0 license.
|
|
|
|
We follow the same map tile system as Microsoft Bing Map Tile System. For
further explanation please see: |
|
|
|
http://msdn.microsoft.com/en-us/library/bb259689.aspx |
|
|
|
To access tiles send requests to: |
|
|
|
http://tile.trackroad.com/ |
|
|
|
There maybe changes in the future depending on the availability of resources.
We reserve the right to change our policy without prior notice. If you plan to
use our tile service for commercial use you should let us know in advance
register
|
|
|
|
|
|
|
|
What is Vehicle Routing, Auto-Dispatching & Route Optimization? |
|
|
|
Every time you need service a number of locations with a fleet of vehicles you
have a vehicle routing problem. The question will be which vehicle goes where
and the goal will be minimizing the cost of travel and distribution. |
|
|
|
TrackService can auto-dispatch stops and perform route optimization for each
vehicle's route. Since there can be different logistics in vehicle routing,
we've added the DispatchMode property to accomodate different situations. The
vehicle routing problem (VRP) can have several variations (VRP with
pickup/delivery, VRP with TimeWindow, VRP capacitated, etc.) and the
DispatchMode is to help with these situations. |
|
|
|
Our logic employs several factors such as vehicle position relative to stops,
time window, maximum number of stops vehicle can make in a single route and
total amount of time vehicle can be on the road in calculating the route. All of
these decisions are helped by our built-in algorithm while DispatchMode hides
the complexity of vehicle routing and lets you focus on other tasks. |
|
|
|
What is intelligent dispatching?
|
|
|
|
When there is more than one vehicle, TrackRoad can intelligently assign each
stop to the most eligible vehicle. The eligibility is determined by several
factors such as distance, delivery time window, vehicle's capacity, pre-assigned
locations and other variables. Vehicle routing is a computationally complex
problem. TrackRoad hides the complexity and helps you concentrate on your task.
The only thing you need to know is which dispatching mode fits your situation. |
|
|
|
What is the best dispatching mode? |
|
|
|
Depending on the situation and the vehicle's start/finish locations you should
use different dispatching mode. If you are not sure, just leave mode on 'Auto'
and TrackRoad will find best mode. Image below is a great example on how the
stops were distributed among two drivers in the Houston area. |
|
|
|
|
Intelligent Dispatching: the vehicle to the north gets the locations in
the north. And vehicle in the south gets those in the south.
|
|
|
|
|
|
|
|
Equal Distance for pickup from a central facility & delivery
|
|
|
|
|
|
|
|
MultipleRegion when vehicles are scattered in several regions |
|
|
|
|
|
|
|
SingleRegion vehicles start from same location and visit same area |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reference |
|
|
|
|
To use TrackService, you must call Login method first, get
a vaild SessionID and then use the ID until you call Logout method to end your
session.
There are several web methods you may call and a list of objects that can be in
the request or in the response. Please download and study our sample .NET app
to see how the soap call is constructed.
Download Sample
|
|
CalculateDistance
|
|
|
Calculate Distance. This method returns estimated driving distance from
point A to point B. CalculateDistance is only an estimate (accurate 99% of the
time), |
|
|
|
|
|
Result: |
|
|
<CalculateDistanceResponse xmlns="http://TrackService.TrackRoad.com/">
<CalculateDistanceResult> <Distance>double</Distance>
<Time>int</Time>
</CalculateDistanceResult> </CalculateDistanceResponse> |
|
|
|
|
|
|
|
|
Cost:
1 every 5 call(s)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CalculateRoute
|
|
|
CalculateRoute returns distances and turn-by-turn directions. |
|
|
|
|
|
Result: |
|
|
<CalculateRouteResult> <Route>
<Distance>double</Distance> <Time>int</Time> <RouteLegs>
<RouteLeg xsi:nil="true" /> <RouteLeg xsi:nil="true" />
</RouteLegs> </Route> </CalculateRouteResult>
</CalculateRouteResponse>
|
|
|
|
|
|
|
|
|
Cost:
1 every 25 stops
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dispatch
|
|
|
The first parameter is a list of vehicles objects (List
). The vehicle object also has lat/lon and a lat/lon for an optional finish
location. The second parameter to the web method 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 web method returns a list of vehicle items. Each vehicle stops location
list contains the route assigned to the vehicle. The return list may also
contain start/finish locations. |
|
|
|
|
|
Cost:
1 per 100 stops per vehicle
|
|
|
|
|
|
Result: |
|
|
<DispatchResponse xmlns="http://TrackService.TrackRoad.com/">
<DispatchResult> <Items> <VehicleItem>
<Vehicle xsi:nil="true" /> <Locations xsi:nil="true" />
</VehicleItem> <VehicleItem> <Vehicle
xsi:nil="true" /> <Locations xsi:nil="true" />
</VehicleItem> </Items> </DispatchResult>
</DispatchResponse>
|
|
|
Use the location TimeConstraintArrival property if you have time-sensentive
deliveries.
|
|
|
|
|
|
|
DispatchMode |
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 to select the best match. |
|
|
|
|
EqualDistnace |
Route is divided into equal chuncks 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.
|
|
|
|
|
|
|
|
|
|
|
|
Specification Object |
|
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) |
|
DistanceUnit |
Mile or Kilometer |
|
|
|
|
|
Vehicle Object |
|
Name |
Vehicle name or ID. String
|
|
Email |
Vehicle email. String |
|
Group |
Group this vehilce belongs. String |
|
Speed |
Speed of the vehicle. A constanct variable. Integer |
|
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 reache 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 for 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.
|
|
Tin/Tout |
Time in/Time out for the vehicle. This is for internal use only and has no
effect on dispatching. |
|
StartLocation |
Vehicle initial position. All route optimization are calculated relative to
this location |
|
FinishLocation |
An optional ending location for the vehicle. Use this only if necessary to go to
a certain location at the end of a route. |
|
|
|
|
|
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. |
|
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 and will be added to the route
time. |
|
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. |
|
LocationType |
Midway or Start or
Finish |
|
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. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Geocode
|
|
|
Accepts a list of locations and geocodes them. The location object can
contain name, street, city, state, zip, country. It returns back a list of stops
with lat/lon. Location object has a MatchCode property that may be used to
verify address validation. |
|
|
|
|
|
MatchCode: |
|
|
- None = 0,
- Poor = 1
- Approx = 2
- Good = 3
- Exact = 4
|
|
|
|
|
|
Result: |
|
|
<GeocodeResult> <Items> <GeocodeItem>
<Address xsi:nil="true" /> <Locations
xsi:nil="true" /> </GeocodeItem> <GeocodeItem>
<Address xsi:nil="true" /> <Locations
xsi:nil="true" /> </GeocodeItem> </Items>
</GeocodeResult> </GeocodeResponse> |
|
|
|
|
|
|
|
|
|
|
|
Cost:
1 credit for up to 100 addresses in a single call
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Login
|
|
|
Login is used to connect to the server using userID and password. A
sessionID is returned which must be used in calls to the server. |
|
|
|
|
|
Result: |
|
|
<SessionIDHeader xmlns="http://TrackService.TrackRoad.com/">
<SessionID>string</SessionID>
</SessionIDHeader> </soap12:Header> <soap12:Body>
<LoginResponse xmlns="http://TrackService.TrackRoad.com/">
<LoginResult> <Message>string</Message>
<Status>None or Success or
Failed or SuccessWithErrors</Status>
</LoginResult> </LoginResponse> </soap12:Body> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Logout
|
|
|
Use logout to end the session on the server. |
|
|
|
|
|
Result: |
|
|
<soap12:Body> <LogoutResponse
xmlns="http://TrackService.TrackRoad.com/" /> </soap12:Body>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Vehicle> <Name>string</Name>
<Email>string</Email>
<Group>string</Group> <Speed>int</Speed> <MaxStops>int</MaxStops> <MaxWeight>double</MaxWeight> <MaxSkids>int</MaxSkids> <MaxVolume>double</MaxVolume> <MaxMinutes>int</MaxMinutes> <OnTheRoad>boolean</OnTheRoad> <Tin>dateTime</Tin> <Tout>dateTime</Tout> <StartLocation
xsi:nil="true" /> <FinishLocation xsi:nil="true" />
</Vehicle>
<Location> <MatchCode>None
or Poor or Approx or
Good or Exact</MatchCode>
<Name>string</Name>
<Delivery>string</Delivery>
<Vehicle>string</Vehicle> <LatLong
xsi:nil="true" /> <Address xsi:nil="true" />
<Priority>int</Priority> <Wait>int</Wait> <Volume>double</Volume>
<Weight>double</Weight>
<Skids>int</Skids>
<TimeConstraintArrival>dateTime</TimeConstraintArrival>
<TimeConstraintDeparture>dateTime</TimeConstraintDeparture>
<LocationType>Midway or
Start or Finish or
Delivery</LocationType>
<CanArriveEarly>boolean</CanArriveEarly>
<Distance>double</Distance>
<Time>int</Time>
</Location>
<Address> <Street>string</Street>
<City>string</City>
<State>string</State> <PostalCode>string</PostalCode> <Country>string</Country> </Address>
LatLong> <Latitude>double</Latitude>
<Longitude>double</Longitude>
</LatLong>
<LocationType>Midway or
Start or Finish or
Delivery</LocationType>
<MatchCode>None or Poor
or Approx or Good or
Exact</MatchCode>
<DistanceUnit>Mile or
Kilometer</DistanceUnit>
<CalculateDistanceResult> <Distance>double</Distance>
<Time>int</Time>
</CalculateDistanceResult>
<CalculateRouteResult> <Route> <Distance>double</Distance> <Time>int</Time> <RouteLegs>
<RouteLeg xsi:nil="true" /> <RouteLeg xsi:nil="true" />
</RouteLegs> </Route>
</CalculateRouteResult>
<RouteOptions> <DistanceUnit>Mile
or Kilometer</DistanceUnit>
<RouteOptimize>MinimizeTime or
MinimizeDistance</RouteOptimize> </RouteOptions>
<Route> <Distance>double</Distance>
<Time>int</Time>
<RouteLegs> <RouteLeg xsi:nil="true" />
<RouteLeg xsi:nil="true" /> </RouteLegs> </Route>
<DispatchResult> <Items> <VehicleItem>
<Vehicle xsi:nil="true" /> <Locations
xsi:nil="true" /> </VehicleItem> <VehicleItem>
<Vehicle xsi:nil="true" /> <Locations
xsi:nil="true" /> </VehicleItem> </Items>
</DispatchResult>
<GeocodeResult> <Items> <GeocodeItem>
<Address xsi:nil="true" /> <Locations
xsi:nil="true" /> </GeocodeItem> <GeocodeItem>
<Address xsi:nil="true" /> <Locations
xsi:nil="true" /> </GeocodeItem> </Items>
</GeocodeResult>
|
|
|
|
|
|
|
|
|