Skip to content
/ evnav Public
forked from giraldeau/evnav

evnav: open-source electric vehicule trip planner

Notifications You must be signed in to change notification settings

z1ga/evnav

 
 

Repository files navigation

EvNav: Electric Vehicule Routing

EvNav computes a charging plan for long distance travel in electric vehicle.

EvNav Screenshot

Video Online service

Community

Compiling

Requirements:

QHttp is included under 3rdparty directory as git submodule. After checkout, use git submodule update --init --recursive to fetch the dependencies. The library will be compiled automatically.

QtCreator is recommended.

Command line shadow build steps:

cd evnav/
mkdir build/
cd build/
qmake -qt=qt5 ../evnav.pro PREFIX=/opt
make
INSTALL_ROOT=$PWD/sysroot make install

The PREFIX variable defines the install path for library and executables. The default value is /usr/local. The INSTALL_ROOT is prepended at install time, commonly used for packaging.

Running

To run the program, you need a charger list. The example uses the chargers from the Circuit Electrique and therefore requires the Quebec OSM data.

Perform osrm-extract and osrm-prepare on the map, as documented here.

The evnav program shows the result directly on the command line. The following shows an example for a trip from Montreal to Quebec city:

evnav <data.osrm> <chargers.json> --src=-73.57225,45.53847 --dst=-71.28751,46.79206 --verbose

chargers loaded: 585
fast chargers: 26
done
energy required  :  43.92 kWh
energy start     :  18 kWh
energy on the way:  25.92 kWh
charging min_stops: 2
charging min_time : "0:34"
graph size: 88
{
    "charging_steps": [
        {
            "charging_cost": 1.8000000715255737,
            "charging_duration": 648.00002574920654,
            "energy": 8.1000003218650818,
            "location": [
                -73.004480000000001,
                46.195441000000002
            ],
            "name": "BRCC - Aire de service de la Baie-de-Maskinongé"
        },
        {
            "charging_cost": 2.3200000921885171,
            "charging_duration": 835.20003318786621,
            "energy": 10.440000414848328,
            "location": [
                -72.554479999999998,
                46.370328000000001
            ],
            "name": "MTQ - Trois-Rivières (Cap-de-la-Madeleine)"
        },
        {
            "charging_cost": 2.4400000969568887,
            "charging_duration": 878.40003490447998,
            "energy": 10.980000436306,
            "location": [
                -71.996449999999996,
                46.639682999999998
            ],
            "name": "MTQ - Restaurant Le Chavigny - Deschambault"
        }
    ],
    "code": "Ok",
    "message": "reachable",
    "route_summary": {
        "charging_cost": 6.5600002606709795,
        "charging_duration": 2361.6000938415527,
        "distance": 257657,
        "driving_duration": 10757,
        "duration": 13118.600093841553,
        "energy": 46.080001831054688
    }
}

There exists a web service backend for the evnav branch of osrm-frontend. The parameters are encoded in the URL and the result is returned as JSON string.

# Start the server
evnav-srv <data.osrm> <chargers.json>

# Make request
wget -O result.json 'http://localhost:8080/route/v1/evnav/-73.487548828125,45.62172169252446;-71.35894775390625,46.803819640791566?battery=21&SOC_act=1.0&SOC_min=0.1&SOC_max=0.8&efficiency=0.190&power_avg=33.0'

Supported parameters:

  • battery: usable capacity in (kWh)
  • SOC_act: State Of Charge at start
  • SOC_min: Minimum State Of Charge
  • SOC_max: Maximum State of Charge when fast-charging
  • efficiency: energy consumption of the vehicle (Wh/km)
  • power_avg: Fast chaging average power (kW)

Limitations and disclaimer

The algorithm is based on a simple Dijkstra shortest path. The graph is a complete digraph between all chargers, the source, and the destination. The edge weight includes the travel time, the charging time and a small overhead for the stop at the charger, which tends to minimize the total number of stops. This naive prototype won't scale well to large number of chargers.

The tool does not take into account the elevation, the weather, the battery wear of the vehicle and your own driving habits. Adjust the parameters to take into account these factors. In particular, the trip computation assumes the driver respects speed limits at all time. Driving over the speed limit, particularly on the highway, will use much more energy and reduce the range of the vehicle.

If you know the terrain is hilly, increase the SOC_min battery reserve (for instance, 20% should be enough to climb any mount in Quebec ~1000m). While driving, if the real range is below the expected range, the most effective ways to reduce energy consumption is to slow down, turn off heating and air conditioning.

Always be on the safe side, have a plan B, such as a CAA membership for towing to the nearest available charger.

THE EVNAV PROJECT IS AN EXPERIMENTAL ALPHA PROTOTYPE PROVIDED WITHOUT ANY WARRANTY. USE THE RESULTING CHARGING PLAN AT YOUR OWN RISK. YOU ARE RESPONSIBLE FOR ADJUSTING THE PLAN ACCORDING TO THE ACTUAL CHANGING ROAD CONDITIONS. IN DOUBTS, BE SAFE AND USE ANOTHER MODE OF TRANSPORTATION.

License

This software is release under the MIT license.

About

evnav: open-source electric vehicule trip planner

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 62.3%
  • Python 8.9%
  • Makefile 7.5%
  • CMake 7.0%
  • Dockerfile 4.9%
  • Shell 4.8%
  • QMake 4.6%