Power Laws: Optimizing Demand-side Strategies
For more about this repository, see the competition page:
Flexibility can be defined as "the ability of a resource, whether any component or collection of components of the power system, to respond to the known and unknown changes of power system conditions at various operational timescales".1 The exploitation of flexibility is essential to avoid costly reinforcements of the power system and maintain security of supply while increasing the penetration of renewable (and intermittent) sources of energy.
Flexibility can be produced in different manners. It might come from generation options, from energy storage or from energy demand. In some cases, generation can also be proposed through alternative dispatchable assets such as Combined Heat and Power (CHP). Storage is valid for both electricity and heat. Energy storage is an easy way to increase building flexibility, provided there is a business case for such an investment. The present challenge is focused on making a good usage of an installed storage system.
Viewed from the demand side, in the case of smart buildings, time of use tariffs incite to use energy when it is the most available. Given such a tariff, the goal is to buy more energy when its price is the lowest, and buy less (or possibly sell) energy when its price is the highest.
The goal in this competition is to build an algorithm that controls a battery charging system and spends the least amount of money over a simulation period.
|Place||Team or User||Score||Summary of Model|
|1||VietNam national ORlab||-0.201322||We considered the problem as a dynamic optimization problem. The problem at each step was modeled as a linear programming (LP). We selected Ortools to solve LP model optimally because it seemed to be the fastest and easy to install on docker.|
|2||ironbar||-0.199243||My solution is based on simplificatoin of the period, dynamic programming, and intelligent pruning of the actions.|
|3||Helios||-0.198155||Formulate a linear programming model for the optimization problem at each step with forecast data and use an open-source tool, which can be installed by pip to solve it. Scatter the energy charged (or discharged) among steps to avoid buying superfluous energy due to the uncertainty of next forecasts.|
- Python 3.6 (for local execution instead of on Docker)
This repository contains the example implementation for how the optimization challenge code will be executed at the end of the competition. Competitors are required to only implement a single method
propose_state within the file
This code exists to make it easy for competitors to test their solutions.
Running the simulation
- Clone this repository
- Add the data from the competition to the
datafolder. The script expects a folder named
submitand a file called
- Copy your implementation of
- Execute the run script:
- Your results will be stored and timestamped in the
all_resultsfolder each time you execute
outputwill be overwritten on each subsequent run.)
Note for Windows Users: We will accept a pull request with a
run.bat script that works on Windows machines.
The only supported execution is within Docker. However, if you want to run the Python code locally rather than in a Docker container, you can still use the
entrypoint.sh script on unix based system. You may need to install
coreutils on your system in order to use the
timeout command. For OSX you can run
brew install coreutils and then update
entrypoint.sh to call
gtimeout instead of
timeout. Windows users will need to create their own script, although for basic purposes just running
python simulate/simulate.py should be sufficient.
Making a submission
For the public leaderboard
The public leaderboard just presents the mean of your results so far. Simply submit the most recent results from the
You are required to submit your code in order to be considered for a prize. To do so, you must create a
zip archive containing ONLY the
assets folder and the
battery_controller.py file. These are the only components you may submit. Other folders and files will be ignored. Instructions for submitting are on the competition page.
Structure of this repo
||A directory that has all of the input data as
||A directory for storing the output of a single simulation run.|
||This directory contains results from all of the runs executed.|
||The Python code for the simulation.|
||A FOLDER FOR ANY TRAINED MODELS/DATA THAT NEEDS TO BE LOADED BY
||Contains an object for storing information about the battery.|
||Main entrypoint. Controls and executes the simulations.|
||THIS FILE SHOULD BE IMPLEMENTED BY COMPETITORS|
||The definition for the Docker container on which the simulation executes.|
||About the project.|
||Called inside the container to execute the simulation. Can also be used locally.|
||The Python libraries that will be installed. Only the libraries in this official repo will be available.|
||The only command you need. Builds and runs simulations in the Docker container.|