Skip to content

Commit

Permalink
Merge pull request #88 from terrancelu92/issue83_fivezonemodel
Browse files Browse the repository at this point in the history
Issue83 fivezonemodel
  • Loading branch information
terrancelu92 authored Dec 10, 2021
2 parents 25edeff + 1b292ad commit 02c2326
Show file tree
Hide file tree
Showing 184 changed files with 62,362 additions and 33 deletions.
11 changes: 11 additions & 0 deletions Dockerfile_CPU_PY3
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ RUN conda update conda && \
WORKDIR $HOME
RUN pip install git+git://github.com/YangyangFu/modelicagym.git@master

## BuildingSpy
WORKDIR $HOME
RUN pip install buildingspy

### =======================================================================================
### intall customized gym environment into docker: install a building control environment
# install single zone damper control environment
Expand All @@ -41,6 +45,13 @@ COPY ./testcases/gym-environments/single-zone-temperature/gym_singlezone_tempera
COPY ./testcases/gym-environments/single-zone-temperature/setup.py $HOME/github/testcases/gym-environments/single-zone-temperature/setup.py
RUN cd $HOME/github/testcases/gym-environments/single-zone-temperature && pip install -e .

# install five zone supervisory control environment
WORKDIR $HOME
COPY ./testcases/gym-environments/five-zones/gym_fivezone_jmodelica $HOME/github/testcases/gym-environments/five-zones/gym_fivezone_jmodelica
COPY ./testcases/gym-environments/five-zones/setup.py $HOME/github/testcases/gym-environments/five-zones/setup.py
RUN cd $HOME/github/testcases/gym-environments/five-zones && pip install -e .


### ===========================================================================================
### install testcase dependency
# install Modelica dependency
Expand Down
6 changes: 6 additions & 0 deletions testcases/gym-environments/five-zones/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Five Zone Supervisory Control Environment
This DRL environment is to control the setpoints of a five-zone VAV system from the supervisory level for minimizing energy consumption while maintaining comfortable indoor thermal environment.

- `v0`: this is a version with discrete supply air temperature action space (eleven states) for connecting with tianshou DRL library
- `v1`: this is a version with discrete supply air temperature action space (eight states) for connecting with tianshou DRL library
- `v2`: this is a version with continuous multi-dimensional action space (supply air temperature, supply CHW temperature, supply CHW dp) for connecting with tianshou DRL library
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import logging
from gym.envs.registration import register

logger = logging.getLogger(__name__)

# initial configuration: can be changed when making the environment
config = {
'fmu_result_handling':'memory',
'fmu_result_ncp':100.,
'filter_flag':True}

register(
id='JModelicaCSFiveZoneEnv-v0',
entry_point='gym_fivezone_jmodelica.envs.five_zone_env_v0:JModelicaCSFiveZoneEnv',
kwargs = config
)

register(
id='JModelicaCSFiveZoneEnv-v1',
entry_point='gym_fivezone_jmodelica.envs.five_zone_env_v1:JModelicaCSFiveZoneEnv',
kwargs = config
)

register(
id='JModelicaCSFiveZoneEnv-v2',
entry_point='gym_fivezone_jmodelica.envs.five_zone_env_v2:JModelicaCSFiveZoneEnv',
kwargs = config
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# discrete action space
from gym_fivezone_jmodelica.envs import five_zone_env_v0
from gym_fivezone_jmodelica.envs import five_zone_env_v1

# continuous action space
from gym_fivezone_jmodelica.envs import five_zone_env_v2
Loading

0 comments on commit 02c2326

Please sign in to comment.