Building Optimization Performance Tests
This repository contains prototype code for the Building Optimization Performance Test framework (BOPTEST) that is being developed as part of the IBPSA Project 1 (https://ibpsa.github.io/project1/).
\testcase#
contains prototype code for a test case, including docs, models, and configuration settings.\examples
contains prototype code for interacting with a test case and running example tests with simple controllers.\parser
contains prototype code for a script that parses a Modelica model using signal exchange blocks and outputs a wrapper FMU and KPI json.\template
contains template Modelica code for a test case emulator model.
- Build the test case by
$ TESTCASE=testcase# make build
where # is the number of the test case to build. - Deploy the test case by
$ TESTCASE=testcase# make run
where # is the number of the test case that has been built. - In a seperate process, use the test case API defined below to interact with the test case.
- Run an example controller test:
- For testcase1, in a separate terminal use
$ python examples/twoday-p.py
to test a simple proportional feedback controller on the test case over a two-day period. - For testcase2, in a separate terminal use
$ python examples/szvav-sup.py
to test a simple supervisory controller on the test case over a two-day period.
- To interact, send RESTful requests to:
http://127.0.0.1:5000/<request>
- To shutdown:
Ctrl+C
to close port,Ctrl+D
to exit docker container.
Example RESTful interaction:
- Receive a list of available measurements:
$ curl http://127.0.0.1:5000/measurements
- Advance simulation of test case 2 with new heating and cooling temperature setpoints:
$ curl http://127.0.0.1:5000/advance -d '{"TSetRooHea":293.15,"TSetRooCoo":298.15}' -H "Content-Type: application/json"
Interaction | Request |
---|---|
Advance simulation with control input and receive measurements | POST advance with json data "{<input_name>:}" |
Reset simulation to beginning | PUT reset with no data |
Receive communication step in seconds | GET step |
Set communication step in seconds | PUT step with data step=<value> |
Receive sensor signal names (y) | GET measurements |
Receive control signal names (u) | GET inputs |
Receive test result data | GET results |
Receive test KPIs | GET kpi |
Receive test case name | GET name |
See the wiki for use cases and development requirements.