jungle-gif

50,000 maploads free every month. Get started now!

Simple Vehicle Routing Problem

Single depot & multiple drop locations use case.

Note : This is an older version of the Vehicle Routing Api, and will be removed in the upcoming releases.

Request

The JSON Object that is to be sent along with the generated API-Key. This object consists of the information about the services and the fleets with some additional parameters which are used to control the overall functionality of the problem.

Services

Parameters to be used while defining the 'service'.

Name Type Description
id string The identification parameter defined for each service
lat double The latitude of the service location
lng double The longitude of the service location
startTime (optional) integer The time after which the service should be performed [0, 2400) (eg. 930 means 9:30 AM)
endTime (optional) integer The time before which the service is to be performed [0, 2400) (eg. 2350 means 11:50 PM)
duration (optional) integer Time the service will take to be completed (eg. 10 means 10 minutes of service time)
load (optional) integer Load/demand to be served.(Unitless but it should be in same measure of capcity of fleet)
name (optional) string Name of service. Optional identification parameter
priority (optional) string "high", "medium", "low" (case is not important)

Fleets

Parameters to be used while defining the 'fleet' (Vehicle).

Name Type Description
lat double The latitude of the starting location of the vehicle
lng double The longitude of the starting location of the vehicle
latEnd (optional) double The latitude of the end location of the vehicle
shiftStart (optional) integer The time when the vehicle will start its shift (e.g. 1300 means vehicle will take task after 1 PM)
shiftEnd (optional) integer The time after which the vehicle won't perform any more task (e.g. 2200, means vehicle will not perform tasks after 10 PM)
returnToStart integer 1, if its mandatory to return to depot. 0, if its not mandatory to return to depot. Default is 0
capacity (optional) integer capacity of vehicle (weight/volume etc) but load of services also to be in same measure
fuelCostPerKm (optional) double This is the cost per distance unit(Km). This can be distance dependent variable cost per unit of distance. Default is 10 INR/KM. We suggest to give realistic values for better results.
hourlyWage (optional) double This is the cost per transport time unit(hr). This can be transport time dependent variable cost per unit of time. Default is 100 INR/HR. We suggest to give realistic values for better results.
fixedCost (optional) double Fixed cost of vehicle.
numVehiclesAtDepot (optional) integer Number of vehicles of this type at this depot. Default is 1. You have option to send your vehicles implicitly. In case this option is chosen with >1 then it creates vehicles of this type numbering from #[0,numVehiclesAtDepot-1] and output will be changed id_#. We suggest explicit way in which define each vehicle at each depot with its own id.

Optional Params

These parameters can be added in addition to the above cumpolsory parameters in order to create restrictions.

Name Type Description
speed (optional)integerspeed in Km/hr, same for all the fleets globally, default 40 Km/hr
maxVisits (optional) integerThe maximum number of tasks that a vehicle can perform
decideFleetSize (optional) booleansend 1 if you don't know how many vehicles are required to solve(means, fleet size is considered infinite). 0 if you want to solve the problem in the given fleet size (fleet Size is considered finite). Default is 0
polylines (optional) boolean When true this parameter returns the coded polylines that can be further used to plot the road directions of each fleet
distanceCalculation (optional) boolean When true this parameter returns the total distance and time taken by all the fleets according to google maps
detourFactor (optional) double Approximated Distance/displacement factor. Default is 1.0 . it should always be suplied more than 1.0 . Suggestion more than 1.3 for realistic situation. More congestion in a city more the detour.

Response

The JSON response generated for the above request.

Name Type Description
noOfRoutes integer The number of routes all the fleets have to take in order to complete all the tasks
unassignedJobs list The service ID's of all the tasks which are not completed.
totalJobs integer The total number of services to be performed
totalTimeTaken (in seconds) double The total time taken by all the fleets to complete all the tasks in seconds
maxTimeTaken (in seconds) double The time by which all the tasks will be completed if all the fleets start at the same time.
totalDistanceTravelled (in meters) double The total distance covered be all the fleets in meters.
status string 'success' if all the tasks are served and 'failure' if any one of them remains unserved.
solutions list The list of all the fleets mapped to the services that they performed

Let's find a way together

Get in touch to know about our Pricing Plans

Contact Us