A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

SpiceEV

Simulation Program for Individual Charging Events of Electric Vehicles.
https://github.com/rl-institut/spice_ev

Category: Consumption
Sub Category: Mobility and Transportation

Keywords from Contributors

oemof energy-system modelling-framework

Last synced: about 8 hours ago
JSON representation

Repository metadata

Simulation Program for Individual Charging Events of Electric Vehicles

README.md

SpiceEV - Simulation Program for Individual Charging Events of Electric Vehicles

Simulation program to generate scenarios of electric vehicle fleets and simulate different charging strategies.

Build Status Documentation Status

Introduction

SpiceEV is a program to simulate different charging strategies for a defined set of vehicles and corresponding trips to and from charging stations. The output shows load profiles of the vehicle battery, the corresponding charging station, the grid connector as well as the electricity price and, if applicable, stationary batteries. Each vehicle is by default connected to a separate charging station. All charging stations of one location can be connected to one grid connector with a defined maximum power. Some charging strategies only allow for one grid connector, please check charging strategies for more information.

The first step of SpiceEV is to generate a scenario.json. The scenario.json contains information about the vehicles and their specific attributes (e.g. battery capacity, charging curve, etc.) as well as their trips from and to a specific charging station (so-called vehicle events). Further, the charging stations attributes, such as its maximum power, the attached grid connector and the according electricity price are defined. Depending on the scenario, a certain foresight can be applied for grid operator signals. If applicable, stationary batteries with according capacities and c_rates can be defined and fixed load profiles or local generation time series attached to a grid connector can be imported from CSV files. The input scenario.json can be generated by one of the generate scripts.

Documentation

The full documentation can be found here

Installation

Clone this repository. SpiceEV just has an optional dependency on
Matplotlib. Everything else uses the Python (>= 3.6) standard library.

To install spice_ev as a package run:

pip install -e .

Run Examples

In order to run a simulation with simulate.py a scenario JSON has to be generated first using generate.py.
For this three modes are available:

  • statistics Generate a scenario JSON with trips from statistical input parameters.
  • csv Generate a scenario JSON with trips listed in a CSV.
  • simbev Generate a scenario JSON from SimBEV results.

Show all command line options:

python generate.py -h
python simulate.py -h

Quick Start

Generate a scenario and store it in a JSON. By default, the mode statistics is used.

python generate.py --output scenario.json

Run a simulation of this scenario using the greedy charging strategy and show
plots of the results:

python simulate.py scenario.json --strategy greedy --visual

Using Configuration Files

There are example configuration files in the folder examples. The required input/output must still be specified manually:

python generate.py --config examples/configs/generate.cfg
python simulate.py --config examples/configs/simulate.cfg

Generating Scenarios

Generate a 7-day scenario with 10 vehicles of different types and 15 minute timesteps:

python generate.py --days 7 --vehicles 6 golf --vehicles 4 sprinter --interval 15 --output scenario.json

Including external Timeseries

Include a fixed load in the scenario:

python generate.py --include-fixed-load-csv fixed_load.csv --output scenario.json

Please note that included file paths are relative to the scenario file location. Consider this directory structure:

├── scenarios
   ├── price
   │   ├── price.csv
   ├── my_scenario
   │   ├── fixed_load.csv
   │   ├── scenario.json

The file fixed_load.csv is in the same directory as the scenario.json, hence no relative path is specified.
To include the price and fixed load timeseries:

python generate.py --include-price-csv ../price/price.csv --include-fixed-load-csv fixed_load.csv --output scenario.json

Adding a Schedule to a Scenario

Calculate and include schedule:

python generate_schedule.py --scenario scenario.json --input examples/data/grid_situation.csv --output schedules/schedule_example.csv

Integrating SimBEV

SpiceEV supports scenarios generated by the SimBEV tool. Convert SimBEV output files to a SpiceEV scenario:

python generate.py simbev --simbev /path/to/simbev/output/ --output scenario.json

License

SpiceEV is licensed under the MIT License as described in the file LICENSE


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 6 days ago

Total Commits: 1,281
Total Committers: 14
Avg Commits per committer: 91.5
Development Distribution Score (DDS): 0.56

Commits in past year: 32
Committers in past year: 2
Avg Commits per committer in past year: 16.0
Development Distribution Score (DDS) in past year: 0.063

Name Email Commits
stefan.schirmeister s****r@l****e 563
Piranias i****h@r****e 220
Jakob Gemassmer J****r@r****e 144
Paul Boehnke p****e@r****e 135
TabeaMaria t****u@g****m 78
Johannes Hofmann m****l@b****g 56
jtm91 j****1@m****e 35
Moritz Schiel m****l@g****t 24
nesnoj j****e@r****e 13
leon-rli l****h@r****e 5
Paul Böhnke R****e@r****l 3
paul.scheer P****r@r****e 2
stefansc1 3****1 2
Paul p****e@o****e 1

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 49
Total pull requests: 93
Average time to close issues: 5 months
Average time to close pull requests: 17 days
Total issue authors: 8
Total pull request authors: 8
Average comments per issue: 0.69
Average comments per pull request: 0.2
Merged pull request: 82
Bot issues: 0
Bot pull requests: 0

Past year issues: 1
Past year pull requests: 4
Past year average time to close issues: N/A
Past year average time to close pull requests: about 1 month
Past year issue authors: 1
Past year pull request authors: 1
Past year average comments per issue: 0.0
Past year average comments per pull request: 0.25
Past year merged pull request: 4
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/rl-institut/spice_ev

Top Issue Authors

  • jakobgemassmer (24)
  • Piranias (13)
  • j-ti (6)
  • j-brendel (2)
  • mosc5 (1)
  • nesnoj (1)
  • stefansc1 (1)
  • paulboehnke (1)

Top Pull Request Authors

  • stefansc1 (55)
  • jakobgemassmer (13)
  • j-ti (7)
  • TabeaMaria (6)
  • paulboehnke (5)
  • Piranias (4)
  • mosc5 (2)
  • PaulScheerRLI (1)

Top Issue Labels

  • enhancement (23)
  • low prio (8)
  • invalid (8)
  • high prio (7)
  • question (6)
  • documentation (3)
  • nice to have (3)
  • wontfix (2)
  • testing (1)
  • bug (1)

Top Pull Request Labels

  • enhancement (5)
  • documentation (3)

Dependencies

.github/workflows/pythonpackage.yaml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
doc/requirements.txt pypi
  • sphinx >=1.4.3
  • sphinx_rtd_theme *
setup.py pypi

Score: 6.467698726104354