The Electric Vehicle Range Prediction Project is a piece of software that uses various services and data to make route predictions based on energy consumption.
Now that all dependencies have been downloaded, simply navigate to where the code is saved, use your favorite shell and run 'jupyter notebook'. This will open up a web browser with all the code to run.
The Config.py requires the package python-dotenv
. In the root level of the application a .env
file will need to be created like this:
GOOGLE_MAPS_KEY=GOOGLE MAPS ELEVATION API KEY
WEATHER_KEY=OPEN WEATHER API KEY
TRAFFIC_KEY=TOMTOM API KEY
See the documentation on python-dotenv
for more details.
A sample Jupyter notebook (main.ipynb) is included to show example usage of the EVPRE software.
To configure the EVPRE software, modify config.py with the relevant vehicle and environment data.
See the models README.md for more information on each model and its parameters.
For example, to utilize the simple energy model,
route_estimator_simple_model = RouteEstimator(Config())
route_estimator_simple_model.activate_energy_model()
route_map_simple_e = route_estimator_simple_model.create_map()
route_map_simple_e
Creates a map where a user can find the most efficient route between two markers.
To generate an isochrone with the given parameters,
range_estimator_simple_model = RangeEstimator(Config(), route_estimator_simple_model.get_graph())
range_estimator_simple_model.generate_isochrone()
See the models README.md
-
To install all of the required packages:
pip install -r requirements.txt
-
To install fastsim: Navigate to the directory (example: fastsim-2021a) that contains the fastsim source code. Run
pip install .
to install it to your pip. -
Make sure you have installed python-dotenv using
pip install python-dotenv
. -
Make sure
networkx
andosmnx
are installed to your pip. -
Make a
.env
file in the root containing the keys like above. -
After everything is installed, run
jupyter-lab
in the root directory of the application. This should open a jupyter notebook. The main examples are inmain.ipynb
.