Skip to content

Commit

Permalink
Updated requirements and README
Browse files Browse the repository at this point in the history
  • Loading branch information
simontindemans committed Jan 28, 2021
1 parent 0c660b1 commit f44a27c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ The *zeepkist team* consists of:
- ``conda activate zeepkist``
* Clone repository: ``git clone https://github.com/simontindemans/rangl-zeepkist.git``
* Install required packages: ``pip install -r rangl-zeepkist/requirements.txt``
* *(Optional)* Run ``python development/train-rl.py`` to train the RL agent (note: this will overwrite ``output/MODEL_0.zip``)
* *(Optional)* Run ``python code/train-rl.py`` to train the RL agent (note: this will overwrite ``models/MODEL_0.zip``)
* Run one or more of the three evaluation scripts to evaluate the performance of the agents
- MPC agent: ``python development/evaluate-mpc.py``
- RL agent: ``python development/evaluate-rl.py``
- clairvoyant agent: ``python development/evaluate-clairvoyant.py``
- MPC agent: ``python code/evaluate-mpc.py``
- RL agent: ``python code/evaluate-rl.py``
- clairvoyant agent: ``python code/evaluate-clairvoyant.py``

## Agent description
### RL agent
The RL agent (v1.1.1) is an SAC agent trained on a modified observation and action space. The **observation space** was modified to consist of the *current time*, *current dispatch* and a *forecast of the next 25 time steps*; the latter makes it easier to embed time invariance into the agent's actions. When necessary (near the end of the interval), the final forecast value was repeated to achieve a 25 time step forecast. The **action space** was modified so that the range *\[-1,1\]* for each generator corresponds to its full ramp range (*-1* is maximum ramp down, *0* is constant generation, *1* is maximum ramp up). The submitted agent was trained on 5000 episodes; evaluation was done deterministically. A relatively small discount rate (gamma) of 0.85 is used to reflect the system's ability to implement arbitrary changes in generation levels within 13 time steps. The trained RL agent is available in ``output/MODEL_0.zip``.
The RL agent (v1.1.1) is an SAC agent trained on a modified observation and action space. The **observation space** was modified to consist of the *current time*, *current dispatch* and a *forecast of the next 25 time steps*; the latter makes it easier to embed time invariance into the agent's actions. When necessary (near the end of the interval), the final forecast value was repeated to achieve a 25 time step forecast. The **action space** was modified so that the range *\[-1,1\]* for each generator corresponds to its full ramp range (*-1* is maximum ramp down, *0* is constant generation, *1* is maximum ramp up). The submitted agent was trained on 5000 episodes; evaluation was done deterministically. A relatively small discount rate (gamma) of 0.85 is used to reflect the system's ability to implement arbitrary changes in generation levels within 13 time steps. The trained RL agent is available in ``models/MODEL_0.zip``.

### MPC agent
The MPC agent (v1.1.0) minimises, at each time step, the system cost across the next 25 time steps, based on the most recent demand forecast. It implements the actions for the current time step only, and repeats the procedure when a new forecast is available. This agent uses an explicit representation of the model constraints to construct an MILP problem that is solved using ``pulp``.
Expand All @@ -34,4 +34,7 @@ The MPC agent (v1.1.0) minimises, at each time step, the system cost across the
The clairvoyant agent is only included to compute a lower bound to the cost that is possible with perfect information. It first completes the episode using a constant dispatch, and uses the realised demand trace to the minimum dispatch cost in hindsight. As it is a 'cheating' agent, it can only be run locally and was not submitted to the challenge.

## Submitted agents
Submitted agents are in the ``zeepkist_rl_submission`` and ``zeepkist_mpc_submission`` directories. Testing and submitting these agents requires the installation of Docker. Ensure that the local Docker environment makes sufficient memory available (at least 4GB).
Submitted agents are in the ``submission`` directory. Testing and submitting these agents requires the installation of Docker. Ensure that the local Docker environment makes sufficient memory available (at least 4GB).

## License
All code is released under the MIT license. Portions of the code are based on the [RangL Generation scheduling challenge January 2021 repository](https://gitlab.com/rangl-public/generation-scheduling-challenge-january-2021), released (c) RangL Team under the MIT license.
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pandas
numpy
gym
pandas==1.2.1
numpy==1.19.5
gym==0.18.0
stable-baselines3==0.10.0
matplotlib
pulp
matplotlib==3.3.3
PuLP==2.4

0 comments on commit f44a27c

Please sign in to comment.