Skip to content
/ VRP Public

Java application to solve Vehicle Routing Problem

Notifications You must be signed in to change notification settings

vishpat/VRP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

A simple Java REST service for solving Vehicle Routing Problem. The service finds an optimal path for a vehicle starting from a depot and delivering goods to different customer locations. The REST serivce is built using SpringBoot and utilizes Optaplanner and Google Geolocation API. The Google GeoLocation API is used to determine the latitude and longitude of the customer location while Optaplanner is used to determine the optiomal delivery path.

Requirements

Build

git clone https://github.com/vishpat/VRP
mvn package

Run

export GOOGLE_MAPS_API_KEY=<Google Geolocation API key>
java -jar target/vrp-0.0.2-SNAPSHOT.jar

Usage

Sample Json Input

  {
 "customerLocations":[
    "Customer Address 1",
    "Customer Address 2",
    "Customer Address 3",
    "Customer Address 4",
    "Customer Address 5",
 ],
 "depot":"Depot Address",
}

The output is Json array of sorted addresses. sample_client.py provides an example of how to use the REST api.

About

Java application to solve Vehicle Routing Problem

Resources

Stars

Watchers

Forks

Packages

No packages published