Reinforcement Learning for HEMS
This project documents the code used for our RL HEMS experiements using Q Learning and DQN.
In order to run these files successfully, it is necessary to do the following:
- Download the zip file associated with this project or clone the repository
- Have Python 3.9 installed on your machine
- Run
pip install -r requirements.txtto set up the environment for the files - Ensure that the following files are in the same directory as the .py files:
- home.toml
- 2019.npy
- 2020.npy
- 2021.npy
- Run
python HEMS_dqn.pyto run the DQN algorithm for HEMS. This file completes 10 runs with explicitly set seeds to gather the results based on the data provided in Step 4. On an i7-1165G7 @ 2.80GHz machine, this operation takes around 3 hours to complete. - Run
python HEMS_q_learning.pyto run the Q Learning algorithm for HEMS. This file completes 10 runs with explicitly set seeds to gather the results based on the data provided in Step 4. On an i7-1165G7 @ 2.80GHz machine, this operation takes around 1.5 hours to complete. - Run
python PPO_HEMS.pyorpython PPO_HEMSShiftableInt.pyorPPO_HEMSShiftableUnInt.pyto run the PPO algorithm for HEMS. This file completes only one run with explicitly set seeds. Warning: this code may take hours to complete on an i7-1165G7 @ 2.80GHz machine.