An EV smartgrid python simulation based on real PV, and user profiles.
This project uses Python 3.9 along with venv. To set up virtual environment :
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtpython -m venv .venv
.\.venv\Scripts\activate
pip install -r requirements.txtThe weather data file should be downloaded from PV-GIS using the hourly data tool with the two-axis option. Remove the first 8 lines from the downloaded CSV so that it changes from this:
"Latitude (decimal degrees): 49.102"
"Longitude (decimal degrees): 2.091"
"Elevation (m): 89"
"Radiation database: PVGIS-SARAH3"
Slope: - deg.
Azimuth: - deg.
time,G(i),H_sun,T2m,WS10m,Int
20210101:0010,0.0,0.0,-1.8,1.66,0.0to this :
time,G(i),H_sun,T2m,WS10m,Int
20210101:0010,0.0,0.0,-1.8,1.66,0.0The file can then be renamed (e.g., WEATHER_2020.csv) and placed inside the data/ folder.
The traffic data file should be downloaded from AVATAR, simply select a sensor
and download the flow rate (
Horodate,Mrm50.31,Mrm50.32,Moyenne,Somme
2025-07-01T00:00:00+02:00,103,94,98.5,197
The file can then be renamed (e.g., TRAFFIC_2020.csv) and placed inside the data/ folder.
It is recommended to have at least three years of data at an hourly resolution for both traffic and weather.
Ensure you have a local jupyter notebook setup and running. Use the file located in notebooks to play with the
simulator. It is recommended to use the local virtualenv created before in order to run without any bugs the
notebooks. You can try your installation with the jupyter/visualizing/EditTraffic.ipynb one.