Skip to content

Commit 3b65db1

Browse files
committed
Update docs for BuildingEnv
Other minor changes too
1 parent 0e3dbeb commit 3b65db1

File tree

3 files changed

+23
-11
lines changed

3 files changed

+23
-11
lines changed

docs/buildingenv.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
BuildingEnv considers the control of the heat flow in a multi-zone building so as to maintain a desired temperature setpoint. Building temperature simulation uses first-principled physics models. Users can either choose from a pre-defined list of buildings (Office small, School primary, Apartment midrise, and Office large) and three climate types and cities (San Diego, Tucson, New York) provided by the Building Energy Codes Program or define a customized BuildingEnv environment by importing any self-defined EnergyPlus building models. Each episode runs for 1 day, with 5-minute time intervals ($H = 288$, $\tau = 5/60$ hours).
44

55
## Observation Space
6-
For a building with $M$ indoor zones, the state $s(t) \in \R^{3M+2}$ contains observable properties of the building environment at timestep $t$:
6+
For a building with $M$ indoor zones, the state $s(t) \in \R^{M+4}$ contains observable properties of the building environment at timestep $t$:
77

88
$$
9-
s(t) = (T_1(t), ...,T_{M}(t), N_1(t), ..., N_{M}(t), Q_{1}^{GHI}(t), ..., Q_{M}^{GHI}(t), T_G(t), T_{E}(t)),
9+
s(t) = (T_1(t), \dotsc, T_M(t), T_\mathrm{E}(t), T_\mathrm{G}(t), Q^\mathrm{GHI}(t), \bar{Q}^\mathrm{p}(t)),
1010
$$
1111

12-
where $T_i(t)$ is zone $i$'s temperature at time step $t$, $N_i(t)$ is the number of occupants, $Q_{i}^{GHI}(t)$ is the heat gain from the solar irradiance, and $T_G(t)$ and $T_E(t)$ denote the ground and outdoor environment temperature. In practice, the agent may have access to all or part of the state variables for decision-making depending on the sensor setup. Note that the outdoor/ground temperature, room occupancy, and heat gain from solar radiance are time-varying uncontrolled variables from the environment.
12+
where $T_i(t)$ is zone $i$'s temperature at time step $t$, $\bar{Q}^\mathrm{p}(t)$ is the heat acquisition from occupant's activities, $Q^\mathrm{GHI}(t)$ is the heat gain from the solar irradiance, and $T_\mathrm{G}(t)$ and $T_\mathrm{E}(t)$ denote the ground and outdoor environment temperature. In practice, the agent may have access to all or part of the state variables for decision-making depending on the sensor setup. Note that the outdoor/ground temperature, room occupancy, and heat gain from solar radiance are time-varying uncontrolled variables from the environment.
1313

1414
## Action Space
1515
The action $a(t) \in [-1, 1]^M$ sets the controlled heating supplied to each of the $M$ zones, scaled to $[-1, 1]$.
@@ -18,13 +18,13 @@ The action $a(t) \in [-1, 1]^M$ sets the controlled heating supplied to each of
1818
The objective is to reduce energy consumption while keeping the temperature within a given comfort range. The default reward function is a weighted $\ell_2$ reward, defined as
1919

2020
$$
21-
r(t) = - (1-\beta) \|a(t)\|_2 - \beta \|T^{obj}(t)-T(t)\|_2
21+
r(t) = - (1-\beta) \|a(t)\|_2 - \beta \|T^\mathrm{target}(t)-T(t)\|_2
2222
$$
2323

24-
where $T^{obj}(t)=[T^{obj}_{1}(t),...,T^{obj}_{M}(t)]$ are the target temperatures and $T(t)=[T_{1}(t),...,T_{M}(t)]$ are the actual zonal temperature. BuildingEnv also allows users to customize reward functions using environment states $s(t)$, actions $a(t)$, target values $T^{obj}(t)$, and a weight term $\beta$. Users can also customize the reward function to take CO<sub>2</sub> emissions into consideration.
24+
where $T^\mathrm{target}(t)=[T^\mathrm{target}_{1}(t),\cdots,T^\mathrm{target}_{M}(t)]$ are the target temperatures and $T(t)=[T_1(t),\cdots,T_M(t)]$ are the actual zonal temperature. BuildingEnv also allows users to customize reward functions by changing the weight term $\beta$ or the parameter $p$ defining the $\ell_p$ norm. Users can also customize the reward function to take CO<sub>2</sub> emissions into consideration.
2525

2626
## Distribution Shift
27-
BuildingEnv features distribution shifts in the ambient outdoor temperature profile $T_E$ which varies with different seasons.
27+
BuildingEnv features distribution shifts in the ambient outdoor temperature profile $T_\mathrm{E}$ which varies with different seasons.
2828

2929
## Multiagent Setting
3030
In the multiagent setting for BuildingEnv, we treat each building as an independent agent whose action is the building's heat control decisions. It must coordinate with other building agents to maximize overall reward, which is the summation of each agent's reward. Each agent obtains either the global observation or individual building states.
@@ -33,11 +33,25 @@ In the multiagent setting for BuildingEnv, we treat each building as an independ
3333

3434
### Installation
3535

36-
Coming soon!
36+
SustainGym is designed for Linux machines. SustainGym is hosted on [PyPI](https://pypi.org/project/sustaingym/) and can be installed with `pip`:
37+
38+
```bash
39+
pip install sustaingym[building]
40+
```
3741

3842
### Using our training script
3943

40-
Coming soon!
44+
1. Install [miniconda3](https://docs.conda.io/en/latest/miniconda-other-installer-links.html).
45+
2. (Optional, but recommended) If you are using a conda version `<=23.9.0`, set the conda solver to libmamba for faster dependency solving. Starting from conda version [`23.10.0`](https://github.com/conda/conda/releases/tag/23.10.0), libmamba is the default solver.
46+
```bash
47+
conda config --set solver libmamba
48+
```
49+
3. Install the libraries necessary for runnning the BuildingEnv environment.
50+
```bash
51+
conda env update --file env_building.yml --prune
52+
```
53+
54+
More instructions coming soon!
4155

4256
### Custom RL Loop
4357

docs/evchargingenv.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,4 @@ optional arguments:
9292
9393
## References
9494
95-
[1] Z. J. Lee et al., "Adaptive Charging Networks: A Framework for Smart Electric Vehicle Charging," in _IEEE Transactions on Smart Grid_, vol. 12, no. 5, pp. 4339-4350, Sept. 2021, doi: 10.1109/TSG.2021.3074437. URL [https://ieeexplore.ieee.org/document/9409126](https://ieeexplore.ieee.org/document/9409126).
95+
[1] Z. J. Lee et al., "Adaptive Charging Networks: A Framework for Smart Electric Vehicle Charging," in _IEEE Transactions on Smart Grid_, vol. 12, no. 5, pp. 4339-4350, Sept. 2021, doi: 10.1109/TSG.2021.3074437. URL [https://ieeexplore.ieee.org/document/9409126](https://ieeexplore.ieee.org/document/9409126).

sustaingym/envs/cogen/env.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ def __init__(self,
114114
inputs_table.drop(columns=['index'], inplace=True)
115115
inputs_table.set_index('id', inplace=True)
116116

117-
# output_labels = [json_data['outputs'][i]['id'] for i in range(len(json_data['outputs']))]
118-
119117
# action space is power output, evaporative cooler switch, power augmentation switch, and equivalent
120118
# process steam flow for generators 1, 2, and 3, as well as steam turbine power output, steam flow
121119
# through condenser, and number of cooling bays employed

0 commit comments

Comments
 (0)