Skip to content

Redy1908/GreenWay-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents
  1. About The Project
  2. Architecture
  3. Getting Started
  4. Example
  5. Keycloak
  6. License

About The Project

This is the backend of GreenWay. GreenWay optimizes the routes for a fleet of electric vehicles, taking into account their load capacity, range, courier work shifts, and terrain elevation. By considering terrain elevation, GreenWay generates more efficient routes for electric vehicles, taking advantage of their ability to recharge batteries during downhill travel. GreenWay solves a variant of the Travelling Salesman Problem, the Vehicle Routing Problem. Deliveries are organized in such a way that a vehicle can deliver its load and return to the depot within the courier’s end-of-shift time, without the need for recharging breaks see the example.

Built With

SpringBootProject OSRMKeycloackJavaDocker

(back to top)

Architecture

System

database

(back to top)

Database

database

(back to top)

Getting Started

Setting up the REST API is as easy as running a simple command

Prerequisites

Make sure to install the following dependencies

Run

Within the root folder execute:

   docker compose up -d

(back to top)

Example

Let’s consider a fleet of three vehicles, all waiting at the depot (withe dot on the map) and 11 deliveries (yellow dots on the map):

map

Suppose that inside our fleet of three vehicles we have one vehicle capable of doing all the deliveries in one take the algorithm output will be:

map1

Now let's limit the number of deliveries for the three vehicles to 4:

map2

(back to top)

Keycloak

⚠️ This set up is only for development/prototyping DO NOT use it in production ⚠️

GreenWay uses KeyCloak as its Identity and Access Management (IAM) system. A pre-configured realm and the following users are already configured:

Username: admin
Password: admin
KeyCloak default admin
Username: GREEN_WAY_ADMIN
Password: 12345
with GREEN_WAY_ADMIN ROLE
Username: deliverymanX where X can be 1-2-3-4-5
Password: 12345
with GREEN_WAY_DELIVERY_MAN ROLE

If you want to edit the Keycloak configuration or add new users, access the KeyCloak dashboard using the default admin profile.

(back to top)

License

This project is licensed under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) License - see the LICENSE file for details.

(back to top)