Skip to content

Commit

Permalink
(v2.5.0) - Energyplus v23.1.0 compability (ugr-sail#343)
Browse files Browse the repository at this point in the history
* Updated Dockerfile and devcontainer to install the latest energyplus version automatically

* Updated all buildings with names included. Adaptation between buildings updated and the downloaded from energyplus 23.1 directly

* Updated all RDD files for new version of buildings

* Fixed env register building file name

* Updated Sinergym version from 2.4.1 to 2.5.0

* Fixed default observation space for 5ZoneAutoDXVAV.epJSON

* Fixed bug in check_run_times.py script

* Deleted unusued path in gitignore

* Deleted out-dated comment in Dockerfile and deleted idf extension in devcontainer

* Fixed some idf names to more generic mention in modeling (source and tests)

* Updated code example in tests/README.md

* Updated versions table of copatibility with Sinergym and added building file format column (INSTALL.md and docs )

* Fixed Energyplus section in INSTALL.md

* Fixed table versions bold column

* Fixed tests which were using 5ZoneAutoDXVAV.epJSON building (some default values have changed)
  • Loading branch information
AlejandroCN7 authored Jun 1, 2023
1 parent 68126c3 commit afe190d
Show file tree
Hide file tree
Showing 26 changed files with 6,293 additions and 7,442 deletions.
7 changes: 3 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "sinergym",
"build": {
"args": {
"ENERGYPLUS_VERSION": "9.5.0",
"ENERGYPLUS_INSTALL_VERSION": "9-5-0",
"ENERGYPLUS_SHA": "de239b2e5f"
"ENERGYPLUS_VERSION": "23.1.0",
"ENERGYPLUS_INSTALL_VERSION": "23-1-0",
"ENERGYPLUS_SHA": "87ed9199d4"
}
},
"dockerFile": "../Dockerfile",
Expand Down Expand Up @@ -42,7 +42,6 @@
"GrapeCity.gc-excelviewer",
"himanoa.Python-autopep8",
"James-Yu.latex-workshop",
"karyfoundation.idf",
"me-dutour-mathieu.vscode-github-actions",
"mechatroner.rainbow-csv",
"mhutchie.git-graph",
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ bcvtb/
# Simulation outputs
Eplus-env*/

# Extra config simulation idf generated
sinergym/data/buildings/*_extra.idf

#Socket.cfg in tests
socket.cfg

Expand Down
12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ ARG UBUNTU_VERSION=22.04
FROM ubuntu:${UBUNTU_VERSION}

# Arguments for EnergyPlus version (default values of version 8.6.0 if is not specified)
ARG ENERGYPLUS_VERSION=9.5.0
ARG ENERGYPLUS_INSTALL_VERSION=9-5-0
ARG ENERGYPLUS_SHA=de239b2e5f
ARG ENERGYPLUS_VERSION=23.1.0
ARG ENERGYPLUS_INSTALL_VERSION=23-1-0
ARG ENERGYPLUS_SHA=87ed9199d4

# Argument for Sinergym extras libraries
ARG SINERGYM_EXTRAS=[extras]
Expand All @@ -26,9 +26,9 @@ ENV ENERGYPLUS_INSTALL_VERSION=$ENERGYPLUS_INSTALL_VERSION
ENV EPLUS_PATH=/usr/local/EnergyPlus-$ENERGYPLUS_INSTALL_VERSION

# Downloading from Github
# e.g. https://github.com/NREL/EnergyPlus/releases/download/v9.5.0/EnergyPlus-9.5.0-de239b2e5f-Linux-Ubuntu18.04-x86_64.sh
# e.g. https://github.com/NREL/EnergyPlus/releases/download/v23.1.0/EnergyPlus-23.1.0-87ed9199d4-Linux-Ubuntu22.04-x86_64.sh
ENV ENERGYPLUS_DOWNLOAD_BASE_URL https://github.com/NREL/EnergyPlus/releases/download/$ENERGYPLUS_TAG
ENV ENERGYPLUS_DOWNLOAD_FILENAME EnergyPlus-$ENERGYPLUS_VERSION-$ENERGYPLUS_SHA-Linux-Ubuntu18.04-x86_64.sh
ENV ENERGYPLUS_DOWNLOAD_FILENAME EnergyPlus-$ENERGYPLUS_VERSION-$ENERGYPLUS_SHA-Linux-Ubuntu22.04-x86_64.sh
ENV ENERGYPLUS_DOWNLOAD_URL $ENERGYPLUS_DOWNLOAD_BASE_URL/$ENERGYPLUS_DOWNLOAD_FILENAME

# Collapse the update of packages, download and installation into one command
Expand Down Expand Up @@ -76,5 +76,3 @@ RUN pip install -e .${SINERGYM_EXTRAS}
#RUN pip install idna && pip install six
CMD ["/bin/bash"]

# Build: docker build -t sinergym:1.1.0 --build-arg ENERGYPLUS_VERSION=9.5.0 --build-arg ENERGYPLUS_INSTALL_VERSION=9-5-0 --build-arg ENERGYPLUS_SHA=de239b2e5f .
# Run: docker run -it --rm -p 5005:5005 sinergym:1.1.0
21 changes: 12 additions & 9 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,24 +59,27 @@ To install *Sinergym* manually instead of through the container (not recommended

Sinergym has been updating the compatibility with different components, here it is a summary about important versions support:

| **Sinergym version** | **Ubuntu version** | **Python version** | **EnergyPlus version** |
| -------------------- | ------------------ | ------------------ | ---------------------- |
| **0.0** | 18.04 LTS | 3.6 | 8.3.0 |
| **1.1.0** | 18.04 LTS | 3.6 | **9.5.0** |
| **1.7.0** | 18.04 LTS | **3.9** | 9.5.0 |
| **1.9.5** | **22.04 LTS** | **3.10** | 9.5.0 |
| **Sinergym version** | **Ubuntu version** | **Python version** | **EnergyPlus version** | **Building model file** |
| -------------------- | ------------------ | ------------------ | ---------------------- | ----------------------- |
| **0.0** | 18.04 LTS | 3.6 | 8.3.0 | IDF |
| **1.1.0** | 18.04 LTS | 3.6 | **9.5.0** | IDF |
| **1.7.0** | 18.04 LTS | **3.9** | 9.5.0 | IDF |
| **1.9.5** | **22.04 LTS** | **3.10** | 9.5.0 | IDF |
| **2.4.0** | 22.04 LTS | 3.10.6 | 9.5.0 | **epJSON** |
| **2.5.0** | 22.04 LTS | 3.10.6 | **23.1.0** | epJSON |


- Now, we have a correct python version with required modules to run *Sinergym*. Let's continue with the rest of the programs that are needed outside of Python to run the simulations:

#### 2. Install EnergyPlus 9.5.0
#### 2. Install EnergyPlus 23.1.0

Install EnergyPlus. Currently it has been update compatibility to 9.5.0 and it has
Install EnergyPlus. Currently it has been update compatibility to 23.1.0 and it has
been tested, but code may also work with other versions. Other combination may works, but they don't have been tested.

Follow the instructions [here](https://energyplus.net/downloads) and
install it for Linux (only Ubuntu is supported). Choose any location
to install the software. Once installed, a folder called
`Energyplus-9-5-0` should appear in the selected location.
`Energyplus-23-1-0` should appear in the selected location.

#### 3. Install BCVTB software

Expand Down
32 changes: 18 additions & 14 deletions docs/source/pages/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,21 @@ Sinergym has a set of dependencies (such as the simulator), which have
to be covered depending on the version. Below it is a summary table showing
the versions supported by Sinergym throughout its releases:

+----------------------+--------------------+--------------------+------------------------+
| **Sinergym version** | **Ubuntu version** | **Python version** | **EnergyPlus version** |
+----------------------+--------------------+--------------------+------------------------+
| **0.0** | 18.04 LTS | 3.6 | 8.3.0 |
+----------------------+--------------------+--------------------+------------------------+
| **1.1.0** | 18.04 LTS | 3.6 | **9.5.0** |
+----------------------+--------------------+--------------------+------------------------+
| **1.7.0** | 18.04 LTS | **3.9** | 9.5.0 |
+----------------------+--------------------+--------------------+------------------------+
| **1.9.5** | **22.04 LTS** | **3.10** | 9.5.0 |
+----------------------+--------------------+--------------------+------------------------+
+----------------------+--------------------+--------------------+------------------------+---------------------------+
| **Sinergym version** | **Ubuntu version** | **Python version** | **EnergyPlus version** | **Building model file** |
+----------------------+--------------------+--------------------+------------------------+---------------------------+
| **0.0** | 18.04 LTS | 3.6 | 8.3.0 | IDF |
+----------------------+--------------------+--------------------+------------------------+---------------------------+
| **1.1.0** | 18.04 LTS | 3.6 | **9.5.0** | IDF |
+----------------------+--------------------+--------------------+------------------------+---------------------------+
| **1.7.0** | 18.04 LTS | **3.9** | 9.5.0 | IDF |
+----------------------+--------------------+--------------------+------------------------+---------------------------+
| **1.9.5** | **22.04 LTS** | **3.10.6** | 9.5.0 | IDF |
+----------------------+--------------------+--------------------+------------------------+---------------------------+
| **2.4.0** | 22.04 LTS | 3.10.6 | 9.5.0 | **epJSON** |
+----------------------+--------------------+--------------------+------------------------+---------------------------+
| **2.5.0** | 22.04 LTS | 3.10.6 | **23.1.0** | epJSON |
+----------------------+--------------------+--------------------+------------------------+---------------------------+

In any case, it is recommended to always use the latest version of Sinergym
supported by the container to avoid having to go into the installation details.
Expand Down Expand Up @@ -101,16 +105,16 @@ Now, we have a correct python version with required modules to run *Sinergym*.
Let's continue with the rest of the programs that are needed outside of Python
to run the simulations:

Install EnergyPlus 9.5.0
Install EnergyPlus 23.1.0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Install *EnergyPlus*. Currently it has been update compatibility to ``9.5.0`` and it has
Install *EnergyPlus*. Currently it has been update compatibility to ``23.1.0`` and it has
been tested, but code may also work with other versions, but they don't have been tested.

Follow the instructions `here <https://energyplus.net/downloads>`__ and
install it for Linux (only **Ubuntu** is supported by us). Choose any location
to install the software. Once installed, a folder called
``Energyplus-9-5-0`` should appear in the selected location.
``Energyplus-23-1-0`` should appear in the selected location.

Install BCVTB software
~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion scripts/check_run_times.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
# BEGIN EXECUTION TIME
begin_time = datetime.now()
terminated = False
env.reset()
for _ in range(args.episodes):
env.reset()
while not terminated:
a = env.action_space.sample()
obs, reward, terminated, truncated, info = env.step(a)
Expand Down
Loading

0 comments on commit afe190d

Please sign in to comment.