Code Monkey home page Code Monkey logo

power-laws-optimization's Introduction

Power Laws: Optimizing Demand-side Strategies

For more about this repository, see the competition page:

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 battery_controller.py.

This code exists to make it easy for competitors to test their solutions.

Requirements

  • Docker
  • Python 3.6 (for local execution instead of on Docker)

Running the simulation

  1. Clone this repository
  2. Add the data from the competition to the data folder. The script expects a folder named submit and a file called metadata.csv in the data directory.
  3. Copy your implementation of battery_controller.py into simulate/battery_controller.py
  4. Execute the run script: ./run.sh
  5. Your results will be stored and timestamped in the all_results folder each time you execute run.sh (Note: results.csv in output will 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 all_results folder.

Code submission

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

File Description
├── data A directory that has all of the input data as .csvs that are provided by the competition. Competitors must add the data themselves after downloading it from the competition.
├── output A directory for storing the output of a single simulation run.
├── all_results This directory contains results from all of the runs executed.
├── simulate The Python code for the simulation.
· ├── assets A FOLDER FOR ANY TRAINED MODELS/DATA THAT NEEDS TO BE LOADED BY battery_controller.py
· ├── battery.py Contains an object for storing information about the battery.
· ├── simulate.py Main entrypoint. Controls and executes the simulations.
· └── battery_controller.py THIS FILE SHOULD BE IMPLEMENTED BY COMPETITORS
├── Dockerfile The definition for the Docker container on which the simulation executes.
├── README.md About the project.
├── entrypoint.sh Called inside the container to execute the simulation. Can also be used locally.
├── requirements.txt The Python libraries that will be installed. Only the libraries in this official repo will be available.
└── run.sh The only command you need. Builds and runs simulations in the Docker container.

power-laws-optimization's People

Contributors

pjbull avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.