# boptest-agent
The volttron-boptest-agent utilizes the volttron-lib-boptest-integration library to perform simulation control and
benchmark tasks.
BOPTEST is designed to facilitate
the performance evaluation and benchmarking of building control strategies, which
contains these key components:
1. Run-Time Environment (RTE): Deployed with Docker and accessed with a RESTful HTTP API, use the RTE to set up tests,
control building emulators, access data, and report KPIs.
1. Test Case Repository: A collection of ready-to-use building emulators representing a range of building types and HVAC
systems.
1. Key Performance Indicator (KPI) Reporting: A set of KPIs is calculated by the the RTE using data from the building
emulator being controlled.
For more information, please visit [IBPSA Project 1 - BOPTEST](https://github.com/ibpsa/project1-boptest).
# Prerequisites
* Python 3 (tested with Python3.10)
* Linux OS (tested with Ubuntu 22.04)
## Python
<details>
<summary>To install specific Python version (e.g., Python 3.10), we recommend using <a href="https://github.com/pyenv/pyenv"><code>pyenv</code></a>.</summary>
```shell
# install pyenv
git clone https://github.com/pyenv/pyenv ~/.pyenv
# setup pyenv (you should also put these three lines in .bashrc or similar)
export PATH="${HOME}/.pyenv/bin:${PATH}"
export PYENV_ROOT="${HOME}/.pyenv"
eval "$(pyenv init -)"
# install Python 3.10
pyenv install 3.10
# make it available globally
pyenv global system 3.10
```
</details>
# Quick-start
### Setup environment and VOLTTRON platform
The following recipe walks through the steps to install and demonstrate basic usage of "volttron-boptest" agent.
The following recipe walks through the steps to install and run use case example.
Note: For the ease of reproducibility, in this demo, we
will git clone the [volttron-boptest](https://github.com/eclipse-volttron/volttron-boptest) repo to the `~/sandbox/`
path. Feel free to modify the workflow as desired.
```shell
kefei@ubuntu-22:~/sandbox$ git clone https://github.com/eclipse-volttron/volttron-boptest.git
Cloning into 'volttron-boptest'...
remote: Enumerating objects: 450, done.
remote: Counting objects: 100% (450/450), done.
remote: Compressing objects: 100% (242/242), done.
remote: Total 450 (delta 192), reused 424 (delta 170), pack-reused 0
Receiving objects: 100% (450/450), 3.66 MiB | 7.06 MiB/s, done.
Resolving deltas: 100% (192/192), done.
kefei@ubuntu-22:~/sandbox$ cd volttron-boptest/
kefei@ubuntu-22:~/sandbox/volttron-boptest$
```
1. Create and activate a virtual environment.
It is recommended to use a virtual environment for installing volttron.
```shell
python -m venv env
source env/bin/activate
pip install volttron
```
1. Install volttron and start the platform.
> **Note**:
> According to the [volttron-core#README](https://github.com/eclipse-volttron/volttron-core#readme), setup
VOLTTRON_HOME
> environment variable is mandatory:
> ... if you have/had in the past, a monolithic VOLTTRON version that used the default VOLTTRON_HOME
> $HOME/.volttron. This modular version of VOLTTRON cannot work with volttron_home used by monolithic version of
> VOLTTRON(version 8.3 or earlier)
```shell
# Setup environment variable `VOLTTRON_HOME`
export VOLTTRON_HOME=<path-to-volttron_home-dir>
# Start platform with output going to volttron.log
volttron -vv -l volttron.log &
```
### Setup the boptest simulation server locally.
In order to demonstrate the basic usage of volttron-boptest-agent, we need to setup the boptest simulation server.
(Please see more details about boptest quick-start
at [Quick-Start to Deploy a Test Case](https://github.com/ibpsa/project1-boptest#quick-start-to-deploy-a-test-case))
1. Download [IBPSA Project 1 - BOPTEST](https://github.com/ibpsa/project1-boptest) repository to <boptest_repo>. For
demo purpose, let boptest_repo be `~/project1-boptest`.
```shell
git clone https://github.com/ibpsa/project1-boptest ~/project1-boptest
```
1. Install [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/).
Note: this demo run docker as a non-root user, you can
follow [Linux post-installation steps for Docker Engine](https://docs.docker.com/engine/install/linux-postinstall/)
to achieve similar setup.
(Optional) Verify with `docker-compose version` to verify the installation
```shell
(env) kefei@ubuntu-22:~/sandbox/volttron-boptest$ docker-compose version
docker-compose version 1.29.2, build unknown
docker-py version: 5.0.3
CPython version: 3.10.6
OpenSSL version: OpenSSL 3.0.2 15 Mar 2022
```
1. Build and deploy a test case.
The basic command to start a test case is by using `TESTCASE=<testcase_name> docker-compose up`.
For demo purpose, we will build and deploy testcase1, for avialbe testcases please
see [testcases/](https://github.com/ibpsa/project1-boptest/tree/master/testcases)
```shell
(env) kefei@ubuntu-22:~/sandbox/volttron-boptest$ TESTCASE=testcase1 docker-compose --file ~/project1-boptest/docker-compose.yml up
Creating network "boptest-net" with the default driver
Creating project1-boptest_boptest_1 ... done
Attaching to project1-boptest_boptest_1
boptest_1 | 07/13/2023 09:59:42 PM UTC root INFO Control step set successfully.
boptest_1 | 07/13/2023 09:59:42 PM UTC root INFO Test simulation initialized successfully to 0.0s with warmup period of
0.0s.
boptest_1 | 07/13/2023 09:59:42 PM UTC root INFO Test case scenario was set successfully.
...
boptest_1 | * Debug mode: off
boptest_1 | 07/13/2023 09:59:42 PM UTC werkzeug INFO * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
```
Or use detach mode
```shell
(env) kefei@ubuntu-22:~/sandbox/volttron-boptest$ TESTCASE=testcase1 docker-compose --file ~/project1-boptest/docker-compose.yml up --detach
Starting project1-boptest_boptest_1 ... done
(env) kefei@ubuntu-22:~/sandbox/volttron-boptest$ docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ddd0f2cc1f99 boptest_base "/bin/sh -c 'python …" 23 hours ago Up 12 seconds 127.0.0.1:5000->5000/tcp project1-boptest_boptest_1
```
Note: Use `docker-compose down` to shut down the service.
Verify boptest simulation server is running properly:
```shell
(env) kefei@ubuntu-22:~/sandbox/volttron-boptest$ curl http://127.0.0.1:5000/name
{"message":"Queried the name of the test case successfully.","payload":{"name":"testcase1"},"status":200}
```
### Install volttron boptest agent
1. Install the "volttron-boptest" dependency.
There are two options to install volttron-boptest. You can install this library using the version on PyPi or install
it from the source code (`git clone` might be required.)
Note: the `vctl install` command in the following step can handle dependency installation using pypi. However, in
this demo we demonstrate what is happening under the neath the hood by separating the dependency installation and
agent registry
steps.
```shell
# option 1: install from pypi
pip install volttron-boptest
# option 2: install from the source code (Note: `-e` option to use editable mode, useful for development.)
pip install [-e] <path-to-the-source-code-root>/volttron-boptest/
```
1. Install and start the "volttron-boptest" agent.
We will use the [testcase1.config](examples/testcase1.config) as the agent config for this demo. Please
see [examples/](examples) for other example config files.
Use `vctl install` command to register to the volttron home path.
Note: for demo purposes and reproducibility, we assign vip-identity as "volttron_boptest_agent", but you can choose
any other valid agent identity as desired.
```shell
(env) kefei@ubuntu-22:~/sandbox/volttron-boptest$ vctl install volttron-boptest \
--agent-config volttron-boptest-agent/examples/testcase1.config \
--vip-identity volttron_boptest_agent \
--start
Agent a0fd6f5c-3751-4312-9f59-ca541b8aac4e installed and started [4980]
```
Observe Data
The volttron-boptest agent publishes events on the message bus. To see these events in the Volttron log file, install
a [Listener Agent](https://pypi.org/project/volttron-listener/):
```
vctl install volttron-listener --start
```
(Optional) Use `vctl stauts` to verify the installation
```shell
(env) kefei@ubuntu-22:~/sandbox/volttron-boptest$ vctl status
UUID AGENT IDENTITY TAG PRIORITY STATUS HEALTH
a volttron-boptest-agent-0.0.1 volttron_boptest_agent running [59108] GOOD
2 volttron-listener-0.2.0rc0 volttron-listener-0.2.0rc0_1 running [59096] GOOD
```
1. (optional) Inspect the volttron.log file
<details>
<summary> Within the volttron.log, we should see similar logs as follows</summary>
```shell
# Create config file place holders
KPI RESULTS
-----------
2023-07-13 18:27:51,124 (volttron-boptest-agent-0.0.1 59108) root(186) INFO: emis_tot: 0.2147137757521314 KgCO2/m$^2$
2023-07-13 18:27:51,174 (volttron-boptest-agent-0.0.1 59108) root(186) INFO: ener_tot: 1.073568878760657 kWh/m$^2$
2023-07-13 18:27:51,223 (volttron-boptest-agent-0.0.1 59108) root(186) INFO: idis_tot: 508.47225004790033 ppmh/zone
2023-07-13 18:27:51,280 (volttron-boptest-agent-0.0.1 59108) root(186) INFO: pdih_tot: None kW/m$^2$
2023-07-13 18:27:51,330 (volttron-boptest-agent-0.0.1 59108) root(186) INFO: pele_tot: None kW/m$^2$
2023-07-13 18:27:51,381 (volttron-boptest-agent-0.0.1 59108) root(186) INFO: pgas_tot: 0.09615811655434148 kW/m$^2$
2023-07-13 18:27:51,436 (volttron-boptest-agent-0.0.1 59108) root(186) INFO: tdis_tot: 5.316029375566828 Kh/zone
2023-07-13 18:27:51,494 (volttron-boptest-agent-0.0.1 59108) root(186) INFO: time_rat: 0.001856946445725582 s/s
2023-07-13 18:27:51,550 (volttron-boptest-agent-0.0.1 59108) root(202) INFO: ======== run workflow completed.======
2023-07-13 18:27:51,553 (volttron-boptest-agent-0.0.1 59108) <stdout>(0) INFO: ["======= kpi {'cost_tot': 0.075149821513246, 'emis_tot': 0.2147137757521314, 'ener_tot': 1.073568878760657, 'idis_tot': 508.47225004790033, 'pdih_tot': None, 'pele_tot': None, 'pgas_tot': 0.09615811655434148, 'tdis_tot': 5.316029375566828, 'time_rat': 0.001856946445725582}"]
2023-07-13 18:27:51,558 (volttron-boptest-agent-0.0.1 59108) root(129) INFO: =========== refactoring onstart
2023-07-13 18:27:52,067 (volttron-listener-0.2.0rc0 59096) listener.agent(104) INFO: Peer: pubsub, Sender: volttron_boptest_agent:, Bus: , Topic: PNNL/BUILDING/UNIT/kpi, Headers: {'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message:
("{'cost_tot': 0.075149821513246, 'emis_tot': 0.2147137757521314, 'ener_tot': "
"1.073568878760657, 'idis_tot': 508.47225004790033, 'pdih_tot': None, "
"'pele_tot': None, 'pgas_tot': 0.09615811655434148, 'tdis_tot': "
"5.316029375566828, 'time_rat': 0.001856946445725582}")
2023-07-13 18:27:52,071 (volttron-listener-0.2.0rc0 59096) listener.agent(104) INFO: Peer: pubsub, Sender: volttron_boptest_agent:, Bus: , Topic: PNNL/BUILDING/UNIT/kpi, Headers: {'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message:
("{'cost_tot': 0.075149821513246, 'emis_tot': 0.2147137757521314, 'ener_tot': "
"1.073568878760657, 'idis_tot': 508.47225004790033, 'pdih_tot': None, "
"'pele_tot': None, 'pgas_tot': 0.09615811655434148, 'tdis_tot': "
"5.316029375566828, 'time_rat': 0.001856946445725582}")
2023-07-13 18:27:52,073 (volttron-listener-0.2.0rc0 59096) listener.agent(104) INFO: Peer: pubsub, Sender: volttron_boptest_agent:, Bus: , Topic: PNNL/BUILDING/UNIT/kpi, Headers: {'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message:
("{'cost_tot': 0.075149821513246, 'emis_tot': 0.2147137757521314, 'ener_tot': "
"1.073568878760657, 'idis_tot': 508.47225004790033, 'pdih_tot': None, "
"'pele_tot': None, 'pgas_tot': 0.09615811655434148, 'tdis_tot': "
"5.316029375566828, 'time_rat': 0.001856946445725582}")
2023-07-13 18:27:52,074 (volttron-listener-0.2.0rc0 59096) listener.agent(104) INFO: Peer: pubsub, Sender: volttron_boptest_agent:, Bus: , Topic: PNNL/BUILDING/UNIT/kpi, Headers: {'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message:
("{'cost_tot': 0.075149821513246, 'emis_tot': 0.2147137757521314, 'ener_tot': "
"1.073568878760657, 'idis_tot': 508.47225004790033, 'pdih_tot': None, "
"'pele_tot': None, 'pgas_tot': 0.09615811655434148, 'tdis_tot': "
"5.316029375566828, 'time_rat': 0.001856946445725582}")
2023-07-13 18:27:52,075 (volttron-listener-0.2.0rc0 59096) listener.agent(104) INFO: Peer: pubsub, Sender: volttron_boptest_agent:, Bus: , Topic: PNNL/BUILDING/UNIT/kpi, Headers: {'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message:
("{'cost_tot': 0.075149821513246, 'emis_tot': 0.2147137757521314, 'ener_tot': "
"1.073568878760657, 'idis_tot': 508.47225004790033, 'pdih_tot': None, "
"'pele_tot': None, 'pgas_tot': 0.09615811655434148, 'tdis_tot': "
"5.316029375566828, 'time_rat': 0.001856946445725582}")
2023-07-13 18:27:52,076 (volttron-listener-0.2.0rc0 59096) listener.agent(104) INFO: Peer: pubsub, Sender: volttron_boptest_agent:, Bus: , Topic: PNNL/BUILDING/UNIT/kpi, Headers: {'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message:
("{'cost_tot': 0.075149821513246, 'emis_tot': 0.2147137757521314, 'ener_tot': "
"1.073568878760657, 'idis_tot': 508.47225004790033, 'pdih_tot': None, "
"'pele_tot': None, 'pgas_tot': 0.09615811655434148, 'tdis_tot': "
"5.316029375566828, 'time_rat': 0.001856946445725582}")
2023-07-13 18:27:52,078 (volttron-listener-0.2.0rc0 59096) listener.agent(104) INFO: Peer: pubsub, Sender: volttron_boptest_agent:, Bus: , Topic: PNNL/BUILDING/UNIT/kpi, Headers: {'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message:
("{'cost_tot': 0.075149821513246, 'emis_tot': 0.2147137757521314, 'ener_tot': "
"1.073568878760657, 'idis_tot': 508.47225004790033, 'pdih_tot': None, "
"'pele_tot': None, 'pgas_tot': 0.09615811655434148, 'tdis_tot': "
"5.316029375566828, 'time_rat': 0.001856946445725582}")
2023-07-13 18:27:52,079 (volttron-listener-0.2.0rc0 59096) listener.agent(104) INFO: Peer: pubsub, Sender: volttron_boptest_agent:, Bus: , Topic: PNNL/BUILDING/UNIT/kpi, Headers: {'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message:
("{'cost_tot': 0.075149821513246, 'emis_tot': 0.2147137757521314, 'ener_tot': "
"1.073568878760657, 'idis_tot': 508.47225004790033, 'pdih_tot': None, "
"'pele_tot': None, 'pgas_tot': 0.09615811655434148, 'tdis_tot': "
"5.316029375566828, 'time_rat': 0.001856946445725582}")
2023-07-13 18:27:52,081 (volttron-listener-0.2.0rc0 59096) listener.agent(104) INFO: Peer: pubsub, Sender: volttron_boptest_agent:, Bus: , Topic: PNNL/BUILDING/UNIT/kpi, Headers: {'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message:
("{'cost_tot': 0.075149821513246, 'emis_tot': 0.2147137757521314, 'ener_tot': "
"1.073568878760657, 'idis_tot': 508.47225004790033, 'pdih_tot': None, "
"'pele_tot': None, 'pgas_tot': 0.09615811655434148, 'tdis_tot': "
"5.316029375566828, 'time_rat': 0.001856946445725582}")
2023-07-13 18:27:52,084 (volttron-boptest-agent-0.0.1 59108) root(305) INFO: ======== onstart completed.======
```
</details>
# Development
Please see the following for contributing
guidelines [contributing](https://github.com/eclipse-volttron/volttron-core/blob/develop/CONTRIBUTING.md).
Please see the following helpful guide
about [developing modular VOLTTRON agents](https://github.com/eclipse-volttron/volttron-core/blob/develop/DEVELOPING_ON_MODULAR.md)
# Disclaimer Notice
This material was prepared as an account of work sponsored by an agency of the
United States Government. Neither the United States Government nor the United
States Department of Energy, nor Battelle, nor any of their employees, nor any
jurisdiction or organization that has cooperated in the development of these
materials, makes any warranty, express or implied, or assumes any legal
liability or responsibility for the accuracy, completeness, or usefulness or any
information, apparatus, product, software, or process disclosed, or represents
that its use would not infringe privately owned rights.
Reference herein to any specific commercial product, process, or service by
trade name, trademark, manufacturer, or otherwise does not necessarily
constitute or imply its endorsement, recommendation, or favoring by the United
States Government or any agency thereof, or Battelle Memorial Institute. The
views and opinions of authors expressed herein do not necessarily state or
reflect those of the United States Government or any agency thereof.
Raw data
{
"_id": null,
"home_page": "https://github.com/eclipse-volttron/volttron-boptest",
"name": "volttron-boptest",
"maintainer": "Volttron Team",
"docs_url": null,
"requires_python": ">=3.10,<4.0",
"maintainer_email": "volttron@pnnl.gov",
"keywords": "volttron,agent,boptest,simulation,application",
"author": "Kefei Mo",
"author_email": "kefei.mo@pnnl.gov",
"download_url": "https://files.pythonhosted.org/packages/c8/2c/3147f5e140c66718637ec3bb5fc6b3afd8b1a22f78d19adf675b2493b066/volttron_boptest-0.1.1rc5.tar.gz",
"platform": null,
"description": "# boptest-agent\n\nThe volttron-boptest-agent utilizes the volttron-lib-boptest-integration library to perform simulation control and\nbenchmark tasks.\n\nBOPTEST is designed to facilitate\nthe performance evaluation and benchmarking of building control strategies, which\ncontains these key components:\n\n1. Run-Time Environment (RTE): Deployed with Docker and accessed with a RESTful HTTP API, use the RTE to set up tests,\n control building emulators, access data, and report KPIs.\n\n1. Test Case Repository: A collection of ready-to-use building emulators representing a range of building types and HVAC\n systems.\n\n1. Key Performance Indicator (KPI) Reporting: A set of KPIs is calculated by the the RTE using data from the building\n emulator being controlled.\n\nFor more information, please visit [IBPSA Project 1 - BOPTEST](https://github.com/ibpsa/project1-boptest).\n\n# Prerequisites\n\n* Python 3 (tested with Python3.10)\n* Linux OS (tested with Ubuntu 22.04)\n\n## Python\n\n<details>\n<summary>To install specific Python version (e.g., Python 3.10), we recommend using <a href=\"https://github.com/pyenv/pyenv\"><code>pyenv</code></a>.</summary>\n\n```shell\n# install pyenv\ngit clone https://github.com/pyenv/pyenv ~/.pyenv\n\n# setup pyenv (you should also put these three lines in .bashrc or similar)\nexport PATH=\"${HOME}/.pyenv/bin:${PATH}\"\nexport PYENV_ROOT=\"${HOME}/.pyenv\"\neval \"$(pyenv init -)\"\n\n# install Python 3.10\npyenv install 3.10\n\n# make it available globally\npyenv global system 3.10\n```\n\n</details>\n\n# Quick-start\n\n### Setup environment and VOLTTRON platform\n\nThe following recipe walks through the steps to install and demonstrate basic usage of \"volttron-boptest\" agent.\n\nThe following recipe walks through the steps to install and run use case example.\n\nNote: For the ease of reproducibility, in this demo, we\nwill git clone the [volttron-boptest](https://github.com/eclipse-volttron/volttron-boptest) repo to the `~/sandbox/`\npath. Feel free to modify the workflow as desired.\n\n ```shell\n kefei@ubuntu-22:~/sandbox$ git clone https://github.com/eclipse-volttron/volttron-boptest.git\n Cloning into 'volttron-boptest'...\n remote: Enumerating objects: 450, done.\n remote: Counting objects: 100% (450/450), done.\n remote: Compressing objects: 100% (242/242), done.\n remote: Total 450 (delta 192), reused 424 (delta 170), pack-reused 0\n Receiving objects: 100% (450/450), 3.66 MiB | 7.06 MiB/s, done.\n Resolving deltas: 100% (192/192), done.\n kefei@ubuntu-22:~/sandbox$ cd volttron-boptest/\n kefei@ubuntu-22:~/sandbox/volttron-boptest$ \n ```\n\n1. Create and activate a virtual environment.\n\n It is recommended to use a virtual environment for installing volttron.\n\n ```shell\n python -m venv env\n source env/bin/activate\n \n pip install volttron\n ```\n\n1. Install volttron and start the platform.\n\n > **Note**:\n > According to the [volttron-core#README](https://github.com/eclipse-volttron/volttron-core#readme), setup\n VOLTTRON_HOME\n > environment variable is mandatory:\n > ... if you have/had in the past, a monolithic VOLTTRON version that used the default VOLTTRON_HOME\n > $HOME/.volttron. This modular version of VOLTTRON cannot work with volttron_home used by monolithic version of\n > VOLTTRON(version 8.3 or earlier)\n\n ```shell\n # Setup environment variable `VOLTTRON_HOME`\n export VOLTTRON_HOME=<path-to-volttron_home-dir>\n \n # Start platform with output going to volttron.log\n volttron -vv -l volttron.log &\n ```\n\n### Setup the boptest simulation server locally.\n\nIn order to demonstrate the basic usage of volttron-boptest-agent, we need to setup the boptest simulation server.\n\n(Please see more details about boptest quick-start\nat [Quick-Start to Deploy a Test Case](https://github.com/ibpsa/project1-boptest#quick-start-to-deploy-a-test-case))\n\n1. Download [IBPSA Project 1 - BOPTEST](https://github.com/ibpsa/project1-boptest) repository to <boptest_repo>. For\n demo purpose, let boptest_repo be `~/project1-boptest`.\n\n ```shell\n git clone https://github.com/ibpsa/project1-boptest ~/project1-boptest\n ```\n\n1. Install [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/).\n\n Note: this demo run docker as a non-root user, you can\n follow [Linux post-installation steps for Docker Engine](https://docs.docker.com/engine/install/linux-postinstall/)\n to achieve similar setup.\n\n (Optional) Verify with `docker-compose version` to verify the installation\n ```shell\n (env) kefei@ubuntu-22:~/sandbox/volttron-boptest$ docker-compose version\n docker-compose version 1.29.2, build unknown\n docker-py version: 5.0.3\n CPython version: 3.10.6\n OpenSSL version: OpenSSL 3.0.2 15 Mar 2022\n\n ```\n\n1. Build and deploy a test case.\n\n The basic command to start a test case is by using `TESTCASE=<testcase_name> docker-compose up`.\n\n For demo purpose, we will build and deploy testcase1, for avialbe testcases please\n see [testcases/](https://github.com/ibpsa/project1-boptest/tree/master/testcases)\n ```shell\n (env) kefei@ubuntu-22:~/sandbox/volttron-boptest$ TESTCASE=testcase1 docker-compose --file ~/project1-boptest/docker-compose.yml up\n Creating network \"boptest-net\" with the default driver\n Creating project1-boptest_boptest_1 ... done\n Attaching to project1-boptest_boptest_1\n boptest_1 | 07/13/2023 09:59:42 PM UTC root INFO Control step set successfully.\n boptest_1 | 07/13/2023 09:59:42 PM UTC root INFO Test simulation initialized successfully to 0.0s with warmup period of\n 0.0s.\n boptest_1 | 07/13/2023 09:59:42 PM UTC root INFO Test case scenario was set successfully.\n ...\n boptest_1 | * Debug mode: off\n boptest_1 | 07/13/2023 09:59:42 PM UTC werkzeug INFO * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)\n ```\n Or use detach mode\n ```shell\n (env) kefei@ubuntu-22:~/sandbox/volttron-boptest$ TESTCASE=testcase1 docker-compose --file ~/project1-boptest/docker-compose.yml up --detach \n Starting project1-boptest_boptest_1 ... done\n (env) kefei@ubuntu-22:~/sandbox/volttron-boptest$ docker container ls\n CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\n ddd0f2cc1f99 boptest_base \"/bin/sh -c 'python \u2026\" 23 hours ago Up 12 seconds 127.0.0.1:5000->5000/tcp project1-boptest_boptest_1\n ```\n\n Note: Use `docker-compose down` to shut down the service.\n\n Verify boptest simulation server is running properly:\n ```shell\n (env) kefei@ubuntu-22:~/sandbox/volttron-boptest$ curl http://127.0.0.1:5000/name\n {\"message\":\"Queried the name of the test case successfully.\",\"payload\":{\"name\":\"testcase1\"},\"status\":200}\n ```\n\n### Install volttron boptest agent\n\n1. Install the \"volttron-boptest\" dependency.\n\n There are two options to install volttron-boptest. You can install this library using the version on PyPi or install\n it from the source code (`git clone` might be required.)\n Note: the `vctl install` command in the following step can handle dependency installation using pypi. However, in\n this demo we demonstrate what is happening under the neath the hood by separating the dependency installation and\n agent registry\n steps.\n\n ```shell\n # option 1: install from pypi\n pip install volttron-boptest\n \n # option 2: install from the source code (Note: `-e` option to use editable mode, useful for development.)\n pip install [-e] <path-to-the-source-code-root>/volttron-boptest/\n ```\n\n1. Install and start the \"volttron-boptest\" agent.\n\n We will use the [testcase1.config](examples/testcase1.config) as the agent config for this demo. Please\n see [examples/](examples) for other example config files.\n\n Use `vctl install` command to register to the volttron home path.\n Note: for demo purposes and reproducibility, we assign vip-identity as \"volttron_boptest_agent\", but you can choose\n any other valid agent identity as desired.\n\n ```shell\n (env) kefei@ubuntu-22:~/sandbox/volttron-boptest$ vctl install volttron-boptest \\\n --agent-config volttron-boptest-agent/examples/testcase1.config \\\n --vip-identity volttron_boptest_agent \\\n --start\n Agent a0fd6f5c-3751-4312-9f59-ca541b8aac4e installed and started [4980]\n ```\n\n Observe Data\n\n The volttron-boptest agent publishes events on the message bus. To see these events in the Volttron log file, install\n a [Listener Agent](https://pypi.org/project/volttron-listener/):\n\n ```\n vctl install volttron-listener --start\n ```\n\n(Optional) Use `vctl stauts` to verify the installation\n\n ```shell\n (env) kefei@ubuntu-22:~/sandbox/volttron-boptest$ vctl status\n UUID AGENT IDENTITY TAG PRIORITY STATUS HEALTH \n a volttron-boptest-agent-0.0.1 volttron_boptest_agent running [59108] GOOD\n 2 volttron-listener-0.2.0rc0 volttron-listener-0.2.0rc0_1 running [59096] GOOD\n ```\n\n1. (optional) Inspect the volttron.log file\n\n <details>\n <summary> Within the volttron.log, we should see similar logs as follows</summary>\n\n ```shell\n # Create config file place holders\n KPI RESULTS \n -----------\n 2023-07-13 18:27:51,124 (volttron-boptest-agent-0.0.1 59108) root(186) INFO: emis_tot: 0.2147137757521314 KgCO2/m$^2$\n 2023-07-13 18:27:51,174 (volttron-boptest-agent-0.0.1 59108) root(186) INFO: ener_tot: 1.073568878760657 kWh/m$^2$\n 2023-07-13 18:27:51,223 (volttron-boptest-agent-0.0.1 59108) root(186) INFO: idis_tot: 508.47225004790033 ppmh/zone\n 2023-07-13 18:27:51,280 (volttron-boptest-agent-0.0.1 59108) root(186) INFO: pdih_tot: None kW/m$^2$\n 2023-07-13 18:27:51,330 (volttron-boptest-agent-0.0.1 59108) root(186) INFO: pele_tot: None kW/m$^2$\n 2023-07-13 18:27:51,381 (volttron-boptest-agent-0.0.1 59108) root(186) INFO: pgas_tot: 0.09615811655434148 kW/m$^2$\n 2023-07-13 18:27:51,436 (volttron-boptest-agent-0.0.1 59108) root(186) INFO: tdis_tot: 5.316029375566828 Kh/zone\n 2023-07-13 18:27:51,494 (volttron-boptest-agent-0.0.1 59108) root(186) INFO: time_rat: 0.001856946445725582 s/s\n 2023-07-13 18:27:51,550 (volttron-boptest-agent-0.0.1 59108) root(202) INFO: ======== run workflow completed.======\n 2023-07-13 18:27:51,553 (volttron-boptest-agent-0.0.1 59108) <stdout>(0) INFO: [\"======= kpi {'cost_tot': 0.075149821513246, 'emis_tot': 0.2147137757521314, 'ener_tot': 1.073568878760657, 'idis_tot': 508.47225004790033, 'pdih_tot': None, 'pele_tot': None, 'pgas_tot': 0.09615811655434148, 'tdis_tot': 5.316029375566828, 'time_rat': 0.001856946445725582}\"]\n 2023-07-13 18:27:51,558 (volttron-boptest-agent-0.0.1 59108) root(129) INFO: =========== refactoring onstart\n 2023-07-13 18:27:52,067 (volttron-listener-0.2.0rc0 59096) listener.agent(104) INFO: Peer: pubsub, Sender: volttron_boptest_agent:, Bus: , Topic: PNNL/BUILDING/UNIT/kpi, Headers: {'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message: \n (\"{'cost_tot': 0.075149821513246, 'emis_tot': 0.2147137757521314, 'ener_tot': \"\n \"1.073568878760657, 'idis_tot': 508.47225004790033, 'pdih_tot': None, \"\n \"'pele_tot': None, 'pgas_tot': 0.09615811655434148, 'tdis_tot': \"\n \"5.316029375566828, 'time_rat': 0.001856946445725582}\")\n 2023-07-13 18:27:52,071 (volttron-listener-0.2.0rc0 59096) listener.agent(104) INFO: Peer: pubsub, Sender: volttron_boptest_agent:, Bus: , Topic: PNNL/BUILDING/UNIT/kpi, Headers: {'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message: \n (\"{'cost_tot': 0.075149821513246, 'emis_tot': 0.2147137757521314, 'ener_tot': \"\n \"1.073568878760657, 'idis_tot': 508.47225004790033, 'pdih_tot': None, \"\n \"'pele_tot': None, 'pgas_tot': 0.09615811655434148, 'tdis_tot': \"\n \"5.316029375566828, 'time_rat': 0.001856946445725582}\")\n 2023-07-13 18:27:52,073 (volttron-listener-0.2.0rc0 59096) listener.agent(104) INFO: Peer: pubsub, Sender: volttron_boptest_agent:, Bus: , Topic: PNNL/BUILDING/UNIT/kpi, Headers: {'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message: \n (\"{'cost_tot': 0.075149821513246, 'emis_tot': 0.2147137757521314, 'ener_tot': \"\n \"1.073568878760657, 'idis_tot': 508.47225004790033, 'pdih_tot': None, \"\n \"'pele_tot': None, 'pgas_tot': 0.09615811655434148, 'tdis_tot': \"\n \"5.316029375566828, 'time_rat': 0.001856946445725582}\")\n 2023-07-13 18:27:52,074 (volttron-listener-0.2.0rc0 59096) listener.agent(104) INFO: Peer: pubsub, Sender: volttron_boptest_agent:, Bus: , Topic: PNNL/BUILDING/UNIT/kpi, Headers: {'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message: \n (\"{'cost_tot': 0.075149821513246, 'emis_tot': 0.2147137757521314, 'ener_tot': \"\n \"1.073568878760657, 'idis_tot': 508.47225004790033, 'pdih_tot': None, \"\n \"'pele_tot': None, 'pgas_tot': 0.09615811655434148, 'tdis_tot': \"\n \"5.316029375566828, 'time_rat': 0.001856946445725582}\")\n 2023-07-13 18:27:52,075 (volttron-listener-0.2.0rc0 59096) listener.agent(104) INFO: Peer: pubsub, Sender: volttron_boptest_agent:, Bus: , Topic: PNNL/BUILDING/UNIT/kpi, Headers: {'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message: \n (\"{'cost_tot': 0.075149821513246, 'emis_tot': 0.2147137757521314, 'ener_tot': \"\n \"1.073568878760657, 'idis_tot': 508.47225004790033, 'pdih_tot': None, \"\n \"'pele_tot': None, 'pgas_tot': 0.09615811655434148, 'tdis_tot': \"\n \"5.316029375566828, 'time_rat': 0.001856946445725582}\")\n 2023-07-13 18:27:52,076 (volttron-listener-0.2.0rc0 59096) listener.agent(104) INFO: Peer: pubsub, Sender: volttron_boptest_agent:, Bus: , Topic: PNNL/BUILDING/UNIT/kpi, Headers: {'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message: \n (\"{'cost_tot': 0.075149821513246, 'emis_tot': 0.2147137757521314, 'ener_tot': \"\n \"1.073568878760657, 'idis_tot': 508.47225004790033, 'pdih_tot': None, \"\n \"'pele_tot': None, 'pgas_tot': 0.09615811655434148, 'tdis_tot': \"\n \"5.316029375566828, 'time_rat': 0.001856946445725582}\")\n 2023-07-13 18:27:52,078 (volttron-listener-0.2.0rc0 59096) listener.agent(104) INFO: Peer: pubsub, Sender: volttron_boptest_agent:, Bus: , Topic: PNNL/BUILDING/UNIT/kpi, Headers: {'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message: \n (\"{'cost_tot': 0.075149821513246, 'emis_tot': 0.2147137757521314, 'ener_tot': \"\n \"1.073568878760657, 'idis_tot': 508.47225004790033, 'pdih_tot': None, \"\n \"'pele_tot': None, 'pgas_tot': 0.09615811655434148, 'tdis_tot': \"\n \"5.316029375566828, 'time_rat': 0.001856946445725582}\")\n 2023-07-13 18:27:52,079 (volttron-listener-0.2.0rc0 59096) listener.agent(104) INFO: Peer: pubsub, Sender: volttron_boptest_agent:, Bus: , Topic: PNNL/BUILDING/UNIT/kpi, Headers: {'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message: \n (\"{'cost_tot': 0.075149821513246, 'emis_tot': 0.2147137757521314, 'ener_tot': \"\n \"1.073568878760657, 'idis_tot': 508.47225004790033, 'pdih_tot': None, \"\n \"'pele_tot': None, 'pgas_tot': 0.09615811655434148, 'tdis_tot': \"\n \"5.316029375566828, 'time_rat': 0.001856946445725582}\")\n 2023-07-13 18:27:52,081 (volttron-listener-0.2.0rc0 59096) listener.agent(104) INFO: Peer: pubsub, Sender: volttron_boptest_agent:, Bus: , Topic: PNNL/BUILDING/UNIT/kpi, Headers: {'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message: \n (\"{'cost_tot': 0.075149821513246, 'emis_tot': 0.2147137757521314, 'ener_tot': \"\n \"1.073568878760657, 'idis_tot': 508.47225004790033, 'pdih_tot': None, \"\n \"'pele_tot': None, 'pgas_tot': 0.09615811655434148, 'tdis_tot': \"\n \"5.316029375566828, 'time_rat': 0.001856946445725582}\")\n 2023-07-13 18:27:52,084 (volttron-boptest-agent-0.0.1 59108) root(305) INFO: ======== onstart completed.======\n ```\n\n </details>\n\n# Development\n\nPlease see the following for contributing\nguidelines [contributing](https://github.com/eclipse-volttron/volttron-core/blob/develop/CONTRIBUTING.md).\n\nPlease see the following helpful guide\nabout [developing modular VOLTTRON agents](https://github.com/eclipse-volttron/volttron-core/blob/develop/DEVELOPING_ON_MODULAR.md)\n\n# Disclaimer Notice\n\nThis material was prepared as an account of work sponsored by an agency of the\nUnited States Government. Neither the United States Government nor the United\nStates Department of Energy, nor Battelle, nor any of their employees, nor any\njurisdiction or organization that has cooperated in the development of these\nmaterials, makes any warranty, express or implied, or assumes any legal\nliability or responsibility for the accuracy, completeness, or usefulness or any\ninformation, apparatus, product, software, or process disclosed, or represents\nthat its use would not infringe privately owned rights.\n\nReference herein to any specific commercial product, process, or service by\ntrade name, trademark, manufacturer, or otherwise does not necessarily\nconstitute or imply its endorsement, recommendation, or favoring by the United\nStates Government or any agency thereof, or Battelle Memorial Institute. The\nviews and opinions of authors expressed herein do not necessarily state or\nreflect those of the United States Government or any agency thereof.\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "A Volttron agent that runs boptest simulation.",
"version": "0.1.1rc5",
"project_urls": {
"Bug Tracker": "https://github.com/eclipse-volttron/volttron-boptest/issues",
"Homepage": "https://github.com/eclipse-volttron/volttron-boptest",
"Repository": "https://github.com/eclipse-volttron/volttron-boptest"
},
"split_keywords": [
"volttron",
"agent",
"boptest",
"simulation",
"application"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d27b1dd54f773198cc4dd1a8380784c9efb72be4facaccbf170c0c6521ccd2dd",
"md5": "b6ea52e0d865b2da281f2b5747903124",
"sha256": "34c73b9c5052cbb7a91f5725b4f54bc9913c55615d4b5de94c9d904956195b50"
},
"downloads": -1,
"filename": "volttron_boptest-0.1.1rc5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b6ea52e0d865b2da281f2b5747903124",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10,<4.0",
"size": 16326,
"upload_time": "2023-09-26T17:44:58",
"upload_time_iso_8601": "2023-09-26T17:44:58.305274Z",
"url": "https://files.pythonhosted.org/packages/d2/7b/1dd54f773198cc4dd1a8380784c9efb72be4facaccbf170c0c6521ccd2dd/volttron_boptest-0.1.1rc5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c82c3147f5e140c66718637ec3bb5fc6b3afd8b1a22f78d19adf675b2493b066",
"md5": "9bce7ab2d9de4745fc177cebe842cbac",
"sha256": "4af74bb6a6f0e9b7c82493a19a92bbad7d381a2e6835bafe1fbc1ec4981ea201"
},
"downloads": -1,
"filename": "volttron_boptest-0.1.1rc5.tar.gz",
"has_sig": false,
"md5_digest": "9bce7ab2d9de4745fc177cebe842cbac",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10,<4.0",
"size": 18159,
"upload_time": "2023-09-26T17:45:00",
"upload_time_iso_8601": "2023-09-26T17:45:00.027464Z",
"url": "https://files.pythonhosted.org/packages/c8/2c/3147f5e140c66718637ec3bb5fc6b3afd8b1a22f78d19adf675b2493b066/volttron_boptest-0.1.1rc5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-26 17:45:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "eclipse-volttron",
"github_project": "volttron-boptest",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "volttron-boptest"
}