This project is read-only.

Route Optimization - RouteSavvy Module

Author: OnTerra Systems

Category: Optimization

Module Size: 4 kb

Dependencies: JQuery, RouteSavvy key


In today’s economy, it is more important than ever that companies optimize and manage their supply chains more efficiently. Given today’s fuel costs, product delivery with high quality of service and short delay times is paramount; distribution accounts for a large proportion of the overall operational costs of a producer. Hence, effective and efficient management of transportation and distribution of goods is becoming increasingly important.

There are two challenges at work here, which actually directly conflict with each other:

  •  The First decision problem is to determine an optimal set of routes to the customers within a given geographical area, sometimes referred to as the “Travelling Salesman Problem (TSP)” (
  • The Second decision problem is to design an optimal schedule to satisfy customers’ demand based on THEIR schedules (Vehicle Routing Problem with Time Windows), which is a constraint on the first decision problem

These problems are generically known as Vehicle Routing Problems (VRP - The classical VRP consists in determining the best set of routes for a fleet of vehicles based at a single central depot to distribute goods to a set of customers geographically dispersed, while minimizing the total travel distance or the total distribution cost.

OnTerra Systems has developed RouteSavvy and RouteSavvy Module to address the first problem.

RouteSavvy is a simple but powerful tool that takes from just a few up to hundreds of locations that one may need to visit, and reorders them based on whether you'd like to visit them in a "round-trip" OR as a one-way trip - with the last stop chosen either by you or by the software (whichever is preferred).

Web developers can now easily integrate RouteSavvy API in their web application by adding RouteSavvy MapModule. The Map module is a Javascript script that uses Ajax to call RouteSavvy WebService to optimize a given set of locations. The RouteSavvy WebService requires the latitude and longitude of the locations.

The attached code sample demonstrates the usage of this Module. You need the following:

  1. A Bing Maps license, which can be obtained by signing up at
  2. A RouteSavvy Web Service license, which can be obtained by contacting OnTerra Systems:

The input parameter to the optimizer function are as follows

  • Parameter 1: The string of locations in format: LocationName_1,Latitude_1,Longitude_1!LocationName_2,Latitude_2,Longitude_2!.....
  • Parameter 2: The Name of the Start Location
  • Parameter 3: The Name of the End location (if end location is defined)
  • Parameter 4: Route Type

               The following route types are supported:

               1 : Round trip (Start location should be specified, end location empty string)

               2 : Fixed Start Fixed End (Start location should be specified, end location should also be specified)

               3 : Fixed Start Open End (Start location should be specified, end location empty string)

  • Parameter 5: RouteSavvy Key, which can be obtained from:
  • Parameter 6: Bing Key


Random locations:Random Locations

 Optimized Order (Round Trip)

Optimized Route


Last edited Jan 22, 2015 at 8:14 PM by rbrundritt, version 6


RogueLance May 29, 2015 at 8:07 PM 
Where is the code for this project? Am I just blind and not seeing it in the list of modules?