Giter Site home page Giter Site logo

indyfree / fleetsim Goto Github PK

View Code? Open in Web Editor NEW
27.0 3.0 6.0 32.88 MB

Event-based Simulation for Electric Vehicle Fleets

Makefile 0.07% Python 4.27% Jupyter Notebook 95.62% Shell 0.04%
electric-vehicles simpy reinforcement-learning event-based simulation

fleetsim's Introduction

CircleCI Code style: black

FleetSim

An event-based electric vehicle fleet charging simulation to create virtual power plants in smart sustainable markets.

Requirements

  • python 3.6 or higher
  • GNU make

Installation

This project is intended to run on Mac or Linux. On Windows it should also work via the Linux Subsystem.

Clone the Repository

> git clone https://github.com/indyfree/evsim

Install required Packages

Installs virtual environment and dependencies with pip:

> make requirements

Run Jupyter Notebooks

> make jupyter

Preprocess the Data

Note: Not all the data are freely accessible. Contact me if you need access.

> evsim build --help
Usage: evsim build [OPTIONS] COMMAND [ARGS]...

  (Re)build data sources.

Options:
  --help  Show this message and exit.

Commands:
  all               (Re)build all data sources.
  balancing-prices  (Re)build balancing price data.
  intraday-prices   (Re)build intraday price data.
  mobility-demand   (Re)build mobility demand data.
  trips             (Re)build car2go trip data.

Run the simulation

Available parameters:

> evsim simulate --help
Usage: evsim simulate [OPTIONS]

  Start the EV Simulation.

Options:
  -c, --ev-capacity FLOAT           Battery capacity of EV in kWh.  [default:
                                    17.6]
  -i, --industry-tariff INTEGER     Flat industry tariff, which the fleet can
                                    charge regularly.  [default: 150]
  -s, --charging-speed FLOAT        Charging power in kW.  [default: 3.6]
  --charging-strategy               [regular|balancing|intraday|integrated]
                                    Charging strategy  [default: regular]
  -a, --accuracy <INTEGER INTEGER>  Prediction accuracy.  [default: 100, 100]
  -r, --risk <FLOAT FLOAT>...       Bidding risk [default: 0.0, 0.0]

E.g.:

> evsim --name=intraday --debug simulate --charging-strategy=intraday
--- Simulation Settings: ---
Debug is on.
Writing Logs to file is on.
Maximal EV range is set to 160km.
EV battery capacity is set to 17.6kWh.
Charging speed is set to 3.6kW.
Industry electricity tariff is set to 250EUR/MWh.
Refusing rentals is set to off.
--- Starting Simulation: ---
INFO    ---- STARTING SIMULATION: intraday -----
INFO    [2017-02-23 00:00:00] - ---------- TIMESLOT 2017-02-23 00:00:00 ----------
INFO    [2017-02-23 00:00:00] - S-GO2459(78.00/100) Added to fleet!
INFO    [2017-02-23 00:00:00] - S-GO2450(66.00/100) Added to fleet!
INFO    [2017-02-23 00:00:00] - S-GO2293(99.00/100) Added to fleet!
INFO    [2017-02-23 00:00:00] - Controller(intraday) Bought 18.00 kW for -37.90 EUR/MWh for 15-min timeslot 2017-02-23 00:30:00
INFO    [2017-02-23 00:00:00] - Controller(intraday) Charge 1.30 EUR cheaper than with industry tariff. Current balance: 1.30 EUR.
INFO    [2017-02-23 00:00:00] - Controller(intraday) Consumption plan for 2017-02-23 00:00:00: 0.00kW, required EVs: 0.
INFO    [2017-02-23 00:00:00] - Controller(intraday) Charging 0/0 EVs from consumption plan.
INFO    [2017-02-23 00:00:00] - Controller(intraday) Charging 0/0 EVs regulary.
INFO    [2017-02-23 00:00:00] - S-GO2459(78.00/100) Starting trip 0.
INFO    [2017-02-23 00:00:00] - S-GO2450(66.00/100) Starting trip 1.
INFO    [2017-02-23 00:00:00] - S-GO2293(99.00/100) Starting trip 2.
...
INFO    [2017-02-23 07:45:00] - ---------- TIMESLOT 2017-02-23 07:45:00 ----------
INFO    [2017-02-23 07:45:00] - S-GO2555(100.00/100) Added to fleet!
INFO    [2017-02-23 07:45:00] - Controller(intraday) Bought 54.00 kW for 36.00 EUR/MWh for 15-min timeslot 2017-02-23 08:15:00
INFO    [2017-02-23 07:45:00] - Controller(intraday) Charge 2.89 EUR cheaper than with industry tariff. Current balance: 137.73 EUR.
INFO    [2017-02-23 07:45:00] - Controller(intraday) Consumption plan for 2017-02-23 07:45:00: 61.20kW, required EVs: 17.
INFO    [2017-02-23 07:45:00] - Controller(intraday) Charging 18/20 EVs from consumption plan.
INFO    [2017-02-23 07:45:00] - Controller(intraday) Charging 2/20 EVs regulary.
INFO    [2017-02-23 07:45:00] - S-GO2333(95.00/100) Starting trip 382.
INFO    [2017-02-23 07:45:00] - S-GO2651(88.93/100) Starting trip 383.
INFO    [2017-02-23 07:45:00] - BALANCING(68.4kW/61.2kW) Removed EV S-GO2651 from VPP.
INFO    [2017-02-23 07:45:00] - BALANCING(64.8kW/61.2kW) Removed EV S-GO2463 from VPP.
INFO    [2017-02-23 07:45:00] - S-GO2651(88.93/100) Charging interrupted! Customer wants to rent car
INFO    [2017-02-23 07:45:00] - S-GO2463(95.36/100) Charging interrupted! Customer wants to rent car

Autocompletion

Activate autocompletion by sourcing the according completion file:

> source ./completion_zsh.sh

fleetsim's People

Contributors

indyfree avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

fleetsim's Issues

apply for data

hello, I am studing on RL alg on VPP,

could you please tell me how to get the data your program used?

best regards!

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.