Skip to content
Open

Main #10

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
c2f24d9
final paper in IEEE PESGM 2021
apigott Aug 31, 2021
2b3a9b6
updated for varying t_in bounds
Feb 15, 2022
74885a1
added occ schedule for homes
Feb 15, 2022
92c0190
fixed HVAC daily schedules
Apr 5, 2022
b1cc742
multiple single home plots enabled
Apr 5, 2022
3246eb1
added asynchronous redis communication
May 9, 2022
eed7581
updated for async update with mpc calc steps
May 9, 2022
54ebfb6
checkpoint before reverting to synchronous play
apigott May 20, 2022
ec3e0ba
for asynchronous play with 1 RL enabled/human controlled player
apigott May 26, 2022
fc9ed11
stash reformat changes
apigott May 27, 2022
6a64b62
moved to new package
apigott May 27, 2022
d733350
moved to career comp package
apigott May 27, 2022
d019e83
changed to accommodate use as a base class for rl_agg
apigott May 27, 2022
2629ae4
data for competition training sets
apigott May 27, 2022
4979bd6
ignore home logs
apigott May 27, 2022
0660c68
remove old files
apigott May 27, 2022
8fe264c
Merge branch 'master' into main
apigott May 27, 2022
c164a9e
moved to career comp package
apigott May 27, 2022
e86deea
Merge branch 'main' of https://github.com/apigott/dragg
apigott May 27, 2022
d773e9a
removing old files
apigott May 27, 2022
42252c6
add reset for interface with stable baseline
apigott May 30, 2022
90c6565
removed competition specific files
apigott May 31, 2022
d1dae7d
cleaned up imports/requirements
apigott May 31, 2022
93a89ad
most recent version of aggregator
apigott Jun 9, 2022
9d5bc9f
added a comma to requirements list :(
apigott Jun 9, 2022
9c9381c
logging is part of the python standard library, removed from requirem…
apigott Jun 9, 2022
fc09249
removed modules in the python standard library, removed from require…
apigott Jun 9, 2022
2029866
removed modules in the python standard library from requirements
apigott Jun 9, 2022
027e39d
corrected EV battery charge/discharge (uni-directional charge for now)
apigott Jul 11, 2022
6108815
changed back to non-RL aggregator
apigott Jul 11, 2022
324a1b3
added ev charge plots
apigott Jul 11, 2022
4ec40f6
cleaned up
apigott Jul 11, 2022
acf9578
added v2g discharge capabilities
apigott Jul 12, 2022
ce20600
added a failsafe to EV charging
apigott Jul 19, 2022
056217f
updated to accommodate RL player override
apigott Jul 19, 2022
4ce8ee6
fixed issue with EV charge/discharge
apigott Jul 22, 2022
59c7d2a
fix ev charge
apigott Jul 25, 2022
999f5df
setup
apigott Jul 25, 2022
c84ec9f
different option for RL override
apigott Jul 25, 2022
55b7d03
fix hard code redis://localhost
apigott Aug 11, 2022
000797d
minor updates to file structures
apigott Aug 23, 2022
a14ef26
migrate towards initialization without redis
apigott Sep 23, 2022
a3ece36
hspf and seer
apigott Sep 23, 2022
a04dc03
change hvac model seer and hspf -> cop
apigott Sep 23, 2022
9a4a0c1
fixed EV charge when there's an infeasible point
apigott Sep 27, 2022
2edbf01
adds a .nojekyll for docs builds
apigott Sep 29, 2022
3235674
remove old rl classes
apigott Sep 29, 2022
0b6d3d2
clean up old imports
apigott Sep 29, 2022
7a7f190
remove depricated plotting module
apigott Sep 29, 2022
7bb8f89
major revisions to device structure
apigott Oct 7, 2022
2d3028c
addition of device classes
apigott Oct 7, 2022
ada10b1
v2 release with independent MPC calcs by device
apigott Oct 7, 2022
22e426f
addition of device classes
apigott Oct 7, 2022
87a0673
moved main.py
apigott Oct 7, 2022
4c95cb6
remove old files
apigott Oct 7, 2022
a1c258e
remove old files
apigott Oct 7, 2022
85bff17
update docstrings
apigott Oct 7, 2022
9e84f88
update documentation
apigott Oct 7, 2022
208d793
update docstrings
apigott Oct 7, 2022
a3f268a
commit html files
apigott Oct 7, 2022
0481a3b
new docker files
apigott Oct 7, 2022
3043837
added some instructions
apigott Oct 10, 2022
35d84e3
change version
apigott Oct 10, 2022
6b8fda1
add image
apigott Oct 10, 2022
3b5d942
Update index.rst
apigott Oct 10, 2022
2691c1b
update docs
apigott Oct 12, 2022
73ae905
no jekyll
apigott Oct 12, 2022
1e4ab7f
remove old docker file
apigott Oct 18, 2022
0b4138b
cleanup datetime interpolation, remove typo
apigott Oct 18, 2022
6dea529
update datetime interp
apigott Oct 18, 2022
d79635c
patch data file NAN values at initialization step
apigott Oct 18, 2022
77eb5c8
update for resetting capabilities
apigott Nov 8, 2022
13200c0
update to allow resetting
apigott Nov 8, 2022
442f5c4
update to accommodate all RL states
apigott Nov 11, 2022
8ea733b
clean up
apigott Nov 16, 2022
47cb056
FIX start datetime error
apigott Nov 17, 2022
9bada70
resolve water heater profile issues for extended training period, loo…
apigott Nov 18, 2022
5cc2d34
clean up
apigott Nov 21, 2022
ae7ca3e
revise hvac params
apigott Nov 21, 2022
78145cb
update normalization of control actions
apigott Nov 21, 2022
d8bb35d
update how optimal values are stored and posted
apigott Nov 26, 2022
85e493f
added peak load contribution tracking and water heater debug statements
apigott Jan 13, 2023
dd748fd
change enforce bounds or expected value
apigott Jan 13, 2023
bc248f1
update how home params are created
apigott Jan 24, 2023
9d98557
update override functions and clean up of objective function
apigott Jan 24, 2023
2265ab9
new plot functions
apigott Jan 24, 2023
04bbd0f
clean up and adjust the random occ schedule
apigott Jan 27, 2023
b4aecd6
cleanup and enforce lower charge rate
apigott Jan 27, 2023
1365625
Update Dockerfile
apigott Jan 28, 2023
bf73c1f
Delete wait-for-it.sh
apigott Jan 28, 2023
c7f3a5f
Delete start_worker.sh
apigott Jan 28, 2023
ad7649d
Delete Dockerfile
apigott Jan 28, 2023
6e61df3
add sysarg for redis and cleanup docker
apigott Jan 28, 2023
0ef68c6
add various schedule groups
apigott Jan 28, 2023
4ee79f6
add
apigott Jan 28, 2023
547cc6f
clean up, seed randomness in occ schedule
apigott Jan 31, 2023
76886ad
clean up, seed randomness in occ schedule
apigott Jan 31, 2023
245932b
standardize the p_elec value
apigott Jan 31, 2023
1aaf2e4
clean up
apigott Jan 31, 2023
1fb3ac6
delete old files
apigott Jan 31, 2023
2e1c2a8
standardize p_elec var
apigott Jan 31, 2023
189d56d
standardize p_elec
apigott Jan 31, 2023
d17b063
fix contribution to peak metric
apigott Feb 1, 2023
abf3cbe
update the override controls to be independent, patch water heater
Feb 14, 2023
36d7d17
clean up local controller solution
Feb 17, 2023
7e1111a
update controller sensitivity
Mar 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ archive
*.log
~$*.xlsx
dragg/dump.rdb
*home_logs
dragg/outputs
dragg.egg-info
*.log
2 changes: 2 additions & 0 deletions deploy/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.rdb
*.log
13 changes: 13 additions & 0 deletions deploy/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Install python
FROM python:3.9

# Install dragg
RUN pip install dragg
RUN pip install cvxopt

# Copy parent directory
ADD . /dragg

# Run simulation
WORKDIR dragg/dragg
CMD python main.py -r "redis://redis"
15 changes: 15 additions & 0 deletions deploy/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3'
services:
dragg:
build:
context: ../
dockerfile: ./deploy/Dockerfile
environment:
- REDIS_HOST=redis
- localhost=6397
depends_on:
- redis
volumes:
- ./outputs:/dragg/outputs
redis:
image: redis
12 changes: 0 additions & 12 deletions deploy/start_worker.sh

This file was deleted.

178 changes: 0 additions & 178 deletions deploy/wait-for-it.sh

This file was deleted.

29 changes: 0 additions & 29 deletions docker-compose.yml

This file was deleted.

Empty file added docs/.nojekyll
Empty file.
Binary file removed docs/Final Project-CDM-001-DRAFT.pdf
Binary file not shown.
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
4 changes: 4 additions & 0 deletions docs/build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 689320c16525ab51a9c3ed3765fb6772
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added docs/build/html/.doctrees/api.doctree
Binary file not shown.
Binary file added docs/build/html/.doctrees/dragg.devices.doctree
Binary file not shown.
Binary file added docs/build/html/.doctrees/dragg.doctree
Binary file not shown.
Binary file added docs/build/html/.doctrees/environment.pickle
Binary file not shown.
Binary file added docs/build/html/.doctrees/getting_started.doctree
Binary file not shown.
Binary file added docs/build/html/.doctrees/index.doctree
Binary file not shown.
Binary file added docs/build/html/.doctrees/modules.doctree
Binary file not shown.
Binary file added docs/build/html/.doctrees/setup.doctree
Binary file not shown.
7 changes: 7 additions & 0 deletions docs/build/html/_sources/api.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
API Reference
=============

Classes
---------
.. autoclass:: MPCCalc
:members: initialize_environmental_variables, setup_base_problem
27 changes: 27 additions & 0 deletions docs/build/html/_sources/dragg.devices.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
dragg.devices package
=====================

.. automodule:: dragg.devices.battery
:members:
:undoc-members:
:show-inheritance:

.. automodule:: dragg.devices.electric_vehicle
:members:
:undoc-members:
:show-inheritance:

.. automodule:: dragg.devices.hvac
:members:
:undoc-members:
:show-inheritance:

.. automodule:: dragg.devices.pv
:members:
:undoc-members:
:show-inheritance:

.. automodule:: dragg.devices.water_heater
:members:
:undoc-members:
:show-inheritance:
22 changes: 22 additions & 0 deletions docs/build/html/_sources/dragg.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
dragg package
=============

.. automodule:: dragg.aggregator
:members:
:undoc-members:
:show-inheritance:

.. automodule:: dragg.logger
:members:
:undoc-members:
:show-inheritance:

.. automodule:: dragg.mpc_calc
:members:
:undoc-members:
:show-inheritance:

.. automodule:: dragg.reformat
:members:
:undoc-members:
:show-inheritance:
16 changes: 16 additions & 0 deletions docs/build/html/_sources/getting_started.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Getting Started
===============

Installation
------------

DRAGG is available on PyPI and can be downloaded via pip.

.. code-block:: console

$ pip install dragg

Dependencies
^^^

DRAGG utilizes the Redis database to communicate between individual HEMS and the Aggregator. Therefore Redis is necessary to run DRAGG. While Redis is only available for Linux based operating systems we have included a Dockerfile in /deploy for Windows installations.
27 changes: 27 additions & 0 deletions docs/build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.. DRAGG documentation master file, created by
sphinx-quickstart on Thu Oct 6 14:58:49 2022.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Distributed Resource AGGregator (DRAGG)
=======================================

DRAGG is a Python based package for creating approximate load profiles of single family homes. DRAGG's thermal models can be used to validate demand response from consumers (e.g. maintaining thermal comfort and safety) while providing the corresponding demand. The thermal models in DRAGG are stochastically initialized to emulate the diversity of a typical residential community.

Each consumer within DRAGG is represented via a `Model Predictive Control <https://en.wikipedia.org/wiki/Model_predictive_control>`_ Home Energy Management System (HEMS) with the objective to minimize their personal cost: cost per kWh by kWh consumed over the duration of the simualtion. To manipulate consumption the base HEMS is equipped with an electric HVAC system (based on a heat pump), an electric resistance water heater, and an electric vehicle that is capable of vehicle-to-grid charging. Optionally the HEMS can be equipped with a PV array and home battery.

Every system is approximated by a set of `mixed-integer linear programming <https://en.wikipedia.org/wiki/Integer_programming>`_ constraints which can be used to approximate the `duty cycle <https://en.wikipedia.org/wiki/Duty_cycle>`_ of the HVAC and water heater respectively.

.. image:: _static/thermal.png
:scale: 50%

Contents
---------
.. toctree::
:maxdepth: 1

getting_started
dragg
dragg.devices

.. note:: DRAGG is still under development and we welcome feature requests or collaboration.
Loading