-
Notifications
You must be signed in to change notification settings - Fork 2
SenHuang19/building_emulator
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repository includes a building emulator and interfacing capability using docker and docker-compose. Specifically, the emulator operates as a "server" while controllers for testing are considered as "client". Actuators or supervisory control inputs in the emulator can be overridden. Those inputs can be exported via an HTTP request. If emulators do not receive any override commands, it will advance the simulation based on the existing control baseline. Note that you will need to install docker-compose and make it to execute the above commands. - To install docker-compose, please refer to https://docs.docker.com/compose/install/ - To install make for Windows, please refer to http://gnuwin32.sourceforge.net/packages/make.htm 1. Control implements In this setup, controllers shall be implemented as "clients". Clients can be implemented in any programming languages that support HTTP communications. This repository contains two templates: a Julia template (julia_control/interface.jl) and a python template (python_control/client_examples.py). Based on those two templates, users can establish customized controllers. 2. Faults insertion tests The python template contains two examples for inserting faults into the emulator - Example 1: bias for air temperature as a sensor fault - Implemented in lines 141 through 182 of python_control/runSimulation_examples.py - Set bias_example = True in line 146 to run this example (Default = True. Setting bias_example = False will turn off the bias example) - Select bias degree value, floor #, and zone # for this example in lines 149, 150, and 151 respectively - Example 2: override AHU air temperature set point with measured value - Implemented in lines 185 through 226 of python_control/runSimulation_examples.py - Set override_example = True in line 190 to run this example (Default = True. Setting override_example = False will turn off the override example) - Select floor # for this example in line 194 3. There are several makefile commands for facilitating the usage of this repository - "make build" builds the docker images for both the emulator "server" and the python-based "client" - "make run" runs both the emulator "server" and the python-based "client" in the background and stop dockers when the test completes - "make copy" copies over files from docker to the host os. - "make remove" deletes the docker images. Users can run only the emulator "server" in the background by running "run_emulator". In such a case, start the "client" manually and change the "URL" parameter in the client to be "127.0.0.1:5000"
About
"A docker-compose set up for hosting a high fidelity building model for building control tests"
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published