Skip to content

kishor-bhatt/HereWeCome-Hackathon2020

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HereWeCome-Hackathon2020

Introduction

It's a Multi Vehicle Waypoint (MVW) Sequencing application for finding optimal route for multiple vehicles, multiple pickups scenarios.

How to run the application

To run the application, you need to have python installed. Once that is installed (https://www.python.org/downloads), run below command from the web application directory.

$cd web-mwv
$python -m SimpleHTTPServer 8080

Hackathon2020 BackEnd Service

Setup BackEnd-Service

To run this project, install it locally using npm:

$ cd mwv
$ mvn clean install 
$ mvn spring-boot:run

Endpoint - http://localhost:8080/api/getRoute/

sample request body like below

{ 
   "vehcile":[ 
      { 
         "id":"001",
         "number":"001",
         "routes":{ 
            "positionReferenceMap":{ 
               "1":{ 
                  "lat":13.0708,
                  "lng":77.6189,
                  "ref":"2"
               },
               "2":{ 
                  "lat":12.937179,
                  "lng":77.626828,
                  "ref":"3"
               },
               "3":{ 
                  "lat":13.03439,
                  "lng":13.6122,
                  "ref":"4"
               }
            }
         }
      },
      { 
         "id":"002",
         "number":"002",
         "routes":{ 
            "positionReferenceMap":{ 
               "1":{ 
                  "lat":13.3121,
                  "lng":13.6122,
                  "ref":"2"
               },
               "2":{ 
                  "lat":13.03439,
                  "lng":13.6122,
                  "ref":"3"
               }
            }
         }
      }
   ]
}

Sample response like below

{ 
   "destination":"Here Techologies Bangalore",
   "vehicles":{ 
      "count":3,
      "type":"car",
      "vehicle":[ 
         { 
            "id":"001",
            "lattitude":"13.0408",
            "longitude":"76.61843",
            "capacity":3
         },
         { 
            "id":"002",
            "lattitude":"13.3232",
            "longitude":"75.6184",
            "capacity":2
         }
      ]
   },
   "assets":{ 
      "type":"human",
      "size":4,
      "asset":[ 
         { 
            "assetId":"0001",
            "lat":"12.937179",
            "long":"77.626828",
            "time":"28/01/2020 06:00:00"
         },
         { 
            "assetId":"0002",
            "lat":"13.0708",
            "long":"77.6189",
            "time":"28/01/2020 06:00:00"
         },
         { 
            "assetId":"0003",
            "lat":"13.03439",
            "long":"13.6122",
            "time":"28/01/2020 06:00:00"
         },
         { 
            "assetId":"0004",
            "lat":"13.3121",
            "long":"13.6122",
            "time":"28/01/2020 06:00:00"
         }
      ]
   }
}