Giter VIP home page Giter VIP logo

charge's Introduction

Charge

Charge is a route planner for electric vehicles that uses a realistic consumption model based on driving speed and slope, and a realistic charging model to compute time optimal routes. Charge uses C++17 and depends on libosmium for parsing OSM data in .osm.pbf format. To easily compute and display routes Charge includes a HTTP server based on web++.hpp. The web frontend is based on React and Mapbox GL JS.

Build

You will need GCC 7 and above to compile charge:

mkdir build
cd build
cmake ..
make

Data

Charging stations

We accept charging stations as GeoJSON file with feasures of the following format:

{
    "type": "Feature",
    "properties": {
        "rate": 120000.0
    },
    "geometry": {
        "type": "Point",
        "coordinates": [10.040342, 47.880344]
    }
}

Where rate needs to be the charging rate in watt. We provide a script scripts/download_tesla.py that can be used to download Tesla charging station data from their website.

Elevation data

You can use ./scripts/srtm_download.py to download SRTM elevation data tiles from OpenTopo and place them in data/srtm.

mkdir -p data/srtm
# Download SRTM tiles for switzerland
./scripts/srtm_download.py 5,45,11,48 ./data/srtm

Run

Make sure you placed your dataset in data/graphs/${DATASET}.osm.pbf and the SRTM tiles in data/srtm. Prepare data and start the server using:

DATASET=${DATASET} make run

For example to setup OSM switzerland from Geofabrik do:

mkdir -p data/graphs
wget http://download.geofabrik.de/europe/switzerland-latest.osm.pbf -O data/graphs/switzerland.osm.pbf
mkdir -p data/srtm
./scripts/srtm_download.py 5,45,11,48 ./data/srtm
CAPACITY=32000 DATASET=switzerland make run

Frontend

Example Query

To start the frontend you will need to have npm installed:

cd frontend
npm install
npm run start

API Documentation

See the full HTTP API dpcumentation.

charge's People

Contributors

themarex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.