├── user_guide_examples
├── advanced
│ ├── advanced_dynamic_federation
│ │ ├── out.txt
│ │ ├── ControllerConfig.json
│ │ ├── README.md
│ │ ├── BatteryLateConfig.json
│ │ ├── dynamic_federation_runner.json
│ │ └── BatteryConfig.json
│ ├── advanced_orchestration
│ │ ├── requirements.txt
│ │ ├── montecarlo-ev-peak-power.png
│ │ ├── simple
│ │ │ └── ev_uq_example.yaml
│ │ └── cli_runner_scripts
│ │ │ ├── advanced_orchestration_runner_0.json
│ │ │ ├── advanced_orchestration_runner_1.json
│ │ │ ├── advanced_orchestration_runner_2.json
│ │ │ ├── advanced_orchestration_runner_3.json
│ │ │ ├── advanced_orchestration_runner_4.json
│ │ │ ├── advanced_orchestration_runner_5.json
│ │ │ ├── advanced_orchestration_runner_6.json
│ │ │ ├── advanced_orchestration_runner_7.json
│ │ │ ├── advanced_orchestration_runner_8.json
│ │ │ ├── advanced_orchestration_runner_9.json
│ │ │ ├── advanced_orchestration_runner_10.json
│ │ │ ├── advanced_orchestration_runner_11.json
│ │ │ ├── advanced_orchestration_runner_12.json
│ │ │ ├── advanced_orchestration_runner_13.json
│ │ │ ├── advanced_orchestration_runner_14.json
│ │ │ ├── advanced_orchestration_runner_15.json
│ │ │ ├── advanced_orchestration_runner_16.json
│ │ │ ├── advanced_orchestration_runner_17.json
│ │ │ ├── advanced_orchestration_runner_18.json
│ │ │ ├── advanced_orchestration_runner_19.json
│ │ │ ├── advanced_orchestration_runner_20.json
│ │ │ ├── advanced_orchestration_runner_21.json
│ │ │ ├── advanced_orchestration_runner_22.json
│ │ │ ├── advanced_orchestration_runner_23.json
│ │ │ ├── advanced_orchestration_runner_24.json
│ │ │ ├── advanced_orchestration_runner_25.json
│ │ │ ├── advanced_orchestration_runner_26.json
│ │ │ ├── advanced_orchestration_runner_27.json
│ │ │ ├── advanced_orchestration_runner_28.json
│ │ │ └── advanced_orchestration_runner_29.json
│ ├── advanced_fmu
│ │ ├── SimpleBattery.fmu
│ │ ├── SimpleBatteryLinux.fmu
│ │ ├── .gitignore
│ │ ├── README.md
│ │ └── runner.json
│ ├── advanced_default_matlab
│ │ ├── getHelicsMaxTime.m
│ │ ├── README.md
│ │ ├── ControllerConfig.json
│ │ ├── advanced_default_runner.json
│ │ ├── get_new_battery.m
│ │ ├── calc_charging_voltage.m
│ │ ├── get_new_EV.m
│ │ ├── destroy_federate.m
│ │ └── estimate_SOC.m
│ ├── advanced_connector
│ │ ├── interface_creation
│ │ │ ├── ChargerConfig.json
│ │ │ ├── regex_matchfile.txt
│ │ │ ├── BatteryConfig.json
│ │ │ ├── README.md
│ │ │ ├── connector_interface_creation_runner.json
│ │ │ └── direct_matchfile.txt
│ │ └── matchfile
│ │ │ ├── regex_matchfile.txt
│ │ │ ├── README.md
│ │ │ ├── direct_matchfile.txt
│ │ │ ├── connector_matchfile_regex_runner.json
│ │ │ ├── connector_matchfile_direct_runner.json
│ │ │ └── direct_matchfile.json
│ ├── advanced_input_output
│ │ ├── fib1_config.json
│ │ ├── fib4_config.json
│ │ ├── README.md
│ │ └── fib_runner.json
│ ├── advanced_single_core
│ │ ├── single_core_runner.json
│ │ └── README.md
│ ├── advanced_brokers
│ │ ├── hierarchies
│ │ │ ├── broker_hierarchy_runner_A.json
│ │ │ ├── ControllerConfig.json
│ │ │ ├── README.md
│ │ │ ├── broker_hierarchy_runner_B.json
│ │ │ └── broker_hierarchy_runner_C.json
│ │ ├── multi_computer
│ │ │ ├── README.md
│ │ │ ├── computer1
│ │ │ │ ├── ControllerConfig.json
│ │ │ │ └── multi_computer_1_runner.json
│ │ │ └── computer2
│ │ │ │ ├── multi_computer_2_runner.json
│ │ │ │ └── BatteryConfig.json
│ │ ├── multi_broker
│ │ │ ├── multi_broker_config.json
│ │ │ ├── ControllerConfig.json
│ │ │ ├── README.md
│ │ │ └── multi_broker_runner.json
│ │ └── simultaneous
│ │ │ ├── federation_1
│ │ │ ├── ControllerConfig_1.json
│ │ │ └── federation_1_runner.json
│ │ │ ├── federation_2
│ │ │ ├── ControllerConfig_2.json
│ │ │ └── federation_2_runner.json
│ │ │ ├── federation_3
│ │ │ ├── ControllerConfig_3.json
│ │ │ └── federation_3_runner.json
│ │ │ └── README.md
│ ├── advanced_iteration
│ │ ├── README.md
│ │ ├── advanced_iteration_runner.json
│ │ ├── advanced_iteration_runner_noitermain.json
│ │ ├── ChargerConfig.json
│ │ └── BatteryConfig.json
│ ├── advanced_message_comm
│ │ ├── query
│ │ │ ├── ControllerConfig.json
│ │ │ ├── README.md
│ │ │ ├── query_runner.json
│ │ │ └── BatteryConfig.json
│ │ ├── multi_input
│ │ │ ├── README.md
│ │ │ ├── multi_input_runner.json
│ │ │ ├── ChargerConfig.json
│ │ │ └── BatteryConfig.json
│ │ └── translators
│ │ │ ├── translator_testfed_next_time.json
│ │ │ ├── translator_testfed_max_time.json
│ │ │ └── translator_runner.json
│ ├── advanced_default
│ │ ├── ControllerConfig.json
│ │ ├── README.md
│ │ ├── advanced_default_runner.json
│ │ ├── advanced_default_runner_web.json
│ │ └── BatteryConfig.json
│ ├── advanced_async_time_request
│ │ ├── ControllerConfig.json
│ │ ├── README.md
│ │ └── async_runner.json
│ └── advanced_default_pythonic
│ │ ├── ControllerConfig.json
│ │ ├── advanced_default_runner.json
│ │ └── README.md
├── requirements.txt
├── misc
│ └── gridlabd_example_1
│ │ ├── normalized_load_data_1min_ORIGINAL.mat
│ │ ├── README.md
│ │ ├── 1a_cosim_runner.json
│ │ ├── 1b_Transmission_config.json
│ │ ├── 1c_Transmission_config.json
│ │ ├── 1a_Transmission_config.json
│ │ ├── 1b_cosim_runner.json
│ │ ├── 1c_cosim_runner.json
│ │ └── 1a_IEEE_123_feeder.json
└── fundamental
│ ├── fundamental_integration
│ ├── README.md
│ └── fundamental_integration_runner.json
│ ├── fundamental_default
│ ├── README.md
│ ├── __helics-server
│ │ └── runner.json
│ ├── fundamental_default_runner.json
│ └── ChargerConfig.json
│ └── fundamental_message_comm
│ ├── combo
│ ├── ControllerConfig.json
│ ├── README.md
│ ├── fundamental_combo_runner.json
│ └── BatteryConfig.json
│ ├── endpoints
│ ├── README.md
│ ├── fundamental_endpoints_runner.json
│ ├── ChargerConfig.json
│ └── BatteryConfig.json
│ ├── filter_clone
│ ├── ControllerConfig.json
│ ├── LoggerConfig.json
│ ├── clone_runner_next_time.json
│ ├── clone_runner_max_time.json
│ ├── README.md
│ └── BatteryConfig.json
│ ├── multi_agent
│ ├── ControllerConfig.json
│ ├── README.md
│ ├── Battery1Config.json
│ ├── Battery2Config.json
│ ├── Battery3Config.json
│ ├── Battery4Config.json
│ ├── Battery5Config.json
│ ├── Charger1Config.json
│ ├── Charger2Config.json
│ ├── Charger3Config.json
│ ├── Charger4Config.json
│ └── Charger5Config.json
│ ├── filter_federate
│ ├── ControllerConfig.json
│ ├── README.md
│ ├── fundamental_filter_runner.json
│ └── FilterConfig.json
│ └── filter_native
│ ├── README.md
│ ├── ControllerConfig.json
│ ├── fundamental_filter_native_runner.json
│ └── BatteryConfig.json
├── unmaintained
├── example_files
│ ├── example1.recorder
│ ├── example_connections1.toml
│ ├── example_connections2.toml
│ ├── example_connections3.toml
│ ├── example_connections4.toml
│ ├── example_connections1.json
│ ├── example_connections2.json
│ ├── README.md
│ └── example1.player
└── python
│ ├── .idea
│ ├── .gitignore
│ ├── misc.xml
│ ├── vcs.xml
│ ├── inspectionProfiles
│ │ └── profiles_settings.xml
│ ├── modules.xml
│ └── python.iml
│ ├── osmses_2024_battery_charger
│ ├── requirements.txt
│ ├── osmses_2024_runner.json
│ ├── osmses_2024_runner_pythonic.json
│ ├── battery_config.json
│ ├── charger_config.json
│ └── README.md
│ ├── uvm
│ ├── uvm.code-workspace
│ └── 5ev_example
│ │ ├── ev_charge_runner.json
│ │ └── ev_charge_runner_5ev.json
│ ├── multi-node-pi-exchange
│ ├── README.md
│ └── docker-compose.yml
│ ├── pi-exchange-config
│ ├── receiver.json
│ ├── sender.json
│ ├── pireceiver.py
│ └── pisender.py
│ ├── timing-demo
│ └── runner.py
│ ├── python_demo
│ └── demo_runner.json
│ ├── delayed-pi-exchange
│ └── pi_exchange_runner.json
│ ├── helics_message_size
│ ├── runner_long_message.json
│ └── long_message_sender.py
│ ├── Manager_Worker_Example
│ ├── managed_worker_runner.json
│ ├── README.md
│ ├── federate.py
│ └── manager.py
│ ├── pi-exchange
│ └── broker.py
│ ├── simple
│ └── broker.py
│ └── fundamental_timing
│ ├── timing_runner.json
│ └── timing_fed_config.json
├── c
├── pi-exchange
│ ├── run_pi.sh
│ ├── run_pi2.sh
│ └── CMakeLists.txt
├── nonlings
│ ├── run_nonlings.sh
│ └── CMakeLists.txt
├── comboFederate1
│ ├── run.sh
│ ├── run3.sh
│ ├── openmpi-run.conf
│ ├── srun-mpi.conf
│ └── CMakeLists.txt
├── messageFederate1
│ ├── run.sh
│ ├── run3.sh
│ ├── openmpi-run.conf
│ ├── srun-mpi.conf
│ └── CMakeLists.txt
├── hello_world
│ ├── run_hello_world.sh
│ ├── Makefile
│ └── CMakeLists.txt
└── CMakeLists.txt
├── cpp98
├── pi-exchange
│ ├── run_pi.sh
│ ├── run_pi2.sh
│ └── CMakeLists.txt
├── CMakeLists.txt
└── nonlings
│ └── CMakeLists.txt
├── python
└── no_filter_benchmark
│ ├── with filter.png
│ ├── without filter.png
│ ├── results_with_filter.pickle
│ ├── results_without_filter.pickle
│ ├── echo_config.json
│ ├── source_sink_config.json
│ ├── ss_echo_filter_runner.json
│ ├── filter_config.json
│ └── README.md
├── cpp
├── valueFederate1
│ ├── run.bat
│ ├── run.sh
│ └── CMakeLists.txt
├── comboFederate1
│ ├── run.sh
│ ├── run3.sh
│ ├── openmpi-run.conf
│ ├── srun-mpi.conf
│ └── CMakeLists.txt
├── filterFederate1
│ ├── run.sh
│ └── CMakeLists.txt
├── messageFederate1
│ ├── run.sh
│ ├── run3.sh
│ ├── openmpi-run.conf
│ ├── srun-mpi.conf
│ └── CMakeLists.txt
├── ipcTest
│ ├── common.hpp
│ └── CMakeLists.txt
└── CMakeLists.txt
├── .github
├── ISSUE_TEMPLATE
│ ├── config.yml
│ ├── support-or-design-question.md
│ ├── feature_request.md
│ └── bug_report.md
└── PULL_REQUEST_TEMPLATE.md
├── scripts
└── cleanup-cmake.sh
├── Dockerfiles
└── helics
│ └── Dockerfile
├── .ci
└── report-results.sh
├── CONTRIBUTORS.md
├── .travis.yml
└── LICENSE
/user_guide_examples/advanced/advanced_dynamic_federation/out.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/unmaintained/example_files/example1.recorder:
--------------------------------------------------------------------------------
1 | FederateName/topic1
2 |
3 |
--------------------------------------------------------------------------------
/unmaintained/python/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/unmaintained/python/osmses_2024_battery_charger/requirements.txt:
--------------------------------------------------------------------------------
1 | numpy
2 | matplotlib
3 | helics
--------------------------------------------------------------------------------
/user_guide_examples/requirements.txt:
--------------------------------------------------------------------------------
1 | matplotlib
2 | numpy
3 | pandas
4 | tk
5 |
6 | #pypower
7 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/requirements.txt:
--------------------------------------------------------------------------------
1 | matplotlib==3.4.3
2 | pandas==1.3.4
3 |
--------------------------------------------------------------------------------
/c/pi-exchange/run_pi.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ./pi_sender > pi_sender.out &
4 | ./pi_receiver > pi_receiver.out
5 |
6 |
--------------------------------------------------------------------------------
/c/pi-exchange/run_pi2.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ./pi_sender2 > pi_sender2.out &
4 | ./pi_receiver2 > pi_receiver2.out
5 |
6 |
--------------------------------------------------------------------------------
/cpp98/pi-exchange/run_pi.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ./pi_sender > pi_sender.out &
4 | ./pi_receiver > pi_receiver.out
5 |
6 |
--------------------------------------------------------------------------------
/cpp98/pi-exchange/run_pi2.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ./pi_sender2 > pi_sender2.out &
4 | ./pi_receiver2 > pi_receiver2.out
5 |
6 |
--------------------------------------------------------------------------------
/c/nonlings/run_nonlings.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ./nonlings_fed1 > nonlings_fed1.out &
4 | ./nonlings_fed2 > nonlings_fed2.out
5 |
6 |
--------------------------------------------------------------------------------
/unmaintained/python/uvm/uvm.code-workspace:
--------------------------------------------------------------------------------
1 | {
2 | "folders": [
3 | {
4 | "path": "."
5 | }
6 | ],
7 | "settings": {}
8 | }
--------------------------------------------------------------------------------
/python/no_filter_benchmark/with filter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GMLC-TDC/HELICS-Examples/HEAD/python/no_filter_benchmark/with filter.png
--------------------------------------------------------------------------------
/python/no_filter_benchmark/without filter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GMLC-TDC/HELICS-Examples/HEAD/python/no_filter_benchmark/without filter.png
--------------------------------------------------------------------------------
/cpp/valueFederate1/run.bat:
--------------------------------------------------------------------------------
1 | helics_broker.exe 2 --loglevel=4 > broker.out &
2 | valueFed.exe --name fed1 > fed1.out &
3 | valueFed.exe --name fed2 > fed2.out
4 |
5 |
--------------------------------------------------------------------------------
/python/no_filter_benchmark/results_with_filter.pickle:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GMLC-TDC/HELICS-Examples/HEAD/python/no_filter_benchmark/results_with_filter.pickle
--------------------------------------------------------------------------------
/python/no_filter_benchmark/results_without_filter.pickle:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GMLC-TDC/HELICS-Examples/HEAD/python/no_filter_benchmark/results_without_filter.pickle
--------------------------------------------------------------------------------
/cpp/valueFederate1/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | helics_broker 2 --loglevel=4> broker.out &
4 | ./valueFed --name fed1 > fed1.out &
5 | ./valueFed --name fed2 > fed2.out
6 |
7 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_fmu/SimpleBattery.fmu:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GMLC-TDC/HELICS-Examples/HEAD/user_guide_examples/advanced/advanced_fmu/SimpleBattery.fmu
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_default_matlab/getHelicsMaxTime.m:
--------------------------------------------------------------------------------
1 | function HELICS_TIME_MAXTIME = getHelicsMaxTime()
2 | HELICS_TIME_MAXTIME = helics.HELICS_BIG_NUMBER;
3 | end
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_fmu/SimpleBatteryLinux.fmu:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GMLC-TDC/HELICS-Examples/HEAD/user_guide_examples/advanced/advanced_fmu/SimpleBatteryLinux.fmu
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: true
2 | contact_links:
3 | - name: Gitter
4 | url: https://gitter.im/GMLC-TDC/HELICS
5 | about: Please ask and answer questions here.
6 |
--------------------------------------------------------------------------------
/c/comboFederate1/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | helics_broker 2 --loglevel=4> broker.out &
4 | ./messageFed --name fed1 --target fed2 > fed1.out &
5 | ./messageFed --name fed2 --target fed1 > fed2.out
6 |
7 |
--------------------------------------------------------------------------------
/c/messageFederate1/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | helics_broker 2 --loglevel=4> broker.out &
4 | ./messageFed --name fed1 --target fed2 > fed1.out &
5 | ./messageFed --name fed2 --target fed1 > fed2.out
6 |
7 |
--------------------------------------------------------------------------------
/cpp/comboFederate1/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | helics_broker 2 --loglevel=4 > broker.out &
4 | ./messageFed --name fed1 --target fed2 > fed1.out &
5 | ./messageFed --name fed2 --target fed1 > fed2.out
6 |
7 |
--------------------------------------------------------------------------------
/cpp/filterFederate1/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | helics_broker 2 --loglevel=4 > broker.out &
4 | ./messageFed --name fed1 --target fed2 > fed1.out &
5 | ./messageFed --name fed2 --target fed1 > fed2.out
6 |
7 |
--------------------------------------------------------------------------------
/c/hello_world/run_hello_world.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | helics_broker 2 --loglevel=4 > broker.out &
4 | ./hello_world_sender > hello_world_sender.out &
5 | ./hello_world_receiver > hello_world_receiver.out
6 |
7 |
--------------------------------------------------------------------------------
/cpp/messageFederate1/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | helics_broker 2 --loglevel=4 > broker.out &
4 | ./messageFed --name fed1 --target fed2 > fed1.out &
5 | ./messageFed --name fed2 --target fed1 > fed2.out
6 |
7 |
--------------------------------------------------------------------------------
/unmaintained/example_files/example_connections1.toml:
--------------------------------------------------------------------------------
1 | #example toml connection file connections can be an array of two element string arrays ["publication", "input"]
2 | connections=[
3 | ["pub1", "inp1"]
4 | ]
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/montecarlo-ev-peak-power.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GMLC-TDC/HELICS-Examples/HEAD/user_guide_examples/advanced/advanced_orchestration/montecarlo-ev-peak-power.png
--------------------------------------------------------------------------------
/unmaintained/example_files/example_connections2.toml:
--------------------------------------------------------------------------------
1 | #example toml connection file connections can be an array of two element string arrays ["publication", "input"]
2 | connections=[
3 | {publication="pub1",target="inp1"}
4 | ]
--------------------------------------------------------------------------------
/unmaintained/example_files/example_connections3.toml:
--------------------------------------------------------------------------------
1 | #example toml connection file connections can be an array of two element string arrays ["publication", "input"]
2 | connections=[
3 | {publication="pub1",targets="inp1"}
4 | ]
--------------------------------------------------------------------------------
/user_guide_examples/misc/gridlabd_example_1/normalized_load_data_1min_ORIGINAL.mat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GMLC-TDC/HELICS-Examples/HEAD/user_guide_examples/misc/gridlabd_example_1/normalized_load_data_1min_ORIGINAL.mat
--------------------------------------------------------------------------------
/unmaintained/example_files/example_connections4.toml:
--------------------------------------------------------------------------------
1 | #example toml connection file connections can be an array of two element string arrays ["publication", "input"]
2 | connections=[
3 | {publication="pub1",targets=["inp1"]}
4 | ]
--------------------------------------------------------------------------------
/unmaintained/python/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/unmaintained/python/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/c/comboFederate1/run3.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | helics_broker 3 --loglevel=4> broker.out &
4 | ./messageFed --name fed1 --target fed2 > fed1.out &
5 | ./messageFed --name fed2 --target fed3 > fed2.out &
6 | ./messageFed --name fed3 --target fed1 > fed3.out &
7 |
8 |
--------------------------------------------------------------------------------
/unmaintained/python/.idea/inspectionProfiles/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_connector/interface_creation/ChargerConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "core_type": "zmq",
3 | "log_level": "warning",
4 | "name": "Charger",
5 | "period": 60,
6 | "terminate_on_error": true,
7 | "uninterruptible": false
8 | }
9 |
--------------------------------------------------------------------------------
/c/messageFederate1/run3.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | helics_broker 3 --loglevel=4> broker.out &
4 | ./messageFed --name fed1 --target fed2 > fed1.out &
5 | ./messageFed --name fed2 --target fed3 > fed2.out &
6 | ./messageFed --name fed3 --target fed1 > fed3.out &
7 |
8 |
--------------------------------------------------------------------------------
/cpp/comboFederate1/run3.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | helics_broker 3 --loglevel=4 > broker.out &
4 | ./messageFed --name fed1 --target fed2 > fed1.out &
5 | ./messageFed --name fed2 --target fed3 > fed2.out &
6 | ./messageFed --name fed3 --target fed1 > fed3.out &
7 |
8 |
--------------------------------------------------------------------------------
/cpp/messageFederate1/run3.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | helics_broker 3 --loglevel=4 > broker.out &
4 | ./messageFed --name fed1 --target fed2 > fed1.out &
5 | ./messageFed --name fed2 --target fed3 > fed2.out &
6 | ./messageFed --name fed3 --target fed1 > fed3.out &
7 |
8 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_connector/interface_creation/regex_matchfile.txt:
--------------------------------------------------------------------------------
1 | Charger/EV(?\d)_output_voltage, Battery/EV(?\d)_input_voltage, "from_to"
2 | Charger/EV(?\d)_input_current, Battery/EV(?\d)_output_current, "to_from"
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_input_output/fib1_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fib1",
3 | "core_name": "fib1_core",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "uninterruptible": false,
7 | "wait_for_current_time_update": false,
8 | }
9 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_input_output/fib4_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fib4",
3 | "core_name": "fib4_core",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "uninterruptible": false,
7 | "wait_for_current_time_update": false,
8 | }
9 |
--------------------------------------------------------------------------------
/c/comboFederate1/openmpi-run.conf:
--------------------------------------------------------------------------------
1 | -np 1 helics_broker 2 --type=mpi --loglevel=4
2 |
3 | -np 1 messageFed --name=fed1 --target=fed2 --core=mpi --coreinit="--broker_address=0:0"
4 | -np 1 messageFed --name=fed2 --target=fed1 --core=mpi --coreinit="--broker_address=0:0"
5 |
6 |
--------------------------------------------------------------------------------
/c/messageFederate1/openmpi-run.conf:
--------------------------------------------------------------------------------
1 | -np 1 helics_broker 2 --type=mpi --loglevel=4
2 |
3 | -np 1 messageFed --name=fed1 --target=fed2 --core=mpi --coreinit="--broker_address=0:0"
4 | -np 1 messageFed --name=fed2 --target=fed1 --core=mpi --coreinit="--broker_address=0:0"
5 |
6 |
--------------------------------------------------------------------------------
/cpp/comboFederate1/openmpi-run.conf:
--------------------------------------------------------------------------------
1 | -np 1 helics_broker 2 --type=mpi --loglevel=4
2 |
3 | -np 1 messageFed --name=fed1 --target=fed2 --core=mpi --coreinit="--broker_address=0:0"
4 | -np 1 messageFed --name=fed2 --target=fed1 --core=mpi --coreinit="--broker_address=0:0"
5 |
6 |
--------------------------------------------------------------------------------
/cpp/messageFederate1/openmpi-run.conf:
--------------------------------------------------------------------------------
1 | -np 1 helics_broker 2 --type=mpi --loglevel=4
2 |
3 | -np 1 messageFed --name=fed1 --target=fed2 --core=mpi --coreinit="--broker_address=0:0"
4 | -np 1 messageFed --name=fed2 --target=fed1 --core=mpi --coreinit="--broker_address=0:0"
5 |
6 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_default_matlab/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Advanced Topics - Base Example (MATLAB)
2 |
3 | This example translates the [Advanced Default](https://docs.helics.org/en/latest/user-guide/examples/advanced_examples/advanced_default.html) from python to Matlab.
--------------------------------------------------------------------------------
/unmaintained/example_files/example_connections1.json:
--------------------------------------------------------------------------------
1 | //this should be a valid json file (except comments are not recognized in standard JSON)
2 | { //example json connection file connections can be an array of two element string arrays ["publication", "input"]
3 | "connections":[["pub1","inp1"]]
4 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_connector/matchfile/regex_matchfile.txt:
--------------------------------------------------------------------------------
1 | # this is a comment
2 | REGEX:Charger/EV(?\d*)_output_voltage, REGEX:Battery/EV(?)_input_voltage, from_to
3 | REGEX:Charger/EV(?\d*)_input_current, REGEX:Battery/EV(?)_output_current, from_to
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_connector/interface_creation/BatteryConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Battery",
3 | "core_type": "zmq",
4 | "log_level": "warning",
5 | "period": 60.0,
6 | "uninterruptible": false,
7 | "terminate_on_error": true,
8 | "wait_for_current_time_update": true
9 | }
10 |
--------------------------------------------------------------------------------
/c/hello_world/Makefile:
--------------------------------------------------------------------------------
1 | compile:
2 | $(CC) hello_world_sender.c -o hello_world_sender -I/usr/local/Cellar/helics/HEAD-cabc611/include/helics/shared_api_library/ -lhelicsSharedLib
3 | $(CC) hello_world_receiver.c -o hello_world_receiver -I/usr/local/Cellar/helics/HEAD-cabc611/include/helics/shared_api_library/ -lhelicsSharedLib
4 |
--------------------------------------------------------------------------------
/unmaintained/python/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/unmaintained/python/multi-node-pi-exchange/README.md:
--------------------------------------------------------------------------------
1 | # multi-node-pi-exchange
2 |
3 | ```bash
4 | helics_broker -f 2 --interface=tcp://0.0.0.0:4545 --loglevel=7
5 | ```
6 |
7 | ```bash
8 | python pisender.py '0.0.0.0:4545'
9 | ```
10 |
11 | ```bash
12 | python pireceiver.py '0.0.0.0:4545'
13 | ```
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_fmu/.gitignore:
--------------------------------------------------------------------------------
1 | # don't commit the unziped fmu
2 | SimpleBattery/*
3 |
4 | # do commit the modelica model of the version
5 | # can be opened with, e.g., OpenModelica Connection Editor (https://openmodelica.org/)
6 | !SimpleBattery.mo
7 |
8 | # loca batch file used to add helics-fmi to path
9 | env.bat
--------------------------------------------------------------------------------
/unmaintained/python/pi-exchange-config/receiver.json:
--------------------------------------------------------------------------------
1 | {
2 | "coreInit": "--federates=1",
3 | "coreName": "receiver Federate",
4 | "coreType": "zmq",
5 | "name": "receiver",
6 | "offset": 0.0,
7 | "period": 0.1,
8 | "subscriptions": [
9 | {
10 | "name": "data"
11 | }
12 | ],
13 | "timeDelta": 0.1
14 | }
15 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_single_core/single_core_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "advanced single core",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u battery_charger.py",
8 | "host": "localhost",
9 | "name": "battery_charger"
10 | }
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/support-or-design-question.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Support or design question
3 | about: Ask a detailed question or start a design discussion
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | Please describe the question and desired information in detail, or discuss the nature of the question being asked.
11 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_single_core/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Advanced Topics - Single-Core Federation and Managing HELICS Blocking API Calls
2 |
3 | This example demonstrates the capability of HELICS to run multiple federates on a single HELICS core. A full description of the example can be found in the [HELICS User Guide](**TODO add link**).
--------------------------------------------------------------------------------
/unmaintained/python/pi-exchange-config/sender.json:
--------------------------------------------------------------------------------
1 | {
2 | "coreInit": "--federates=1",
3 | "coreName": "sender Federate",
4 | "coreType": "zmq",
5 | "name": "sender",
6 | "offset": 0.0,
7 | "period": 0.1,
8 | "publications": [
9 | {
10 | "global": true,
11 | "name": "data"
12 | }
13 | ],
14 | "timeDelta": 0.1
15 | }
16 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_integration/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Fundamental Topics - Federate Integration via HELICS APIs
2 |
3 | This example demonstrates how to configure federates using the HELICS APIs directly instead of through an external JSON file. A full description of the example can be found in the [HELICS User Guide](**TODO add link**).
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_brokers/hierarchies/broker_hierarchy_runner_A.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "main_broker",
3 | "federates": [
4 | {
5 | "directory": ".",
6 | "exec": "helics_broker --sub_brokers=2 --loglevel=warning --timeout='30s' --port=25200",
7 | "host": "localhost",
8 | "name": "brokerA"
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_iteration/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Fundamental Topics - Base Example
2 |
3 | This example demonstrates how to set up inter-time-step iteration between federates. A full description of the example can be found in the [HELICS User Guide](https://docs.helics.org/en/latest/user-guide/examples/fundamental_examples/fundamental_default.html).
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_message_comm/query/ControllerConfig.json:
--------------------------------------------------------------------------------
1 |
2 | {
3 | "name": "Controller",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "time_delta": 1,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "endpoints": [
10 | {
11 | "name": "Controller/ep",
12 | "global": true
13 | }
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_default/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Fundamental Topics - Base Example
2 |
3 | This example demonstrates the basic publication and subscription value exchange using HELICS. A full description of the example can be found in the [HELICS User Guide](https://docs.helics.org/en/latest/user-guide/examples/fundamental_examples/fundamental_default.html).
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/combo/ControllerConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Controller",
3 | "log_level": "warning",
4 | "core_type": "zmq",
5 | "time_delta": 1,
6 | "uninterruptible": false,
7 | "terminate_on_error": true,
8 | "endpoints": [
9 | {
10 | "name": "Controller/ep",
11 | "global": true
12 | }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/endpoints/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Fundamental Topics - Endpoint Example
2 |
3 | This example demonstrates the use of endpoints and messages in HELICS. A full description of the example can be found in the [HELICS User Guide](https://docs.helics.org/en/latest/user-guide/examples/fundamental_examples/fundamental_endpoints.html).
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/filter_clone/ControllerConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Controller",
3 | "log_level": "warning",
4 | "core_type": "zmq",
5 | "time_delta": 1,
6 | "uninterruptible": false,
7 | "terminate_on_error": true,
8 | "endpoints": [
9 | {
10 | "name": "Controller/ep",
11 | "global": true
12 | }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_brokers/multi_computer/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Advanced Topics - Multi-Computer Co-Simulation
2 |
3 | This example demonstrates how to implement a co-simulation across computers. A full description of the example can be found in the [HELICS User Guide](https://docs.helics.org/en/latest/user-guide/examples/advanced_examples/advanced_brokers_multicomputer.html).
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_default/ControllerConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Controller",
3 | "core_name": "controller_core",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "time_delta": 1,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "endpoints": [
10 | {
11 | "name": "Controller/ep",
12 | "global": true
13 | }
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/c/comboFederate1/srun-mpi.conf:
--------------------------------------------------------------------------------
1 | # %t gets replaced with task number
2 | # %o gets replaced with offset within range of task numbers given to a particular task
3 |
4 | 0 helics_broker 2 --type=mpi --loglevel=4
5 | 1 messageFed --name=fed1 --target=fed2 --core=mpi --coreinit="--broker_address=0:0"
6 | 2 messageFed --name=fed2 --target=fed1 --core=mpi --coreinit="--broker_address=0:0"
7 |
8 |
--------------------------------------------------------------------------------
/unmaintained/example_files/example_connections2.json:
--------------------------------------------------------------------------------
1 | //this should be a valid json file (except comments are not recognized in standard JSON)
2 | { //example json connection file connections can be an array of two element string arrays ["publication", "input"] or a map with "publication" and "target" for a single string or an array strings as "targets"
3 | "connections":[{"publication":"pub1","targets":"inp1"}]
4 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_brokers/multi_broker/multi_broker_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "master":{
3 | "core_type": "inproc"
4 | },
5 | "comms": [
6 | {
7 | "core_type": "zmq",
8 | "port": 23500
9 | },
10 | {
11 | "core_type": "tcp",
12 | "port": 23700
13 | },
14 | {
15 | "core_type": "udp",
16 | "port": 23900
17 | }
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_default_matlab/ControllerConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Controller",
3 | "core_name": "controller_core",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "time_delta": 1,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "endpoints": [
10 | {
11 | "name": "Controller/ep",
12 | "global": true
13 | }
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/c/messageFederate1/srun-mpi.conf:
--------------------------------------------------------------------------------
1 | # %t gets replaced with task number
2 | # %o gets replaced with offset within range of task numbers given to a particular task
3 |
4 | 0 helics_broker 2 --type=mpi --loglevel=4
5 | 1 ./messageFed --name=fed1 --target=fed2 --core=mpi --coreinit="--broker_address=0:0"
6 | 2 ./messageFed --name=fed2 --target=fed1 --core=mpi --coreinit="--broker_address=0:0"
7 |
8 |
--------------------------------------------------------------------------------
/cpp/comboFederate1/srun-mpi.conf:
--------------------------------------------------------------------------------
1 | # %t gets replaced with task number
2 | # %o gets replaced with offset within range of task numbers given to a particular task
3 |
4 | 0 helics_broker 2 --type=mpi --loglevel=4
5 | 1 ./messageFed --name=fed1 --target=fed2 --core=mpi --coreinit="--broker_address=0:0"
6 | 2 ./messageFed --name=fed2 --target=fed1 --core=mpi --coreinit="--broker_address=0:0"
7 |
8 |
--------------------------------------------------------------------------------
/cpp/messageFederate1/srun-mpi.conf:
--------------------------------------------------------------------------------
1 | # %t gets replaced with task number
2 | # %o gets replaced with offset within range of task numbers given to a particular task
3 |
4 | 0 helics_broker 2 --type=mpi --loglevel=4
5 | 1 ./messageFed --name=fed1 --target=fed2 --core=mpi --coreinit="--broker_address=0:0"
6 | 2 ./messageFed --name=fed2 --target=fed1 --core=mpi --coreinit="--broker_address=0:0"
7 |
8 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_async_time_request/ControllerConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Controller",
3 | "core_name": "controller_core",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "time_delta": 1,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "endpoints": [
10 | {
11 | "name": "Controller/ep",
12 | "global": true
13 | }
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_brokers/multi_broker/ControllerConfig.json:
--------------------------------------------------------------------------------
1 |
2 | {
3 | "name": "Controller",
4 | "log_level": "warning",
5 | "core_type": "udp",
6 | "time_delta": 1,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "broker_port": 23900,
10 | "endpoints": [
11 | {
12 | "name": "Controller/ep",
13 | "global": true
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_default_pythonic/ControllerConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Controller",
3 | "core_name": "controller_core",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "time_delta": 1,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "endpoints": [
10 | {
11 | "name": "Controller/ep",
12 | "global": true
13 | }
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_dynamic_federation/ControllerConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Controller",
3 | "core_name": "controller_core",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "time_delta": 1,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "endpoints": [
10 | {
11 | "name": "Controller/ep",
12 | "global": true
13 | }
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_dynamic_federation/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Advanced Topics - Dynamic Federation
2 |
3 | This example demonstrates the HELICS functionality that allows federates to join a federation late and leave early A full description of the example can be found in the [HELICS User Guide](https://docs.helics.org/en/latest/user-guide/examples/advanced_examples/advanced_dynamic_federation.html).
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_brokers/hierarchies/ControllerConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Controller",
3 | "log_level": "warning",
4 | "core_type": "zmq",
5 | "broker_address": "tcp://127.0.0.1:25400",
6 | "time_delta": 1,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "endpoints": [
10 | {
11 | "name": "Controller/ep",
12 | "global": true
13 | }
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_brokers/simultaneous/federation_1/ControllerConfig_1.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Controller",
3 | "log_level": "warning",
4 | "core_type": "zmq",
5 | "broker_port": "20100",
6 | "time_delta": 1,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "endpoints": [
10 | {
11 | "name": "Controller/ep",
12 | "global": true
13 | }
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_connector/interface_creation/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Advanced Topic - Connector Federate Using a Matchfile
2 |
3 | This example demonstrates the use of a connector federate and matchfile to define a federation. A full description of the example can be found in the [HELICS User Guide](https://docs.helics.org/en/latest/user-guide/examples/advanced_examples/advanced_connector/something.html).
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_message_comm/query/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Advanced Topics - Queries
2 |
3 | This example demonstrates how to run queries on a HELICS federation to allow a federate or user to better understand its structure and composition. A full description of the example can be found in the [HELICS User Guide](https://docs.helics.org/en/latest/user-guide/examples/advanced_examples/advanced_query.html).
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/multi_agent/ControllerConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Controller",
3 | "core_name": "controller_core",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "time_delta": 1,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "endpoints": [
10 | {
11 | "name": "Controller/ep",
12 | "global": true
13 | }
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/python/no_filter_benchmark/echo_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "echo",
3 | "core_name": "echo_core",
4 | "log_level": 1,
5 | "core_type": "zmq",
6 | "period": 0.0000001,
7 | "uninterruptible": false,
8 | "force_logging_flush": true,
9 | "terminate_on_error": true,
10 | "endpoints": [
11 | {
12 | "name": "echo/ep",
13 | "destination": "source_sink/ep",
14 | "global": true
15 | }
16 | ]
17 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_brokers/simultaneous/federation_2/ControllerConfig_2.json:
--------------------------------------------------------------------------------
1 |
2 | {
3 | "name": "Controller",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "broker_port": "20200",
7 | "time_delta": 1,
8 | "uninterruptible": false,
9 | "terminate_on_error": true,
10 | "endpoints": [
11 | {
12 | "name": "Controller/ep",
13 | "global": true
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_brokers/simultaneous/federation_3/ControllerConfig_3.json:
--------------------------------------------------------------------------------
1 |
2 | {
3 | "name": "Controller",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "broker_port": "20300",
7 | "time_delta": 1,
8 | "uninterruptible": false,
9 | "terminate_on_error": true,
10 | "endpoints": [
11 | {
12 | "name": "Controller/ep",
13 | "global": true
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/user_guide_examples/misc/gridlabd_example_1/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Miscellaneous Example - GridLAB-D Example 1
2 |
3 | This set of examples utilizes GridLAB-D to demonstrate what a HELICS co-simulation using a non-Python federate looks like. A full description of the example can be found in the [HELICS User Guide](https://docs.helics.org/en/latest/user-guide/examples/misc_examples/gridlabd_example_1/gridlabd_example_1_index.html).
--------------------------------------------------------------------------------
/python/no_filter_benchmark/source_sink_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "source_sink",
3 | "core_name": "ss_core",
4 | "log_level": 1,
5 | "core_type": "zmq",
6 | "period": 1,
7 | "uninterruptible": false,
8 | "force_logging_flush": true,
9 | "terminate_on_error": true,
10 | "endpoints": [
11 | {
12 | "name": "source_sink/ep",
13 | "destination": "echo/ep",
14 | "global": true
15 | }
16 | ]
17 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_brokers/multi_computer/computer1/ControllerConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Controller",
3 | "log_level": "warning",
4 | "core_type": "zmq",
5 | "broker_address": "tcp://10.211.55.23",
6 | "time_delta": 1,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "endpoints": [
10 | {
11 | "name": "Controller/ep",
12 | "global": true
13 | }
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_message_comm/multi_input/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Advanced Topics - Multi-Input
2 |
3 | This example demonstrates how to configure a HELICS input value handle to accept values from multiple publications and appropriately process them. A full description of the example can be found in the [HELICS User Guide](https://docs.helics.org/en/latest/user-guide/examples/advanced_examples/advanced_multi_input.html).
--------------------------------------------------------------------------------
/unmaintained/python/timing-demo/runner.py:
--------------------------------------------------------------------------------
1 | import libtmux
2 |
3 |
4 | def main():
5 | session = libtmux.Server().list_sessions()[0]
6 | session.attached_window.split_window(vertical=False)
7 |
8 | for i, p in enumerate(session.attached_window.children):
9 | p.clear()
10 | p.send_keys("python ./timing-federate{}.py".format(i+1))
11 | p.enter()
12 |
13 | if __name__ == "__main__":
14 | main()
15 |
16 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_brokers/hierarchies/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Advanced Topics - Broker Hierarchies
2 |
3 | This example demonstrates how to implement a hierarchy of brokers to achieve improved performance when working across multiple compute nodes. A full description of the example can be found in the [HELICS User Guide](https://docs.helics.org/en/latest/user-guide/examples/advanced_examples/advanced_brokers_hierarchies.html).
--------------------------------------------------------------------------------
/unmaintained/python/python_demo/demo_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "demo",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u charger_demo.py",
8 | "host": "localhost",
9 | "name": "Charger"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u battery_demo.py",
14 | "host": "localhost",
15 | "name": "Battery"
16 | }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_input_output/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Advanced Topics - Input and Output Demonstration
2 |
3 | This example is currently not working due to issues with the HELICS translator. [HELICS-Examples issue #126](https://github.com/GMLC-TDC/HELICS-Examples/issues/126) is tracking the work on getting this example working.
4 |
5 | This example serves to show the variety of ways HELICS federates can connect to transfer data.
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_brokers/simultaneous/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Advanced Topics - Parallel Simultaneous Co-simulations
2 |
3 | This example demonstrates how to configure federations so that they can run in parallel on one compute node without interfering with each other. A full description of the example can be found in the [HELICS User Guide](https://docs.helics.org/en/latest/user-guide/examples/advanced_examples/advanced_brokers_simultaneous.html).
--------------------------------------------------------------------------------
/unmaintained/python/.idea/python.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/unmaintained/python/delayed-pi-exchange/pi_exchange_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "delay pi exchange",
3 | "broker": false,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u pisender.py",
8 | "host": "localhost",
9 | "name": "pisender"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u pireceiver.py",
14 | "host": "localhost",
15 | "name": "pireceiver"
16 | }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/filter_federate/ControllerConfig.json:
--------------------------------------------------------------------------------
1 |
2 | {
3 | "name": "Controller",
4 | "core_name": "controller_core",
5 | "log_level": "warning",
6 | "core_type": "zmq",
7 | "time_delta": 1,
8 | "uninterruptible": false,
9 | "terminate_on_error": true,
10 | "force_logging_flush": true,
11 | "endpoints": [
12 | {
13 | "name": "Controller/ep",
14 | "global": true
15 | }
16 | ]
17 | }
18 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_iteration/advanced_iteration_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "iterative runner",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u Charger.py 1",
8 | "host": "localhost",
9 | "name": "Charger"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u Battery.py 1",
14 | "host": "localhost",
15 | "name": "Battery"
16 | }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_default/__helics-server/runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fundamental_default",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u Charger.py 1",
8 | "host": "localhost",
9 | "name": "Charger"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u Battery.py 1",
14 | "host": "localhost",
15 | "name": "Battery"
16 | }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_async_time_request/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Advanced Topics - Asynchronous Time Request
2 |
3 | This example is the base example for many of the other examples covered in the Advanced Topics portion of the HELICS User Guide. The example builds on top of the advanced default example and implements an asynchronous (non-blocking) time request. A full description of the example can be found in the [HELICS User Guide (dummy link for now)](https://docs.helics.org/).
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_message_comm/multi_input/multi_input_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "multi_input",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u Charger.py 1",
8 | "host": "localhost",
9 | "name": "Charger"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u Battery.py 1",
14 | "host": "localhost",
15 | "name": "Battery"
16 | }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_default/fundamental_default_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fundamental_default",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u Charger.py 1",
8 | "host": "localhost",
9 | "name": "Charger"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u Battery.py 1",
14 | "host": "localhost",
15 | "name": "Battery"
16 | }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_default/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Advanced Topics - Base Example
2 |
3 | This example is the base example for many of the other examples covered in the Advanced Topics portion of the HELICS User Guide. The example implements an EV charging co-simulation with value, message, and combination federates. A full description of the example can be found in the [HELICS User Guide](https://docs.helics.org/en/latest/user-guide/examples/advanced_examples/advanced_default.html).
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_message_comm/translators/translator_testfed_next_time.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "translator test",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u sender_fed.py",
8 | "host": "localhost",
9 | "name": "sender"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u receiver_fed.py",
14 | "host": "localhost",
15 | "name": "receiver"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/endpoints/fundamental_endpoints_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fundamental_endpoints",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u Charger.py",
8 | "host": "localhost",
9 | "name": "Charger"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u Battery.py",
14 | "host": "localhost",
15 | "name": "Battery"
16 | }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/unmaintained/python/uvm/5ev_example/ev_charge_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "EV Charge Management",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u EV_charge_manager.py",
8 | "host": "localhost",
9 | "name": "charger manager"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "gridlabd five_ev_chargers.glm",
14 | "host": "localhost",
15 | "name": "gld"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/cpp/ipcTest/common.hpp:
--------------------------------------------------------------------------------
1 | #ifndef TOM_COMMON_HPP__
2 | #define TOM_COMMON_HPP__
3 |
4 | #include
5 |
6 | template
7 | struct ValuePacket
8 | {
9 | helics::Time time_;
10 | helics::Publication &pub_;
11 | T value_;
12 |
13 | ValuePacket () = default;
14 | ValuePacket (helics::Time time, helics::Publication &pub, T value) : time_{time}, pub_{pub}, value_{value} {}
15 | }; // struct ValuePacket
16 |
17 | #endif /* TOM_COMMON_HPP__ */
18 |
19 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_brokers/multi_computer/computer2/multi_computer_2_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Battery",
3 | "federates": [
4 | {
5 | "directory": ".",
6 | "exec": "helics_broker -f 3 --loglevel=warning --ipv4",
7 | "host": "localhost",
8 | "name": "broker"
9 | },
10 | {
11 | "directory": ".",
12 | "exec": "python -u Battery.py",
13 | "host": "localhost",
14 | "name": "Battery",
15 | "loglevel": 1
16 | }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_iteration/advanced_iteration_runner_noitermain.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "iterative runner",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u Charger_noitermain.py 1",
8 | "host": "localhost",
9 | "name": "Charger"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u Battery_noitermain.py 1",
14 | "host": "localhost",
15 | "name": "Battery"
16 | }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_message_comm/translators/translator_testfed_max_time.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "translator test",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u sender_fed.py --max_time",
8 | "host": "localhost",
9 | "name": "sender"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u receiver_fed.py --max_time",
14 | "host": "localhost",
15 | "name": "receiver"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/combo/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Fundamental Topics - Combination Federate Example
2 |
3 | This example demonstrates the use of a combination federate, one that transmits information with the rest of the federation via publications/subscriptions (value exchanges) and endpoints (message exchange). A full description of the example can be found in the [HELICS User Guide](https://docs.helics.org/en/latest/user-guide/examples/fundamental_examples/fundamental_combo.html).
--------------------------------------------------------------------------------
/unmaintained/python/uvm/5ev_example/ev_charge_runner_5ev.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "EV Charge Management - 5EV",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u EV_charge_manager_5ev.py",
8 | "host": "localhost",
9 | "name": "charger manager"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "gridlabd five_ev_chargers.glm",
14 | "host": "localhost",
15 | "name": "gld"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/unmaintained/python/osmses_2024_battery_charger/osmses_2024_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "OSMSES 2024 Tutorial",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u charger_cosim_complete.py",
8 | "host": "localhost",
9 | "name": "charger"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u battery_cosim_complete.py",
14 | "host": "localhost",
15 | "name": "battery"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_brokers/multi_computer/computer1/multi_computer_1_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Controller_and_Charger",
3 | "federates": [
4 | {
5 | "directory": ".",
6 | "exec": "python3 -u Charger.py",
7 | "host": "localhost",
8 | "name": "Charger",
9 | "loglevel": 1
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python3 -u Controller.py",
14 | "host": "localhost",
15 | "name": "Controller",
16 | "loglevel": 1
17 | }
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/unmaintained/python/helics_message_size/runner_long_message.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Long message test",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u long_message_sender.py",
8 | "host": "localhost",
9 | "name": "long_message_sender"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u long_message_receiver.py",
14 | "host": "localhost",
15 | "name": "long_message_receiver"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/unmaintained/python/osmses_2024_battery_charger/osmses_2024_runner_pythonic.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "OSMES 2024 Tutorial",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u charger_cosim_complete_pythonic.py",
8 | "host": "localhost",
9 | "name": "charger"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u battery_cosim_complete_pythonic.py",
14 | "host": "localhost",
15 | "name": "battery"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_brokers/hierarchies/broker_hierarchy_runner_B.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Battery",
3 | "federates": [
4 | {
5 | "directory": ".",
6 | "exec": "helics_broker -f 1 --loglevel=warning --timeout='30s' --port=25300 --broker_address=tcp://127.0.0.1:25200",
7 | "host": "localhost",
8 | "name": "brokerB"
9 | },
10 | {
11 | "directory": ".",
12 | "exec": "python -u Battery.py",
13 | "host": "localhost",
14 | "name": "Battery",
15 | "loglevel": 1
16 | }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/filter_clone/LoggerConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Logger",
3 | "log_level": "warning",
4 | "core_type": "zmq",
5 | "time_delta": 1,
6 | "uninterruptible": false,
7 | "terminate_on_error": true,
8 | "endpoints": [
9 | {
10 | "name": "Logger/ep",
11 | "global": true
12 | }
13 | ],
14 | "filters":
15 | [
16 | {
17 | "name":"cloning_filter",
18 | "destination_target":"Controller/ep",
19 | "delivery": "Logger/ep",
20 | "cloning": true
21 | }
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/multi_agent/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Fundamental Topics - Multi-Agent Example
2 |
3 | This example disaggregates the Charger and Battery federates from Combination Federate example (where Battery and Charger model five batteries and chargers, respectively) to create unique federates per simulated entity. A full description of the Combination Federate example can be found in the [HELICS User Guide](https://docs.helics.org/en/latest/user-guide/examples/fundamental_examples/fundamental_combo.html) where this example is referenced.
--------------------------------------------------------------------------------
/user_guide_examples/misc/gridlabd_example_1/1a_cosim_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "broker": true,
3 | "federates":[
4 | {
5 | "directory":".",
6 | "exec":"python 1abc_Transmission_simulator.py -c 1a",
7 | "host":"localhost",
8 | "name":"1a_Transmission"
9 | },
10 | {
11 | "directory":".",
12 | "exec":"gridlabd 1a_IEEE_123_feeder.glm",
13 | "host":"localhost",
14 | "name":"1a_GridLABD"
15 | }
16 | ],
17 | "name":"1a-T-D-Cosimulation-HELICSRunner"
18 | }
19 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/filter_native/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Fundamental Topics - Native Filter Example
2 |
3 | This example does not currently fully function. [HELICS-Examples issue #122](https://github.com/GMLC-TDC/HELICS-Examples/issues/122) has been filed to track this example.
4 |
5 | This example demonstrates the use of native HELICS filters to replicate simple communication system effects. A full description of the example can be found in the [HELICS User Guide](https://docs.helics.org/en/latest/user-guide/examples/fundamental_examples/fundamental_native_filter.html).
--------------------------------------------------------------------------------
/unmaintained/python/pi-exchange-config/pireceiver.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | import helics as h
3 | import time
4 | import struct
5 |
6 | fed = h.helicsCreateCombinationFederateFromConfig("receiver.json")
7 | sub = h.helicsFederateGetSubscription(fed, "data")
8 | h.helicsFederateEnterExecutingMode(fed)
9 |
10 | for request_time in range(1, 10):
11 | granted_time = h.helicsFederateRequestTime(fed, request_time)
12 | data = h.helicsInputGetDouble(sub)
13 | print("Message : {}".format(data))
14 |
15 | h.helicsFederateDisconnect(fed)
16 | h.helicsFederateFree(fed)
17 | h.helicsCloseLibrary()
18 |
--------------------------------------------------------------------------------
/unmaintained/python/Manager_Worker_Example/managed_worker_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fundamental_default",
3 | "broker": false,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "helics_broker -f6",
8 | "host": "localhost",
9 | "name": "broker"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u manager.py",
14 | "host": "localhost",
15 | "name": "manager"
16 | },
17 | {
18 | "directory": ".",
19 | "exec": "python -u worker.py",
20 | "host": "localhost",
21 | "name": "worker"
22 | }
23 | ]
24 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_brokers/multi_broker/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Advanced Topics - Broker Hierarchies
2 |
3 | This example does not currently work. [HELICS-Examples issue #125](https://github.com/GMLC-TDC/HELICS-Examples/issues/125) is tracking this example.
4 |
5 | This example demonstrates how to implement a broker that can use multiple messaging technologies (ZMQ, MPI, etc) when required by the computing environment. A full description of the example can be found in the [HELICS User Guide](https://docs.helics.org/en/latest/user-guide/examples/advanced_examples/advanced_brokers_multibroker.html).
--------------------------------------------------------------------------------
/unmaintained/python/pi-exchange/broker.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | import helics as h
3 | import time
4 |
5 | initstring = "-f 2"
6 |
7 | print("Creating Broker")
8 | broker = h.helicsCreateBroker("zmq", "", initstring)
9 | print("Created Broker")
10 |
11 | print("Checking if Broker is connected")
12 | isconnected = h.helicsBrokerIsConnected(broker)
13 | print("Checked if Broker is connected")
14 |
15 | if isconnected == 1:
16 | print("Broker created and connected")
17 |
18 | while h.helicsBrokerIsConnected(broker):
19 | time.sleep(1)
20 |
21 | h.helicsCloseLibrary()
22 |
23 | print("Broker disconnected")
24 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_message_comm/query/query_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "query",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u Charger.py",
8 | "host": "localhost",
9 | "name": "Charger"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u Controller.py",
14 | "host": "localhost",
15 | "name": "Controller"
16 | },
17 | {
18 | "directory": ".",
19 | "exec": "python -u Battery.py",
20 | "host": "localhost",
21 | "name": "Battery"
22 | }
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 |
5 | ### Summary
6 |
7 | If merged this pull request will
8 |
9 | ### Proposed changes
10 |
11 | -
12 |
--------------------------------------------------------------------------------
/unmaintained/python/simple/broker.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | import helics as h
3 | import time
4 |
5 | initstring = "-f2 --ipv4 --loglevel=7"
6 |
7 | print("Creating Broker")
8 | broker = h.helicsCreateBroker("zmq", "", initstring)
9 | print("Created Broker")
10 |
11 | print("Checking if Broker is connected")
12 | isconnected = h.helicsBrokerIsConnected(broker)
13 | print("Checked if Broker is connected")
14 |
15 | if isconnected == 1:
16 | print("Broker created and connected")
17 |
18 | while h.helicsBrokerIsConnected(broker):
19 | time.sleep(1)
20 |
21 | h.helicsCloseLibrary()
22 |
23 | print("Broker disconnected")
24 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_async_time_request/async_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "advanced_default",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u Charger.py",
8 | "host": "localhost",
9 | "name": "Charger"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u Controller.py",
14 | "host": "localhost",
15 | "name": "Controller"
16 | },
17 | {
18 | "directory": ".",
19 | "exec": "python -u Battery.py",
20 | "host": "localhost",
21 | "name": "Battery"
22 | }
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_connector/matchfile/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Advanced Topic - Connector Federate Using a Matchfile
2 |
3 | The use of a JSON-formatted matchfile is curently not working and thus that example does not work. [HELICS-Examples issue #124](https://github.com/GMLC-TDC/HELICS-Examples/issues/124) has been filed to track this example.
4 |
5 | This example demonstrates the use of a connector federate and matchfile to define a federation. A full description of the example can be found in the [HELICS User Guide](https://docs.helics.org/en/latest/user-guide/examples/advanced_examples/advanced_connector/something.html).
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_default/advanced_default_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "advanced_default",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u Charger.py",
8 | "host": "localhost",
9 | "name": "Charger"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u Controller.py",
14 | "host": "localhost",
15 | "name": "Controller"
16 | },
17 | {
18 | "directory": ".",
19 | "exec": "python -u Battery.py",
20 | "host": "localhost",
21 | "name": "Battery"
22 | }
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_default_pythonic/advanced_default_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "advanced_default",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u Charger.py",
8 | "host": "localhost",
9 | "name": "Charger"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u Controller.py",
14 | "host": "localhost",
15 | "name": "Controller"
16 | },
17 | {
18 | "directory": ".",
19 | "exec": "python -u Battery.py",
20 | "host": "localhost",
21 | "name": "Battery"
22 | }
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/combo/fundamental_combo_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fundamental_combo",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u Charger.py",
8 | "host": "localhost",
9 | "name": "Charger"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u Controller.py",
14 | "host": "localhost",
15 | "name": "Controller"
16 | },
17 | {
18 | "directory": ".",
19 | "exec": "python -u Battery.py",
20 | "host": "localhost",
21 | "name": "Battery"
22 | }
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_integration/fundamental_integration_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fundamental_integration",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u Charger.py",
8 | "host": "localhost",
9 | "name": "Charger"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u Controller.py",
14 | "host": "localhost",
15 | "name": "Controller"
16 | },
17 | {
18 | "directory": ".",
19 | "exec": "python -u Battery.py",
20 | "host": "localhost",
21 | "name": "Battery"
22 | }
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/filter_native/ControllerConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Controller",
3 | "log_level": "warning",
4 | "core_type": "zmq",
5 | "time_delta": 1,
6 | "uninterruptible": false,
7 | "terminate_on_error": true,
8 | "endpoints": [
9 | {
10 | "name": "Controller/ep",
11 | "global": true
12 | }
13 | ],
14 | "filters":
15 | [
16 | {
17 | "name":"ep_filter",
18 | "destination_target":"Controller/ep",
19 | "operation":"delay",
20 | "properties":
21 | {
22 | "name":"delay",
23 | "value":"900s"
24 | }
25 | }
26 | ]
27 | }
28 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/filter_federate/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Fundamental Topics - Filter Federate Example
2 |
3 | This example does not currently fully function. [HELICS-Examples issue #123.](https://github.com/GMLC-TDC/HELICS-Examples/issues/123) has been set up to track this example.
4 |
5 | This example demonstrates the federation architecture and implementation of a filter federate used to implement custom communication system effects on HELICS message changes. A full description of the example can be found in the [HELICS User Guide](https://docs.helics.org/en/latest/user-guide/examples/fundamental_examples/fundamental_filter_federate.html).
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/multi_agent/Battery1Config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Battery1",
3 | "core_name": "battery1_core",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "period": 60,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "wait_for_current_time_update": true,
10 | "publications":[
11 | {
12 | "key":"Battery1/current",
13 | "type":"double",
14 | "unit":"A",
15 | "global": true
16 | }
17 | ],
18 | "subscriptions":[
19 | {
20 | "target":"Charger1/voltage",
21 | "type":"double",
22 | "unit":"V",
23 | "global": true
24 | }
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/multi_agent/Battery2Config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Battery2",
3 | "core_name": "battery2_core",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "period": 60,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "wait_for_current_time_update": true,
10 | "publications":[
11 | {
12 | "key":"Battery2/current",
13 | "type":"double",
14 | "unit":"A",
15 | "global": true
16 | }
17 | ],
18 | "subscriptions":[
19 | {
20 | "target":"Charger2/voltage",
21 | "type":"double",
22 | "unit":"V",
23 | "global": true
24 | }
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/multi_agent/Battery3Config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Battery3",
3 | "core_name": "battery3_core",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "period": 60,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "wait_for_current_time_update": true,
10 | "publications":[
11 | {
12 | "key":"Battery3/current",
13 | "type":"double",
14 | "unit":"A",
15 | "global": true
16 | }
17 | ],
18 | "subscriptions":[
19 | {
20 | "target":"Charger3/voltage",
21 | "type":"double",
22 | "unit":"V",
23 | "global": true
24 | }
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/multi_agent/Battery4Config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Battery4",
3 | "core_name": "battery4_core",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "period": 60,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "wait_for_current_time_update": true,
10 | "publications":[
11 | {
12 | "key":"Battery4/current",
13 | "type":"double",
14 | "unit":"A",
15 | "global": true
16 | }
17 | ],
18 | "subscriptions":[
19 | {
20 | "target":"Charger4/voltage",
21 | "type":"double",
22 | "unit":"V",
23 | "global": true
24 | }
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/multi_agent/Battery5Config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Battery5",
3 | "core_name": "battery5_core",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "period": 60,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "wait_for_current_time_update": true,
10 | "publications":[
11 | {
12 | "key":"Battery5/current",
13 | "type":"double",
14 | "unit":"A",
15 | "global": true
16 | }
17 | ],
18 | "subscriptions":[
19 | {
20 | "target":"Charger5/voltage",
21 | "type":"double",
22 | "unit":"V",
23 | "global": true
24 | }
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/unmaintained/python/pi-exchange-config/pisender.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | import helics as h
3 | import time
4 | import struct
5 | import math
6 |
7 | initstring = "-f 2 --name=mainbroker"
8 | broker = h.helicsCreateBroker("zmq", "", initstring)
9 |
10 | fed = h.helicsCreateCombinationFederateFromConfig("sender.json")
11 | pub = h.helicsFederateGetPublication(fed, "data")
12 |
13 | h.helicsFederateEnterExecutingMode(fed)
14 |
15 | for request_time in range(1, 10):
16 | h.helicsFederateRequestTime(fed, request_time)
17 | h.helicsPublicationPublishDouble(pub, math.pi)
18 |
19 | h.helicsFederateDisconnect(fed)
20 | h.helicsFederateFree(fed)
21 | h.helicsCloseLibrary()
22 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_default_matlab/advanced_default_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "advanced_default",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "matlab -batch run(\\'Charger.m\\')",
8 | "host": "localhost",
9 | "name": "Charger"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "matlab -batch run(\\'Controller.m\\')",
14 | "host": "localhost",
15 | "name": "Controller"
16 | },
17 | {
18 | "directory": ".",
19 | "exec": "matlab -batch run(\\'Battery.m\\')",
20 | "host": "localhost",
21 | "name": "Battery"
22 | }
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/unmaintained/python/osmses_2024_battery_charger/battery_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "battery",
3 | "core_type": "zmq",
4 | "log_level": "warning",
5 | "period": 60,
6 | "uninterruptible": false,
7 | "terminate_on_error": true,
8 | "wait_for_current_time_update": false,
9 | "publications": [
10 | {
11 | "global": true,
12 | "key": "charging_current",
13 | "type": "double",
14 | "unit": "A"
15 | }
16 | ],
17 | "subscriptions": [
18 | {
19 | "global": true,
20 | "key": "charging_voltage",
21 | "type": "double",
22 | "unit": "V",
23 | "default": 240
24 | }
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/unmaintained/python/osmses_2024_battery_charger/charger_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "charger",
3 | "core_type": "zmq",
4 | "log_level": "warning",
5 | "period": 60,
6 | "terminate_on_error": true,
7 | "uninterruptible": false,
8 | "wait_for_current_time_update": true,
9 | "publications": [
10 | {
11 | "global": true,
12 | "key": "charging_voltage",
13 | "type": "double",
14 | "unit": "V"
15 | }
16 | ],
17 | "subscriptions": [
18 | {
19 | "global": true,
20 | "key": "charging_current",
21 | "type": "double",
22 | "unit": "A",
23 | "default": 10
24 | }
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_connector/interface_creation/connector_interface_creation_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "advanced connector direct matchfile",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u Charger.py 1",
8 | "host": "localhost",
9 | "name": "Charger"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u Battery.py 1",
14 | "host": "localhost",
15 | "name": "Battery"
16 | },
17 | {
18 | "directory": ".",
19 | "exec": "helics_connector direct_matchfile.txt",
20 | "host": "localhost",
21 | "name": "helics_connector"
22 | }
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_connector/matchfile/direct_matchfile.txt:
--------------------------------------------------------------------------------
1 | Charger/EV1_output_voltage Battery/EV1_input_voltage from_to
2 | Charger/EV2_output_voltage Battery/EV2_input_voltage from_to
3 | Charger/EV3_output_voltage Battery/EV3_input_voltage from_to
4 | Charger/EV4_output_voltage Battery/EV4_input_voltage from_to
5 | Charger/EV5_output_voltage Battery/EV5_input_voltage from_to
6 | Charger/EV1_input_current Battery/EV1_output_current to_from
7 | Charger/EV2_input_current Battery/EV2_output_current to_from
8 | Charger/EV3_input_current Battery/EV3_output_current to_from
9 | Charger/EV4_input_current Battery/EV4_output_current to_from
10 | Charger/EV5_input_current Battery/EV5_output_current to_from
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_connector/matchfile/connector_matchfile_regex_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "advanced connector regex matchfile",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u Charger.py 1",
8 | "host": "localhost",
9 | "name": "Charger"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u Battery.py 1",
14 | "host": "localhost",
15 | "name": "Battery"
16 | },
17 | {
18 | "directory": ".",
19 | "exec": "helics_connector regex_matchfile.txt --loglevel=connections",
20 | "host": "localhost",
21 | "name": "helics_connector"
22 | }
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_dynamic_federation/BatteryLateConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "BatteryLate",
3 | "core_name": "battery_core_late",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "period": 60,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "wait_for_current_time_update": false,
10 | "publications":[
11 | {
12 | "key":"BatteryLate/EV5_current",
13 | "type":"double",
14 | "unit":"A",
15 | "global": true
16 | }
17 | ],
18 | "subscriptions":[
19 | {
20 | "key":"Charger/EV5_voltage",
21 | "type":"double",
22 | "unit":"V",
23 | "global": true,
24 | "default": 240
25 | }
26 | ]
27 | }
28 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_connector/interface_creation/direct_matchfile.txt:
--------------------------------------------------------------------------------
1 | Charger/EV1_output_voltage Battery/EV1_input_voltage from_to
2 | Charger/EV2_output_voltage Battery/EV2_input_voltage from_to
3 | Charger/EV3_output_voltage Battery/EV3_input_voltage from_to
4 | Charger/EV4_output_voltage Battery/EV4_input_voltage from_to
5 | Charger/EV5_output_voltage Battery/EV5_input_voltage from_to
6 | Charger/EV1_input_current Battery/EV1_output_current to_from
7 | Charger/EV2_input_current Battery/EV2_output_current to_from
8 | Charger/EV3_input_current Battery/EV3_output_current to_from
9 | Charger/EV4_input_current Battery/EV4_output_current to_from
10 | Charger/EV5_input_current Battery/EV5_output_current to_from
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_connector/matchfile/connector_matchfile_direct_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "advanced connector direct matchfile",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u Charger.py 1",
8 | "host": "localhost",
9 | "name": "Charger"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u Battery.py 1",
14 | "host": "localhost",
15 | "name": "Battery"
16 | },
17 | {
18 | "directory": ".",
19 | "exec": "helics_connector direct_matchfile.json --loglevel=connections",
20 | "host": "localhost",
21 | "name": "helics_connector"
22 | }
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/user_guide_examples/misc/gridlabd_example_1/1b_Transmission_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "coreInit": "--federates=1",
3 | "coreName": "Transmission Federate",
4 | "coreType": "zmq",
5 | "name": "TransmissionSim",
6 | "offset": 0.0,
7 | "period": 60,
8 | "timeDelta": 1.0,
9 | "logfile": "output.log",
10 | "log_level": "warning",
11 | "publications": [
12 | {
13 | "key": "TransmissionSim/transmission_voltage",
14 | "type": "complex",
15 | "global": true
16 | }
17 | ],
18 | "subscriptions": [
19 | {
20 | "key": "IEEE_123_feeder_0/totalLoad",
21 | "type": "complex",
22 | "required": true
23 | }
24 | ]
25 | }
26 |
--------------------------------------------------------------------------------
/user_guide_examples/misc/gridlabd_example_1/1c_Transmission_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "coreInit": "--federates=1",
3 | "coreName": "Transmission Federate",
4 | "coreType": "zmq",
5 | "name": "TransmissionSim",
6 | "offset": 0.0,
7 | "period": 60,
8 | "timeDelta": 1.0,
9 | "logfile": "output.log",
10 | "log_level": "warning",
11 | "publications": [
12 | {
13 | "key": "TransmissionSim/transmission_voltage",
14 | "type": "complex",
15 | "global": true
16 | }
17 | ],
18 | "subscriptions": [
19 | {
20 | "key": "IEEE_123_feeder_0/totalLoad",
21 | "type": "complex",
22 | "required": true
23 | }
24 | ]
25 | }
26 |
--------------------------------------------------------------------------------
/unmaintained/python/Manager_Worker_Example/README.md:
--------------------------------------------------------------------------------
1 | # Manager Worker Example
2 |
3 | A manager federate sends some values to the worker federates. The workers update the values and sends back the updated values to the manager. Each worker has a random delay. The manager doesn't move forward untill all the federates have sent back the value.
4 |
5 | ## Running
6 |
7 | 1. In a terminal run, ```helics_broker -f6``` runs with 5 workers and 1 manager by default.
8 | 2. In another terminal, run, ```python manager.py```
9 | 3. In another terminal, run, ```python worker.py```
10 |
11 | To modify the number of worker.
12 | Change n in manager.py and worker.py.
13 | use -f (n+1) (+1 is the manager federate) federates with helics_broker.
14 |
--------------------------------------------------------------------------------
/python/no_filter_benchmark/ss_echo_filter_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": ".",
5 | "exec": "helics_broker -f 3 --loglevel=7",
6 | "host": "localhost",
7 | "name": "broker"
8 | },
9 | {
10 | "directory": ".",
11 | "exec": "python -u source_sink.py",
12 | "host": "localhost",
13 | "name": "ss"
14 | },
15 | {
16 | "directory": ".",
17 | "exec": "python -u echo.py",
18 | "host": "localhost",
19 | "name": "echo"
20 | },
21 | {
22 | "directory": ".",
23 | "exec": "python -u no_filter.py",
24 | "host": "localhost",
25 | "name": "filter"
26 | }
27 | ],
28 | "name": "filter_test"
29 | }
30 |
--------------------------------------------------------------------------------
/python/no_filter_benchmark/filter_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "filter",
3 | "core_name": "filter_core",
4 | "log_level": 1,
5 | "core_type": "zmq",
6 | "uninterruptible": false,
7 | "terminate_on_error": true,
8 | "force_logging_flush": true,
9 | "endpoints": [
10 | {
11 | "name": "filter/ep",
12 | "global": true
13 | }
14 | ],
15 | "filters": [
16 | {
17 | "name": "filterFed",
18 | "sourcetargets": [
19 | "source_sink/ep",
20 | "echo/ep"
21 | ],
22 | "operation": "reroute",
23 | "properties": {
24 | "name": "newdestination",
25 | "value": "filter/ep"
26 | }
27 | }
28 | ]
29 | }
30 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_brokers/hierarchies/broker_hierarchy_runner_C.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Controller_and_Charger",
3 | "federates": [
4 | {
5 | "directory": ".",
6 | "exec": "helics_broker -f 2 --loglevel=warning --timeout='30s' --port=25400 --broker_address=tcp://127.0.0.1:25200",
7 | "host": "localhost",
8 | "name": "brokerC"
9 | },
10 | {
11 | "directory": ".",
12 | "exec": "python -u Charger.py",
13 | "host": "localhost",
14 | "name": "Charger",
15 | "loglevel": 1
16 | },
17 | {
18 | "directory": ".",
19 | "exec": "python -u Controller.py",
20 | "host": "localhost",
21 | "name": "Controller",
22 | "loglevel": 1
23 | }
24 | ]
25 | }
26 |
--------------------------------------------------------------------------------
/c/comboFederate1/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | # Copyright (c) 2017-2019, Battelle Memorial Institute; Lawrence Livermore
3 | # National Security, LLC; Alliance for Sustainable Energy, LLC.
4 | # See the top-level NOTICE for additional details.
5 | # All rights reserved.
6 | #
7 | # SPDX-License-Identifier: BSD-3-Clause
8 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 |
10 | cmake_minimum_required(VERSION 3.4)
11 |
12 | project(comboFederate1-c C)
13 |
14 | find_package(HELICS 2 REQUIRED)
15 |
16 | add_executable(comboFed-c comboFed.c)
17 | target_link_libraries(comboFed-c HELICS::helicsSharedLib)
18 | set_target_properties(comboFed-c PROPERTIES FOLDER c/federates)
19 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_input_output/fib_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Fibonnaci demo",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u fib1.py",
8 | "host": "localhost",
9 | "name": "fib1"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u fib2.py",
14 | "host": "localhost",
15 | "name": "fib2"
16 | },
17 | {
18 | "directory": ".",
19 | "exec": "python -u fib3.py",
20 | "host": "localhost",
21 | "name": "fib3"
22 | },
23 | {
24 | "directory": ".",
25 | "exec": "python -u fib4.py",
26 | "host": "localhost",
27 | "name": "fib4"
28 | }
29 | ]
30 | }
--------------------------------------------------------------------------------
/user_guide_examples/misc/gridlabd_example_1/1a_Transmission_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "coreInit": "--federates=1",
3 | "coreName": "Transmission Federate",
4 | "coreType": "zmq",
5 | "name": "TransmissionSim",
6 | "offset": 0.0,
7 | "period": 60,
8 | "timeDelta": 1.0,
9 | "logfile": "transmission_helics_output.log",
10 | "log_level": "warning",
11 | "uninterruptible": true,
12 | "publications": [
13 | {
14 | "key": "TransmissionSim/transmission_voltage",
15 | "type": "complex",
16 | "global": true
17 | }
18 | ],
19 | "subscriptions": [
20 | {
21 | "key": "IEEE_123_feeder_0/totalLoad",
22 | "type": "complex",
23 | "required": true
24 | }
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/user_guide_examples/misc/gridlabd_example_1/1b_cosim_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "broker": true,
3 | "federates":[
4 | {
5 | "directory":".",
6 | "exec":"python 1abc_Transmission_simulator.py -c 1b",
7 | "host":"localhost",
8 | "name":"1b_Transmission"
9 | },
10 | {
11 | "directory":".",
12 | "exec":"python 1bc_EV_Controller.py -c 1b",
13 | "host":"localhost",
14 | "name":"1b_Controller"
15 | },
16 | {
17 | "directory":".",
18 | "exec":"gridlabd.sh 1b_IEEE_123_feeder.glm",
19 | "host":"localhost",
20 | "name":"1b_GridLABD"
21 | }
22 | ],
23 | "name":"1b-T-D-Cosimulation-HELICSRunner"
24 | }
25 |
--------------------------------------------------------------------------------
/c/messageFederate1/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | # Copyright (c) 2017-2019, Battelle Memorial Institute; Lawrence Livermore
3 | # National Security, LLC; Alliance for Sustainable Energy, LLC.
4 | # See the top-level NOTICE for additional details.
5 | # All rights reserved.
6 | #
7 | # SPDX-License-Identifier: BSD-3-Clause
8 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 |
10 | cmake_minimum_required(VERSION 3.4)
11 |
12 | project(messageFederate1-c C)
13 |
14 | find_package(HELICS 2 REQUIRED)
15 |
16 | add_executable(messageFed-c messageFed.c)
17 | target_link_libraries(messageFed-c HELICS::helicsSharedLib)
18 |
19 | set_target_properties(messageFed-c PROPERTIES FOLDER c/federates)
20 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_default/advanced_default_runner_web.json:
--------------------------------------------------------------------------------
1 | {
2 | "broker": {
3 | "federates": 3,
4 | "observer": {
5 | "directory": "./",
6 | "host": "localhost",
7 | "name": "observer"
8 | }
9 | },
10 | "federates": [
11 | {
12 | "directory": ".",
13 | "exec": "python -u Charger.py",
14 | "host": "localhost",
15 | "name": "Charger"
16 | },
17 | {
18 | "directory": ".",
19 | "exec": "python -u Controller.py",
20 | "host": "localhost",
21 | "name": "Controller"
22 | },
23 | {
24 | "directory": ".",
25 | "exec": "python -u Battery.py",
26 | "host": "localhost",
27 | "name": "Battery"
28 | }
29 | ],
30 | "name": "advanced_default"
31 | }
32 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_fmu/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Advanced Topics - HELICS-FMI/FMU Example
2 |
3 | This example demonstrates the usage of [HELICS-FMI](https://github.com/GMLC-TDC/HELICS-FMI) to run a co-simulation in helics with FMUs. The example duplicates the fundamental default example, except that the battery model has been replaced with an FMU. A full description of the example can be found in the [HELICS User Guide](https://docs.helics.org/en/latest/user-guide/examples/advanced_examples/advanced_fmu.html).
4 |
5 | `SimpelBattery.fmu` was compiled on a Windows 10 machine.
6 | `SimpleBatterLinux.fmu` was compiled on Ubuntu 22.04.2 LTS using OpenModelica 1.21.0.
7 | Note that if the linux version is used, `runner.json` will have to be modified slightly to point to the right FMU.
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/multi_agent/Charger1Config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Charger1",
3 | "core_name": "charger1_core",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "period": 60,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "endpoints": [
10 | {
11 | "name": "Charger1/soc",
12 | "destination": "Controller/ep",
13 | "global": true
14 | }
15 | ],
16 | "publications":[
17 | {
18 | "key":"Charger1/voltage",
19 | "type":"double",
20 | "unit":"V",
21 | "global": true
22 | }
23 | ],
24 | "subscriptions":[
25 | {
26 | "target":"Battery1/current",
27 | "type":"double",
28 | "unit":"A",
29 | "global": true
30 | }
31 | ]
32 | }
33 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/multi_agent/Charger2Config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Charger2",
3 | "core_name": "charger2_core",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "period": 60,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "endpoints": [
10 | {
11 | "name": "Charger2/soc",
12 | "destination": "Controller/ep",
13 | "global": true
14 | }
15 | ],
16 | "publications":[
17 | {
18 | "key":"Charger2/voltage",
19 | "type":"double",
20 | "unit":"V",
21 | "global": true
22 | }
23 | ],
24 | "subscriptions":[
25 | {
26 | "target":"Battery2/current",
27 | "type":"double",
28 | "unit":"A",
29 | "global": true
30 | }
31 | ]
32 | }
33 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/multi_agent/Charger3Config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Charger3",
3 | "core_name": "charger3_core",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "period": 60,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "endpoints": [
10 | {
11 | "name": "Charger3/soc",
12 | "destination": "Controller/ep",
13 | "global": true
14 | }
15 | ],
16 | "publications":[
17 | {
18 | "key":"Charger3/voltage",
19 | "type":"double",
20 | "unit":"V",
21 | "global": true
22 | }
23 | ],
24 | "subscriptions":[
25 | {
26 | "target":"Battery3/current",
27 | "type":"double",
28 | "unit":"A",
29 | "global": true
30 | }
31 | ]
32 | }
33 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/multi_agent/Charger4Config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Charger4",
3 | "core_name": "charger4_core",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "period": 60,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "endpoints": [
10 | {
11 | "name": "Charger4/soc",
12 | "destination": "Controller/ep",
13 | "global": true
14 | }
15 | ],
16 | "publications":[
17 | {
18 | "key":"Charger4/voltage",
19 | "type":"double",
20 | "unit":"V",
21 | "global": true
22 | }
23 | ],
24 | "subscriptions":[
25 | {
26 | "target":"Battery4/current",
27 | "type":"double",
28 | "unit":"A",
29 | "global": true
30 | }
31 | ]
32 | }
33 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/multi_agent/Charger5Config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Charger5",
3 | "core_name": "charger5_core",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "period": 60,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "endpoints": [
10 | {
11 | "name": "Charger5/soc",
12 | "destination": "Controller/ep",
13 | "global": true
14 | }
15 | ],
16 | "publications":[
17 | {
18 | "key":"Charger5/voltage",
19 | "type":"double",
20 | "unit":"V",
21 | "global": true
22 | }
23 | ],
24 | "subscriptions":[
25 | {
26 | "target":"Battery5/current",
27 | "type":"double",
28 | "unit":"A",
29 | "global": true
30 | }
31 | ]
32 | }
33 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_default_matlab/get_new_battery.m:
--------------------------------------------------------------------------------
1 | function listOfBatts = get_new_battery(numBattery)
2 | %{
3 | Using hard-coded probabilities, a distribution of battery of
4 | fixed battery sizes are generated. The number of batteries is a user
5 | provided parameter.
6 |
7 | :param numBattery: Number of batteries to generate
8 | :return
9 | listOfBatts: List of generated batteries
10 |
11 | %}
12 |
13 | % # Probabilities of a new EV having a battery at a given capacity.
14 | % # The three random values (25,62, 100) are the kWh of the randomly
15 | % # selected battery.
16 | size_1 = 0.2;
17 | size_2 = 0.2;
18 | size_3 = 0.6;
19 | listOfBatts = randsample([25,62,100],numBattery,true,[size_1,size_2,size_3]);
20 | end
--------------------------------------------------------------------------------
/unmaintained/python/multi-node-pi-exchange/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '3'
2 | services:
3 | broker:
4 | build: ../../Dockerfiles/helics
5 | command:
6 | - helics_broker
7 | - '2'
8 | - --ipv4
9 | - --loglevel=5
10 | image: helics
11 | sender:
12 | build: ../../Dockerfiles/helics
13 | command:
14 | - python3
15 | - pisender.py
16 | - broker # reference to broker container
17 | image: helics
18 | volumes:
19 | - .:/helics-example
20 | working_dir: /helics-example
21 | receiver:
22 | build: ../../Dockerfiles/helics
23 | command:
24 | - python3
25 | - pireceiver.py
26 | - broker # reference to broker container
27 | image: helics
28 | volumes:
29 | - .:/helics-example
30 | working_dir: /helics-example
31 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_default_matlab/calc_charging_voltage.m:
--------------------------------------------------------------------------------
1 | function charging_voltage = calc_charging_voltage(EV_List)
2 | %{
3 | This function uses the pre-defined charging powers and maps them to
4 | standard (more or less) charging voltages. This allows the charger
5 | to apply an appropriately modeled voltage to the EV based on the
6 | charging power level
7 |
8 | :param EV_list: Value of "1", "2", or "3" to indicate charging level
9 | :return: charging_voltage: List of charging voltages corresponding
10 | to the charging power.
11 | %}
12 |
13 | % Ignoring the difference between AC and DC voltages for this application
14 | charge_voltages = [120, 240, 630];
15 | charging_voltage = charge_voltages * [EV_List == [1,2,3].'];
16 |
17 | end
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_message_comm/translators/translator_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "advanced_default",
3 | "broker": false,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "helics_broker -f3 --log_level=trace",
8 | "host": "localhost",
9 | "name": "broker"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u Charger.py",
14 | "host": "localhost",
15 | "name": "Charger"
16 | },
17 | {
18 | "directory": ".",
19 | "exec": "python -u Controller.py",
20 | "host": "localhost",
21 | "name": "Controller"
22 | },
23 | {
24 | "directory": ".",
25 | "exec": "python -u Battery.py",
26 | "host": "localhost",
27 | "name": "Battery"
28 | }
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_message_comm/multi_input/ChargerConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Charger",
3 | "log_level": "warning",
4 | "core_type": "zmq",
5 | "period": 60,
6 | "uninterruptible": false,
7 | "terminate_on_error": true,
8 | "publications":[
9 | {
10 | "key":"Charger/EV_voltage",
11 | "type":"double",
12 | "unit":"V",
13 | "global": true
14 | }
15 | ],
16 | "inputs":[
17 | {
18 | "key":"Battery/charging_current",
19 | "type":"double",
20 | "global": true,
21 | "multi_input_handling_method": "sum",
22 | "targets": [
23 | "Battery/EV1_current",
24 | "Battery/EV2_current",
25 | "Battery/EV3_current",
26 | "Battery/EV4_current",
27 | "Battery/EV5_current"]
28 | }
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/filter_federate/fundamental_filter_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fundamental_filter",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u Charger.py",
8 | "host": "localhost",
9 | "name": "Charger"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u Controller.py",
14 | "host": "localhost",
15 | "name": "Controller"
16 | },
17 | {
18 | "directory": ".",
19 | "exec": "python -u Battery.py",
20 | "host": "localhost",
21 | "name": "Battery"
22 | },
23 | {
24 | "directory": ".",
25 | "exec": "python -u Filter.py",
26 | "host": "localhost",
27 | "name": "Filter"
28 | }
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/filter_native/fundamental_filter_native_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": ".",
5 | "exec": "helics_broker -f 3 --loglevel=warning",
6 | "host": "localhost",
7 | "name": "broker"
8 | },
9 | {
10 | "directory": ".",
11 | "exec": "python -u Charger.py",
12 | "host": "localhost",
13 | "name": "Charger"
14 | },
15 | {
16 | "directory": ".",
17 | "exec": "python -u Battery.py",
18 | "host": "localhost",
19 | "name": "Battery"
20 | },
21 | {
22 | "directory": ".",
23 | "exec": "python -u Controller.py",
24 | "host": "localhost",
25 | "name": "Controller"
26 | }
27 | ],
28 | "name": "fundamental_filter_native"
29 | }
30 |
--------------------------------------------------------------------------------
/cpp/filterFederate1/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | ##############################################################################
2 | # Copyright (c) 2018,
3 | # Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable Energy, LLC
4 | #All rights reserved. See LICENSE file and DISCLAIMER for more details.
5 | ##############################################################################
6 |
7 | cmake_minimum_required(VERSION 3.4)
8 |
9 | project(filterFederate1-cpp)
10 |
11 | if(NOT CMAKE_CXX_STANDARD)
12 | set(CMAKE_CXX_STANDARD 14)
13 | endif()
14 |
15 | find_package(HELICS 2 REQUIRED)
16 |
17 | add_executable(filterFed-cpp filterFed.cpp)
18 | target_link_libraries(filterFed-cpp HELICS::helics-apps-shared)
19 |
20 | set_target_properties(filterFed-cpp PROPERTIES FOLDER cpp/federates)
21 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_brokers/simultaneous/federation_1/federation_1_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "federation_1",
3 | "federates": [
4 | {
5 | "directory": ".",
6 | "exec": "helics_broker -f 3 --loglevel=warning --port=20100",
7 | "host": "localhost",
8 | "name": "broker"
9 | },
10 | {
11 | "directory": ".",
12 | "exec": "python -u Charger_1.py",
13 | "host": "localhost",
14 | "name": "Charger_1"
15 | },
16 | {
17 | "directory": ".",
18 | "exec": "python -u Controller_1.py",
19 | "host": "localhost",
20 | "name": "Controller_1"
21 | },
22 | {
23 | "directory": ".",
24 | "exec": "python -u Battery_1.py",
25 | "host": "localhost",
26 | "name": "Battery_1"
27 | }
28 | ]
29 | }
30 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_brokers/simultaneous/federation_2/federation_2_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "federation_2",
3 | "federates": [
4 | {
5 | "directory": ".",
6 | "exec": "helics_broker -f 3 --loglevel=warning --port=20200",
7 | "host": "localhost",
8 | "name": "broker"
9 | },
10 | {
11 | "directory": ".",
12 | "exec": "python -u Charger_2.py",
13 | "host": "localhost",
14 | "name": "Charger_2"
15 | },
16 | {
17 | "directory": ".",
18 | "exec": "python -u Controller_2.py",
19 | "host": "localhost",
20 | "name": "Controller_2"
21 | },
22 | {
23 | "directory": ".",
24 | "exec": "python -u Battery_2.py",
25 | "host": "localhost",
26 | "name": "Battery_2"
27 | }
28 | ]
29 | }
30 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_brokers/simultaneous/federation_3/federation_3_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "federation_3",
3 | "federates": [
4 | {
5 | "directory": ".",
6 | "exec": "helics_broker -f 3 --loglevel=warning --port=20300",
7 | "host": "localhost",
8 | "name": "broker"
9 | },
10 | {
11 | "directory": ".",
12 | "exec": "python -u Charger_3.py",
13 | "host": "localhost",
14 | "name": "Charger_3"
15 | },
16 | {
17 | "directory": ".",
18 | "exec": "python -u Controller_3.py",
19 | "host": "localhost",
20 | "name": "Controller_3"
21 | },
22 | {
23 | "directory": ".",
24 | "exec": "python -u Battery_3.py",
25 | "host": "localhost",
26 | "name": "Battery_3"
27 | }
28 | ]
29 | }
30 |
--------------------------------------------------------------------------------
/python/no_filter_benchmark/README.md:
--------------------------------------------------------------------------------
1 | This example federation is useful for testing filter federate performance and demonstrating its basic configuration. source_sink.py includes data collection and graphing functionality that displays the histogram of the transit times of HELICS messages to and from the echo federate and can include processing by the filter federate if included in the federation.
2 |
3 | It also includes in echo.py, alternative implementations of the echo function, some of which work correctly in this federation and some do not. Thus, it is a good example of how imprecise implementations of simple federates can result in unexpected behavior especially when using rerouting filters and filter federates.
4 |
5 | For more details examine the comments in echo.py to see how it has implemented its a message echoing function.
6 |
7 |
--------------------------------------------------------------------------------
/unmaintained/example_files/README.md:
--------------------------------------------------------------------------------
1 | # HELICS example
2 |
3 | ### Running a simple example
4 |
5 | 1. Open three terminal windows
6 | 2. Run the following in the first window
7 |
8 | ```bash
9 | cd /path/to/helics_install/bin
10 | ./helics_broker 2
11 | ```
12 |
13 | 3. Run the following in the second window
14 |
15 | ```bash
16 | cd /path/to/helics_install/bin
17 | ./helics_player /path/to/HELICS/examples/example1.player
18 | ```
19 |
20 | 4. Run the following in the last window
21 |
22 | ```bash
23 | cd /path/to/helics_install/bin
24 | ./helics_recorder /path/to/HELICS/examples/example1.recorder -o output.log
25 | ```
26 |
27 | This will run a 24 second (simulation time) co-simulation between a "player" federate that reads data from a file and a "recorder" federate that records selected data to a file (output.log).
28 |
29 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_brokers/multi_broker/multi_broker_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "multi_broker",
3 | "federates": [
4 | {
5 | "directory": ".",
6 | "exec": "helics_broker -f 3 --coreType=multi --config=multi_broker_config.json --name=root_broker",
7 | "host": "localhost",
8 | "name": "broker"
9 | },
10 | {
11 | "directory": ".",
12 | "exec": "python -u Charger.py",
13 | "host": "localhost",
14 | "name": "Charger"
15 | },
16 | {
17 | "directory": ".",
18 | "exec": "python -u Controller.py",
19 | "host": "localhost",
20 | "name": "Controller"
21 | },
22 | {
23 | "directory": ".",
24 | "exec": "python -u Battery.py",
25 | "host": "localhost",
26 | "name": "Battery"
27 | }
28 | ]
29 | }
30 |
--------------------------------------------------------------------------------
/user_guide_examples/misc/gridlabd_example_1/1c_cosim_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "broker": true,
3 | "federates":[
4 | {
5 | "directory":".",
6 | "exec":"python 1abc_Transmission_simulator.py -c 1c",
7 | "host":"localhost",
8 | "name":"1c_Transmission",
9 | "logfile": "./logs/1c_TransmissionFederate"
10 | },
11 | {
12 | "directory":".",
13 | "exec":"python 1bc_EV_Controller.py -c 1c",
14 | "host":"localhost",
15 | "name":"1c_Controller"
16 | },
17 | {
18 | "directory":".",
19 | "exec":"gridlabd.sh 1c_IEEE_123_feeder.glm",
20 | "host":"localhost",
21 | "name":"1c_GridLABD"
22 | }
23 | ],
24 | "name":"1c-T-D-Cosimulation-HELICSRunner"
25 | }
26 |
--------------------------------------------------------------------------------
/cpp/valueFederate1/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | # Copyright (c) 2017-2019, Battelle Memorial Institute; Lawrence Livermore
3 | # National Security, LLC; Alliance for Sustainable Energy, LLC.
4 | # See the top-level NOTICE for additional details.
5 | # All rights reserved.
6 | #
7 | # SPDX-License-Identifier: BSD-3-Clause
8 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 |
10 | cmake_minimum_required(VERSION 3.4)
11 |
12 | project(valueFederate1-cpp)
13 |
14 | if(NOT CMAKE_CXX_STANDARD)
15 | set(CMAKE_CXX_STANDARD 14)
16 | endif()
17 |
18 | find_package(HELICS 2 REQUIRED)
19 |
20 | add_executable(valueFed-cpp valueFed.cpp)
21 | target_link_libraries(valueFed-cpp HELICS::helics-apps-shared)
22 |
23 | set_target_properties(valueFed-cpp PROPERTIES FOLDER cpp/federates)
24 |
--------------------------------------------------------------------------------
/scripts/cleanup-cmake.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | cmake_install_path=${CI_DEPENDENCY_DIR}/cmake
4 |
5 | # Get rid of unneeded files that just take up extra space
6 | if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
7 | rm -rf ${cmake_install_path}/doc
8 | rm -rf ${cmake_install_path}/man
9 | rm -f ${cmake_install_path}/bin/ccmake
10 | rm -f ${cmake_install_path}/bin/cmake-gui
11 | elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
12 | rm -rf ${cmake_install_path}/CMake.app/Contents/Frameworks
13 | rm -rf ${cmake_install_path}/CMake.app/Contents/MacOS
14 | rm -rf ${cmake_install_path}/CMake.app/Contents/Resources
15 | rm -rf ${cmake_install_path}/CMake.app/Contents/doc
16 | rm -rf ${cmake_install_path}/CMake.app/Contents/man
17 | rm -f ${cmake_install_path}/CMake.app/Contents/bin/ccmake
18 | rm -f ${cmake_install_path}/CMake.app/Contents/bin/cmake-gui
19 | fi
20 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_connector/matchfile/direct_matchfile.json:
--------------------------------------------------------------------------------
1 | {
2 | "connections": [
3 | ["Charger/EV1_output_voltage", "Battery/EV1_input_voltage", "from_to"],
4 | ["Charger/EV2_output_voltage", "Battery/EV2_input_voltage", "from_to"],
5 | ["Charger/EV3_output_voltage", "Battery/EV3_input_voltage", "from_to"],
6 | ["Charger/EV4_output_voltage", "Battery/EV4_input_voltage", "from_to"],
7 | ["Charger/EV5_output_voltage", "Battery/EV5_input_voltage", "from_to"],
8 | ["Charger/EV1_input_current", "Battery/EV1_output_current", "to_from"],
9 | ["Charger/EV2_input_current", "Battery/EV2_output_current", "to_from"],
10 | ["Charger/EV3_input_current", "Battery/EV3_output_current", "to_from"],
11 | ["Charger/EV4_input_current", "Battery/EV4_output_current", "to_from"],
12 | ["Charger/EV5_input_current", "Battery/EV5_output_current", "to_from"]
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/unmaintained/python/osmses_2024_battery_charger/README.md:
--------------------------------------------------------------------------------
1 | # OSMSES HELICS Tutorial Example
2 |
3 | This example was as OSMSES 2024 HELICS tutorial presented by Trevor Hardy. It provides a series of simple Python-based models for a battery and charger that start as solo Python scripts and progress to an integrated HELICS co-simulation. The file names indicate the point in the progression:
4 |
5 | - `*_solo.py` - Initial models that each run solo without any interaction between the two.
6 | - `*_cosim_incomplete.py` - Starting point for the in-class version of the exercise. The body of the code is the same as the `*._solo.py` with the file's docstring listing the required HELICS APIs that need to be incorporated.
7 | - `*_cosim_complete.py` - Completed working version of the corresponding `*_cosim_incomplete.py` files
8 | - `*_cosim_complete_pythonic.py` - Same as `*_cosim_complete.py` but using the HELICS Pythonic APIs
--------------------------------------------------------------------------------
/c/nonlings/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | # Copyright (c) 2017-2019, Battelle Memorial Institute; Lawrence Livermore
3 | # National Security, LLC; Alliance for Sustainable Energy, LLC.
4 | # See the top-level NOTICE for additional details.
5 | # All rights reserved.
6 | #
7 | # SPDX-License-Identifier: BSD-3-Clause
8 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 |
10 | cmake_minimum_required(VERSION 3.4)
11 |
12 | project(nonlings-c C)
13 |
14 | find_package(HELICS 2 REQUIRED)
15 |
16 | add_executable(nonlings_fed1-c nonlings_fed1.c)
17 | target_link_libraries(nonlings_fed1-c HELICS::helicsSharedLib)
18 |
19 | add_executable(nonlings_fed2-c nonlings_fed2.c)
20 | target_link_libraries(nonlings_fed2-c HELICS::helicsSharedLib)
21 |
22 | set_target_properties(nonlings_fed1-c nonlings_fed2-c PROPERTIES FOLDER c/nonlings)
23 |
--------------------------------------------------------------------------------
/cpp/comboFederate1/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | # Copyright (c) 2017-2019, Battelle Memorial Institute; Lawrence Livermore
3 | # National Security, LLC; Alliance for Sustainable Energy, LLC.
4 | # See the top-level NOTICE for additional details.
5 | # All rights reserved.
6 | #
7 | # SPDX-License-Identifier: BSD-3-Clause
8 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 |
10 | cmake_minimum_required(VERSION 3.4)
11 |
12 | project(comboFederate1-cpp)
13 |
14 | if(NOT CMAKE_CXX_STANDARD)
15 | set(CMAKE_CXX_STANDARD 14)
16 | endif()
17 |
18 | find_package(HELICS 2 REQUIRED)
19 |
20 | add_executable(comboFed-cpp comboFed.cpp)
21 | target_link_libraries(comboFed-cpp HELICS::helics-apps-shared)
22 |
23 | set_property(TARGET comboFed-cpp PROPERTY CXX_STANDARD 14)
24 | set_target_properties(comboFed-cpp PROPERTIES FOLDER cpp/federates)
25 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_default_pythonic/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide Advanced Topics - Base Example Using Pythonic API
2 |
3 | This example is the base example for many of the other examples covered in the Advanced Topics portion of the HELICS User Guide. It has been implemented using the Pythonic HELICS API instead of the [C-based API](https://github.com/GMLC-TDC/HELICS-Examples/tree/main/user_guide_examples/advanced/advanced_default). The example implements an EV charging co-simulation with value, message, and combination federates. A full description of the example can be found in the [HELICS User Guide](https://docs.helics.org/en/latest/user-guide/examples/advanced_examples/advanced_default.html).
4 |
5 | This example does not change the federate configuration JSONs or the runner JSON. It only changes (where possible) the HELICS API calls to use the Pythonic, class-oriented implementation rather than the C-based function implementation.
--------------------------------------------------------------------------------
/c/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2017-2018, Battelle Memorial Institute; Lawrence Livermore National
3 | # Security, LLC; Alliance for Sustainable Energy, LLC All rights reserved. See LICENSE
4 | # file and DISCLAIMER for more details.
5 | #
6 |
7 | cmake_minimum_required(VERSION 3.4)
8 | cmake_policy(VERSION 3.4)
9 |
10 | project (HELICS-C-EXAMPLES VERSION 2.1.0)
11 |
12 |
13 | get_directory_property(hasParent PARENT_DIRECTORY)
14 | if(NOT hasParent)
15 | set_property(GLOBAL PROPERTY USE_FOLDERS ON)
16 | include(GNUInstallDirs)
17 | endif()
18 |
19 | # -----------------------------------------------------------------------------
20 | # CMAKE Subdirectories
21 | # -----------------------------------------------------------------------------
22 |
23 | add_subdirectory(comboFederate1)
24 | add_subdirectory(hello_world)
25 | add_subdirectory(nonlings)
26 |
27 | add_subdirectory(messageFederate1)
28 | add_subdirectory(pi-exchange)
29 |
--------------------------------------------------------------------------------
/cpp/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2017-2018, Battelle Memorial Institute; Lawrence Livermore National
3 | # Security, LLC; Alliance for Sustainable Energy, LLC All rights reserved. See LICENSE
4 | # file and DISCLAIMER for more details.
5 | #
6 |
7 | cmake_minimum_required(VERSION 3.4)
8 | cmake_policy(VERSION 3.4)
9 |
10 | project (HELICS-CPP-EXAMPLES VERSION 2.1.0)
11 |
12 | get_directory_property(hasParent PARENT_DIRECTORY)
13 | if(NOT hasParent)
14 | set_property(GLOBAL PROPERTY USE_FOLDERS ON)
15 | include(GNUInstallDirs)
16 | endif()
17 |
18 | # -----------------------------------------------------------------------------
19 | # CMAKE Subdirectories
20 | # -----------------------------------------------------------------------------
21 |
22 | add_subdirectory(comboFederate1)
23 | add_subdirectory(filterFederate1)
24 | add_subdirectory(ipcTest)
25 |
26 | add_subdirectory(messageFederate1)
27 | add_subdirectory(valueFederate1)
28 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/filter_clone/clone_runner_next_time.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fundamental_filter_clone",
3 | "federates": [
4 | {
5 | "directory": ".",
6 | "exec": "helics_broker -f 4 --loglevel=warning",
7 | "host": "localhost",
8 | "name": "broker"
9 | },
10 | {
11 | "directory": ".",
12 | "exec": "python -u Charger.py",
13 | "host": "localhost",
14 | "name": "Charger"
15 | },
16 | {
17 | "directory": ".",
18 | "exec": "python -u Battery.py",
19 | "host": "localhost",
20 | "name": "Battery"
21 | },
22 | {
23 | "directory": ".",
24 | "exec": "python -u Controller.py",
25 | "host": "localhost",
26 | "name": "Controller"
27 | },
28 | {
29 | "directory": ".",
30 | "exec": "python -u Logger.py",
31 | "host": "localhost",
32 | "name": "Logger"
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/endpoints/ChargerConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Charger",
3 | "log_level": "warning",
4 | "core_type": "zmq",
5 | "period": 60,
6 | "uninterruptible": false,
7 | "terminate_on_error": true,
8 | "endpoints":[
9 | {
10 | "key":"Charger/EV1_voltage",
11 | "destination":"Battery/EV1_current",
12 | "global": true
13 | },
14 | {
15 | "key":"Charger/EV2_voltage",
16 | "destination":"Battery/EV2_current",
17 | "global": true
18 | },
19 | {
20 | "key":"Charger/EV3_voltage",
21 | "destination":"Battery/EV3_current",
22 | "global": true
23 | },
24 | {
25 | "key":"Charger/EV4_voltage",
26 | "destination":"Battery/EV4_current",
27 | "global": true
28 | },
29 | {
30 | "key":"Charger/EV5_voltage",
31 | "destination":"Battery/EV5_current",
32 | "global": true
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_dynamic_federation/dynamic_federation_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "advanced_default",
3 | "broker": false,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "helics_broker -f3 --dynamic",
8 | "host": "localhost",
9 | "name": "broker"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u Charger.py",
14 | "host": "localhost",
15 | "name": "Charger"
16 | },
17 | {
18 | "directory": ".",
19 | "exec": "python -u Controller.py",
20 | "host": "localhost",
21 | "name": "Controller"
22 | },
23 | {
24 | "directory": ".",
25 | "exec": "python -u BatteryLate.py",
26 | "host": "localhost",
27 | "name": "Battery"
28 | },
29 | {
30 | "directory": ".",
31 | "exec": "python -u BatteryLate.py --late",
32 | "host": "localhost",
33 | "name": "BatteryLate"
34 | }
35 | ]
36 | }
37 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/filter_clone/clone_runner_max_time.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fundamental_filter_clone",
3 | "federates": [
4 | {
5 | "directory": ".",
6 | "exec": "helics_broker -f 4 --loglevel=warning",
7 | "host": "localhost",
8 | "name": "broker"
9 | },
10 | {
11 | "directory": ".",
12 | "exec": "python -u Charger.py",
13 | "host": "localhost",
14 | "name": "Charger"
15 | },
16 | {
17 | "directory": ".",
18 | "exec": "python -u Battery.py",
19 | "host": "localhost",
20 | "name": "Battery"
21 | },
22 | {
23 | "directory": ".",
24 | "exec": "python -u Controller.py --max_time",
25 | "host": "localhost",
26 | "name": "Controller"
27 | },
28 | {
29 | "directory": ".",
30 | "exec": "python -u Logger.py --max_time",
31 | "host": "localhost",
32 | "name": "Logger"
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/c/hello_world/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | # Copyright (c) 2017-2019, Battelle Memorial Institute; Lawrence Livermore
3 | # National Security, LLC; Alliance for Sustainable Energy, LLC.
4 | # See the top-level NOTICE for additional details.
5 | # All rights reserved.
6 | #
7 | # SPDX-License-Identifier: BSD-3-Clause
8 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 |
10 | cmake_minimum_required(VERSION 3.4)
11 |
12 | project(hello_world-c C)
13 |
14 | find_package(HELICS 2 REQUIRED)
15 |
16 | add_executable(hello_world_receiver-c hello_world_receiver.c)
17 | target_link_libraries(hello_world_receiver-c HELICS::helicsSharedLib)
18 |
19 | add_executable(hello_world_sender-c hello_world_sender.c)
20 | target_link_libraries(hello_world_sender-c HELICS::helicsSharedLib)
21 |
22 | set_target_properties(hello_world_sender-c hello_world_receiver-c PROPERTIES FOLDER c/hello_world)
23 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_default_matlab/get_new_EV.m:
--------------------------------------------------------------------------------
1 | function [numLvl1,numLvl2,numLvl3,listOfEVs] = get_new_EV(numEVs)
2 | %{
3 | Using hard-coded probabilities, a distribution of EVs with support
4 | for specific charging levels are generated. The number of EVs
5 | generated is defined by the user.
6 |
7 | :param numEVs: Number of EVs
8 | :return
9 | numLvL1: Number of new EVs that will charge at level 1
10 | numLvL2: Number of new EVs that will charge at level 2
11 | numLvL3: Number of new EVs that will charge at level 3
12 | listOfEVs: List of all EVs (and their charging levels) generated
13 |
14 | %}
15 |
16 | % Probabilities of a new EV charging at the specified level.
17 | lvl1 = 0.05;
18 | lvl2 = 0.6;
19 | lvl3 = 0.35;
20 | listOfEVs = randsample([1,2,3],numEVs,true,[lvl1,lvl2,lvl3]);
21 | numLvl1 = sum(listOfEVs == 1);
22 | numLvl2 = sum(listOfEVs == 2);
23 | numLvl3 = sum(listOfEVs == 3);
24 |
25 | end
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_message_comm/query/BatteryConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Battery",
3 | "log_level": "warning",
4 | "core_type": "zmq",
5 | "period": 60,
6 | "uninterruptible": false,
7 | "terminate_on_error": true,
8 | "wait_for_current_time_update": true,
9 | "publications":[
10 | {
11 | "key":"Battery/EV1_current",
12 | "type":"double",
13 | "unit":"A",
14 | "global": true
15 | },
16 | {
17 | "key":"Battery/EV2_current",
18 | "type":"double",
19 | "unit":"A",
20 | "global": true
21 | },
22 | {
23 | "key":"Battery/EV3_current",
24 | "type":"double",
25 | "unit":"A",
26 | "global": true
27 | },
28 | {
29 | "key":"Battery/EV4_current",
30 | "type":"double",
31 | "unit":"A",
32 | "global": true
33 | },
34 | {
35 | "key":"Battery/EV5_current",
36 | "type":"double",
37 | "unit":"A",
38 | "global": true
39 | }
40 | ]
41 | }
42 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/endpoints/BatteryConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Battery",
3 | "log_level": "warning",
4 | "core_type": "zmq",
5 | "period": 60,
6 | "offset": 10,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "wait_for_current_time_update": true,
10 | "endpoints":[
11 | {
12 | "key":"Battery/EV1_current",
13 | "destination":"Charger/EV1_voltage",
14 | "global": true
15 | },
16 | {
17 | "key":"Battery/EV2_current",
18 | "destination":"Charger/EV2_voltage",
19 | "global": true
20 | },
21 | {
22 | "key":"Battery/EV3_current",
23 | "destination":"Charger/EV3_voltage",
24 | "global": true
25 | },
26 | {
27 | "key":"Battery/EV4_current",
28 | "destination":"Charger/EV4_voltage",
29 | "global": true
30 | },
31 | {
32 | "key":"Battery/EV5_current",
33 | "destination":"Charger/EV5_voltage",
34 | "global": true
35 | }
36 | ]
37 | }
38 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/filter_federate/FilterConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Filter",
3 | "core_name": "filter_core",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "uninterruptible": false,
7 | "terminate_on_error": false,
8 | "force_logging_flush": true,
9 | "event_triggered": true,
10 | "endpoints": [
11 | {
12 | "name": "filter/main",
13 | "global": true
14 | }
15 | ],
16 | "filters": [
17 | {
18 | "name": "filterFed",
19 | "sourcetargets": [
20 | "Charger/EV1.soc",
21 | "Charger/EV2.soc",
22 | "Charger/EV3.soc",
23 | "Charger/EV4.soc",
24 | "Charger/EV5.soc",
25 | "Controller/ep"
26 | ],
27 | "operation": "reroute",
28 | "properties": {
29 | "name": "newdestination",
30 | "value": "filter/main"
31 | }
32 | }
33 | ]
34 | }
35 |
--------------------------------------------------------------------------------
/cpp/messageFederate1/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | # Copyright (c) 2017-2019, Battelle Memorial Institute; Lawrence Livermore
3 | # National Security, LLC; Alliance for Sustainable Energy, LLC.
4 | # See the top-level NOTICE for additional details.
5 | # All rights reserved.
6 | #
7 | # SPDX-License-Identifier: BSD-3-Clause
8 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 |
10 | cmake_minimum_required(VERSION 3.4)
11 |
12 | project(messageFederate1-cpp)
13 |
14 | if(NOT CMAKE_CXX_STANDARD)
15 | set(CMAKE_CXX_STANDARD 14)
16 | endif()
17 |
18 | find_package(HELICS 2 REQUIRED)
19 |
20 | add_executable(messageFed-cpp messageFed.cpp)
21 | target_link_libraries(messageFed-cpp HELICS::helics-apps-shared)
22 |
23 | add_executable(messageFedObj-cpp messageFedObj.cpp)
24 | target_link_libraries(messageFedObj-cpp HELICS::helics-apps-shared)
25 |
26 | set_target_properties(messageFed-cpp messageFedObj-cpp PROPERTIES FOLDER cpp/federates)
27 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_default_matlab/destroy_federate.m:
--------------------------------------------------------------------------------
1 | function destroy_federate(fed, fid)
2 | %{
3 | As part of ending a HELICS co-simulation it is good housekeeping to
4 | formally destroy a federate. Doing so informs the rest of the
5 | federation that it is no longer a part of the co-simulation and they
6 | should proceed without it (if applicable). Generally this is done
7 | when the co-simulation is complete and all federates end execution
8 | at more or less the same wall-clock time.
9 |
10 | :param fed: Federate to be destroyed
11 | :return: (none)
12 | %}
13 |
14 | % Adding extra time request to clear out any pending messages to avoid
15 | % annoying errors in the broker log. Any message are tacitly disregarded.
16 | grantedtime = helics.helicsFederateRequestTime(fed, getHelicsMaxTime());
17 | helics.helicsFederateDisconnect(fed);
18 | helics.helicsFederateFree(fed);
19 | helics.helicsCloseLibrary();
20 | fprintf(fid, 'Federate finalized\n');
21 | end
--------------------------------------------------------------------------------
/cpp98/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | # Copyright (c) 2017-2019, Battelle Memorial Institute; Lawrence Livermore
3 | # National Security, LLC; Alliance for Sustainable Energy, LLC.
4 | # See the top-level NOTICE for additional details.
5 | # All rights reserved.
6 | #
7 | # SPDX-License-Identifier: BSD-3-Clause
8 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 |
10 | cmake_minimum_required(VERSION 3.4)
11 | cmake_policy(VERSION 3.4)
12 |
13 | project (HELICS_CPP_EXAMPLES VERSION 2.1.0)
14 |
15 |
16 | get_directory_property(hasParent PARENT_DIRECTORY)
17 | if(NOT hasParent)
18 | set_property(GLOBAL PROPERTY USE_FOLDERS ON)
19 | include(GNUInstallDirs)
20 | endif()
21 |
22 | # -----------------------------------------------------------------------------
23 | # CMAKE Subdirectories
24 | # -----------------------------------------------------------------------------
25 |
26 | add_subdirectory(nonlings)
27 | add_subdirectory(pi-exchange)
28 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: bug
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 | what is the current behavior
13 |
14 | **What is the expected behavior?**
15 | What is the motivation / use case for changing the behavior?
16 |
17 | **To Reproduce**
18 | Steps to reproduce the behavior:
19 | Please provide a minimal working example of the bug if possible.
20 |
21 | **Environment (please complete the following information):**
22 | - Operating System: [all | Windows | Mac | Linux]
23 | - Language Extension: [all | Python | MATLAB | Java | Octave| C | C++]
24 | - what compiler or setup process did you use
25 | - HELICS version:
26 | ```
27 | $ helics_app --version
28 | ```
29 |
30 | **Additional context and information**
31 | (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
32 |
--------------------------------------------------------------------------------
/cpp/ipcTest/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | # Copyright (c) 2017-2019, Battelle Memorial Institute; Lawrence Livermore
3 | # National Security, LLC; Alliance for Sustainable Energy, LLC.
4 | # See the top-level NOTICE for additional details.
5 | # All rights reserved.
6 | #
7 | # SPDX-License-Identifier: BSD-3-Clause
8 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 |
10 | cmake_minimum_required(VERSION 3.4)
11 |
12 | project(ipcTest-cpp)
13 |
14 | if(NOT CMAKE_CXX_STANDARD)
15 | set(CMAKE_CXX_STANDARD 14)
16 | endif()
17 |
18 | find_package(HELICS 2 REQUIRED)
19 | find_package(Threads REQUIRED)
20 |
21 | add_executable(ipcTest1-cpp ipcTest1.cpp common.hpp)
22 | target_link_libraries(ipcTest1-cpp HELICS::helics-shared Threads::Threads)
23 |
24 | add_executable(ipcTest2-cpp ipcTest2.cpp common.hpp)
25 | target_link_libraries(ipcTest2-cpp HELICS::helics-shared Threads::Threads)
26 |
27 | set_target_properties(ipcTest1-cpp ipcTest2-cpp PROPERTIES FOLDER cpp/ipc)
28 |
--------------------------------------------------------------------------------
/cpp98/nonlings/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | # Copyright (c) 2017-2019, Battelle Memorial Institute; Lawrence Livermore
3 | # National Security, LLC; Alliance for Sustainable Energy, LLC.
4 | # See the top-level NOTICE for additional details.
5 | # All rights reserved.
6 | #
7 | # SPDX-License-Identifier: BSD-3-Clause
8 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 |
10 | cmake_minimum_required(VERSION 3.4)
11 |
12 | project(nonlings-cpp98 CXX)
13 |
14 | find_package(HELICS 2 REQUIRED)
15 |
16 | add_executable(nonlings_fed1-cpp nonlings_fed1.cpp)
17 | target_link_libraries(nonlings_fed1-cpp HELICS::helicsCpp98)
18 |
19 | add_executable(nonlings_fed2-cpp nonlings_fed2.cpp)
20 | target_link_libraries(nonlings_fed2-cpp HELICS::helicsCpp98)
21 |
22 | set_property(TARGET nonlings_fed1-cpp PROPERTY CXX_STANDARD 98)
23 | set_property(TARGET nonlings_fed2-cpp PROPERTY CXX_STANDARD 98)
24 |
25 | set_target_properties(nonlings_fed1-cpp nonlings_fed2-cpp PROPERTIES FOLDER cpp98)
26 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/simple/ev_uq_example.yaml:
--------------------------------------------------------------------------------
1 |
2 | description:
3 | name: UQ EV Study
4 | description: UQ toy attempts to identify the joint distribution of EVs, without direct knowledge of which type of EV will request to be connected.
5 |
6 | env:
7 | variables:
8 | OUTPUT_PATH: ./UQ_EV_Study
9 | N_SAMPLES: 10
10 |
11 | merlin:
12 | samples:
13 | generate:
14 | cmd: |
15 | python3 $(SPECROOT)/make_samples.py $(N_SAMPLES) $(MERLIN_INFO)
16 | cp $(SPECROOT)/Battery.py $(MERLIN_INFO)
17 | cp $(SPECROOT)/Charger.py $(MERLIN_INFO)
18 | file: $(MERLIN_INFO)/samples.csv
19 | column_labels: [FED]
20 |
21 |
22 | study:
23 | - name: start_parallel_sims
24 | description: Run a bunch of UQ sims in parallel
25 | run:
26 | cmd: |
27 | spack load helics
28 | helics run --path=$(MERLIN_INFO)/$(FED)
29 | echo "DONE"
30 | - name: cleanup
31 | description: Clean up
32 | run:
33 | cmd: rm $(MERLIN_INFO)/samples.csv
34 | depends: [start_parallel_sims_*]
35 |
--------------------------------------------------------------------------------
/c/pi-exchange/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | # Copyright (c) 2017-2019, Battelle Memorial Institute; Lawrence Livermore
3 | # National Security, LLC; Alliance for Sustainable Energy, LLC.
4 | # See the top-level NOTICE for additional details.
5 | # All rights reserved.
6 | #
7 | # SPDX-License-Identifier: BSD-3-Clause
8 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 |
10 | cmake_minimum_required(VERSION 3.4)
11 |
12 | project(pi_exchange-c C)
13 |
14 | find_package(HELICS 2 REQUIRED)
15 |
16 | add_executable(pi_receiver-c pi_receiver.c)
17 | target_link_libraries(pi_receiver-c HELICS::helicsSharedLib)
18 |
19 | add_executable(pi_sender-c pi_sender.c)
20 | target_link_libraries(pi_sender-c HELICS::helicsSharedLib)
21 |
22 | add_executable(pi_receiver2-c pi_receiver2.c)
23 | target_link_libraries(pi_receiver2-c HELICS::helicsSharedLib)
24 |
25 | add_executable(pi_sender2-c pi_sender2.c)
26 | target_link_libraries(pi_sender2-c HELICS::helicsSharedLib)
27 |
28 | set_target_properties(pi_receiver-c pi_receiver2-c pi_sender-c pi_sender2-c PROPERTIES FOLDER c/pi_exchange)
29 |
--------------------------------------------------------------------------------
/user_guide_examples/misc/gridlabd_example_1/1a_IEEE_123_feeder.json:
--------------------------------------------------------------------------------
1 | {
2 | "coreInit": "--federates=1",
3 | "coreName": "Distribution Federate",
4 | "coreType": "zmq",
5 | "name": "DistributionSim",
6 | "offset": 0.0,
7 | "period": 60,
8 | "timeDelta": 1.0,
9 | "logfile": "output.log",
10 | "log_level": "warning",
11 | "publications" : [
12 | {
13 | "global" : true,
14 | "key" : "IEEE_123_feeder_0/totalLoad",
15 | "type" : "complex",
16 | "unit" : "VA",
17 | "info" : {
18 | "object" : "network_node",
19 | "property" : "distribution_load"
20 | }
21 | }
22 | ],
23 | "subscriptions" : [
24 | {
25 | "required": true,
26 | "key" : "TransmissionSim/transmission_voltage",
27 | "type" : "complex",
28 | "unit" : "V",
29 | "info" : {
30 | "object" : "network_node",
31 | "property" : "positive_sequence_voltage"
32 | }
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_message_comm/multi_input/BatteryConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Battery",
3 | "log_level": "warning",
4 | "core_type": "zmq",
5 | "period": 60,
6 | "uninterruptible": false,
7 | "terminate_on_error": true,
8 | "wait_for_current_time_update": true,
9 | "publications":[
10 | {
11 | "key":"Battery/EV1_current",
12 | "type":"double",
13 | "unit":"A",
14 | "global": true
15 | },
16 | {
17 | "key":"Battery/EV2_current",
18 | "type":"double",
19 | "unit":"A",
20 | "global": true
21 | },
22 | {
23 | "key":"Battery/EV3_current",
24 | "type":"double",
25 | "unit":"A",
26 | "global": true
27 | },
28 | {
29 | "key":"Battery/EV4_current",
30 | "type":"double",
31 | "unit":"A",
32 | "global": true
33 | },
34 | {
35 | "key":"Battery/EV5_current",
36 | "type":"double",
37 | "unit":"A",
38 | "global": true
39 | }
40 | ],
41 | "subscriptions":[
42 | {
43 | "key":"Charger/EV_voltage",
44 | "type":"double",
45 | "unit":"V",
46 | "global": true
47 | }
48 | ]
49 | }
50 |
--------------------------------------------------------------------------------
/unmaintained/python/fundamental_timing/timing_runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fundamental timing",
3 | "broker": true,
4 | "federates": [
5 | {
6 | "directory": ".",
7 | "exec": "python -u timing_fed.py --fednum 1",
8 | "host": "localhost",
9 | "name": "fed1"
10 | },
11 | {
12 | "directory": ".",
13 | "exec": "python -u timing_fed.py --fednum 2",
14 | "host": "localhost",
15 | "name": "fed2"
16 | },
17 | {
18 | "directory": ".",
19 | "exec": "python -u timing_fed.py --fednum 3",
20 | "host": "localhost",
21 | "name": "fed3"
22 | },
23 | {
24 | "directory": ".",
25 | "exec": "python -u timing_fed.py --fednum 4",
26 | "host": "localhost",
27 | "name": "fed4"
28 | },
29 | {
30 | "directory": ".",
31 | "exec": "python -u timing_fed.py --fednum 5",
32 | "host": "localhost",
33 | "name": "fed5"
34 | },
35 | {
36 | "directory": ".",
37 | "exec": "python -u timing_fed.py --fednum 6",
38 | "host": "localhost",
39 | "name": "fed6"
40 | }
41 | ]
42 | }
43 |
--------------------------------------------------------------------------------
/Dockerfiles/helics/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu:18.04 as builder
2 |
3 | RUN apt update && apt install -y \
4 | libboost-dev \
5 | libboost-test-dev \
6 | libzmq3-dev python3-dev \
7 | build-essential swig cmake git
8 |
9 | WORKDIR /root/develop
10 |
11 | RUN git clone --single-branch -b v2.1.0 https://github.com/GMLC-TDC/HELICS.git helics
12 |
13 | WORKDIR /root/develop/helics/build
14 |
15 | RUN cmake \
16 | -DBUILD_PYTHON_INTERFACE=ON \
17 | -DBUILD_CXX_SHARED_LIB=ON \
18 | -DPYTHON_INCLUDE_DIR=/usr/include/python3.6/ \
19 | -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so \
20 | -DCMAKE_INSTALL_PREFIX=/helics \
21 | ..
22 | RUN make -j8 install
23 |
24 | FROM ubuntu:18.04
25 |
26 | RUN apt update && apt install -y --no-install-recommends \
27 | libboost-test1.65.1 libzmq5 \
28 | iproute2 net-tools
29 |
30 | COPY --from=builder /helics /usr/local/
31 |
32 | ENV PYTHONPATH /usr/local/python
33 |
34 | # Python must be installed after the PYTHONPATH is set above for it to
35 | # recognize and import libhelicsSharedLib.so.
36 | RUN apt install -y --no-install-recommends python3-dev \
37 | && rm -rf /var/lib/apt/lists/*
38 |
39 | CMD ["python3", "-c", "import helics; print(helics.helicsGetVersion())"]
40 |
--------------------------------------------------------------------------------
/.ci/report-results.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | case ${PR_STATUS_REPORT} in
3 | *Succeeded*)
4 | BUILD_MESSAGE=":tada: **HELICS-Examples** integration test passed: [[build log]](https://dev.azure.com/HELICS-test/HELICS-Examples/_build/results?buildId=${BUILD_BUILDID}) [[commit]](https://github.com/GMLC-TDC/HELICS/commit/${HELICS_COMMITISH})"
5 | ;;
6 | *Failed*)
7 | BUILD_MESSAGE=":confused: **HELICS-Examples** integration test had some problems: [[build log]](https://dev.azure.com/HELICS-test/HELICS-Examples/_build/results?buildId=${BUILD_BUILDID}) [[commit]](https://github.com/GMLC-TDC/HELICS/commit/${HELICS_COMMITISH})"
8 | ;;
9 | esac
10 |
11 | # Report build status to PR
12 | if [[ "${BUILD_MESSAGE}" != "" ]]; then
13 | echo "Reporting build status $PR_STATUS_REPORT to github.com/${HELICS_PR_SLUG}/issues/${HELICS_PR_NUM}"
14 | body='{"body": "'${BUILD_MESSAGE}'"}'
15 | curl -s -X POST \
16 | -H "User-Agent: HELICS-bot" \
17 | -H "Content-Type: application/json" \
18 | -H "Accept: application/json" \
19 | -H "Authorization: token ${HELICSBOT_GH_TOKEN}" \
20 | -d "$body" \
21 | https://api.github.com/repos/${HELICS_PR_SLUG}/issues/${HELICS_PR_NUM}/comments
22 | fi
23 |
--------------------------------------------------------------------------------
/unmaintained/python/Manager_Worker_Example/federate.py:
--------------------------------------------------------------------------------
1 | import helics as h
2 |
3 | class Federate:
4 | """ Federate Class """
5 | def __init__(self, core_type = "zmq", time_delta = 1):
6 | self.__fedinfo = h.helicsCreateFederateInfo()
7 | h.helicsFederateInfoSetCoreName(self.__fedinfo, "")
8 | h.helicsFederateInfoSetCoreTypeFromString(self.__fedinfo, core_type)
9 | h.helicsFederateInfoSetCoreInitString(self.__fedinfo, "--federates=1")
10 | h.helicsFederateInfoSetTimeProperty(self.__fedinfo, h.helics_property_time_delta, time_delta)
11 | self.vfed = ""
12 | self.pub = []
13 | self.sub = []
14 |
15 | def create_federate(self, fed_name):
16 | self.vfed = h.helicsCreateCombinationFederate(str(fed_name), self.__fedinfo)
17 |
18 | def publish(self, name, data_type):
19 | self.pub.append(h.helicsFederateRegisterGlobalTypePublication(self.vfed, name, data_type, ""))
20 |
21 | def subscribe(self, target):
22 | self.sub.append(h.helicsFederateRegisterSubscription(self.vfed, target, ""))
23 |
24 | def destroy(self):
25 | h.helicsFederateDisconnect(self.vfed)
26 | h.helicsFederateFree(self.vfed)
27 | # print("Federate: Federate finalized")
28 |
29 | def start_async(self):
30 | h.helicsFederateEnterExecutingModeAsync(self.vfed)
31 | def start(self):
32 | h.helicsFederateEnterExecutingMode(self.vfed)
33 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_default_matlab/estimate_SOC.m:
--------------------------------------------------------------------------------
1 | function SOC_estimate = estimate_SOC(charging_V, charging_A)
2 | %{
3 | The charger has no direct knowledge of the SOC of the EV battery it
4 | is charging but instead must estimate it based on the effective resistance
5 | of the battery which is calculated from the applied charging voltage and
6 | measured charging current. The effective resistance model is used here is
7 | identical to that of the actual battery; if both the charging voltage
8 | and current were measured perfectly the SOC estimate here would exactly
9 | match the true SOC modeled by the battery. For fun, though, a small
10 | amount of Gaussian noise is added to the current value. This noise
11 | creates larger errors as the charging current goes down (EV battery
12 | reaching full SOC).
13 |
14 | :param charging_V: Applied charging voltage
15 | :param charging_A: Charging current as passed back by the battery federate
16 | :return: SOC estimate
17 | %}
18 |
19 | socs = [0, 1];
20 | effective_R = [8, 150];
21 | mu = 0;
22 | sigma = 0.2;
23 | noise = mu + sigma*randn();
24 | measured_A = charging_A + noise;
25 | measured_R = charging_V / measured_A;
26 | SOC_estimate = interp1(effective_R, socs, measured_R);
27 |
28 | end
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_0.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_0"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 10 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_0"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_0"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_1.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_1"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 11 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_1"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_1"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_2.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_2"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 12 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_2"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_2"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_3.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_3"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 13 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_3"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_3"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_4.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_4"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 14 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_4"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_4"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_5.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_5"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 15 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_5"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_5"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_6.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_6"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 16 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_6"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_6"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_7.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_7"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 17 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_7"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_7"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_8.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_8"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 18 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_8"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_8"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_9.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_9"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 19 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_9"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_9"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_10.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_10"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 20 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_10"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_10"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_11.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_11"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 21 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_11"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_11"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_12.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_12"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 22 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_12"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_12"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_13.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_13"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 23 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_13"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_13"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_14.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_14"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 24 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_14"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_14"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_15.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_15"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 25 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_15"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_15"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_16.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_16"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 26 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_16"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_16"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_17.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_17"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 27 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_17"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_17"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_18.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_18"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 28 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_18"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_18"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_19.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_19"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 29 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_19"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_19"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_20.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_20"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 30 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_20"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_20"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_21.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_21"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 31 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_21"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_21"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_22.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_22"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 32 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_22"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_22"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_23.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_23"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 33 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_23"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_23"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_24.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_24"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 34 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_24"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_24"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_25.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_25"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 35 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_25"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_25"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_26.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_26"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 36 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_26"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_26"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_27.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_27"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 37 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_27"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_27"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_28.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_28"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 38 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_28"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_28"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_orchestration/cli_runner_scripts/advanced_orchestration_runner_29.json:
--------------------------------------------------------------------------------
1 | {
2 | "federates": [
3 | {
4 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
5 | "exec": "helics_broker --federates=2 --loglevel=data --coretype=tcpss --port 12345",
6 | "host": "localhost",
7 | "loglevel": "data",
8 | "name": "broker_29"
9 | },
10 | {
11 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
12 | "exec": "python3 Battery.py --port 12345 --seed 39 --numEVs 10 --hours 24 --plot 0 --outdir /Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration/results",
13 | "host": "localhost",
14 | "loglevel": "data",
15 | "name": "Battery_29"
16 | },
17 | {
18 | "directory": "/Users/camp426/github/HELICS-Examples/user_guide_examples/advanced/advanced_orchestration",
19 | "exec": "python3 Charger.py --port 12345 --numEVs 10 --hours 24",
20 | "host": "localhost",
21 | "loglevel": "data",
22 | "name": "Charger_29"
23 | }
24 | ],
25 | "name": "Generated by make samples"
26 | }
--------------------------------------------------------------------------------
/CONTRIBUTORS.md:
--------------------------------------------------------------------------------
1 | # Contributors
2 | This file describes the contributors to the HELICS-examples library and the software used as part of this project. It is part of the GMLC-TDC project and used in the HELICS project. HELICS is a joint project between PNNL, LLNL, and NREL, with contributions from many other national labs.
3 | If you would like to contribute to the HELICS-examples, HELICS, or any of the GMLC-TDC related repositories see [CONTRIBUTING](CONTRIBUTING.md)
4 | ## Individual contributors
5 | ### Pacific Northwest National Lab
6 | - Swetha Niddodi
7 |
8 | ### Lawrence Livermore National Lab
9 | - Ryan Mast
10 | - Philip Top
11 |
12 | ### National Renewable Energy Lab
13 | - Dheepak Krishnamurthy
14 | - Brian Palmentier
15 |
16 | ### Other
17 | - [Bryan Richardson](https://github.com/activeshadow) Active Shadow LLC
18 | - [Cody Rooks](https://github.com/rookscody) University of Tennessee (Knoxville)
19 |
20 | ## Used Libraries or Code
21 | ### [HELICS](https://github.com/GMLC-TDC/HELICS)
22 | Most of the original code for this repository was pulled from use inside HELICS. Several examples were initially included in the HELICS repo but were pulled out when this repo was created. HELICS is released with a BSD-3-Clause license.
23 |
24 | ### CLI11
25 | The `Native.` job names used on Azure Pipelines came from the [CLI11](https://github.com/CLIUtils/CLI11) CI setup.
26 |
--------------------------------------------------------------------------------
/unmaintained/example_files/example1.player:
--------------------------------------------------------------------------------
1 | #second topic value
2 | 0 FederateName/topic1 33.761151+5.064173j
3 | 1 FederateName/topic1 33.761151+5.064173j
4 | 2 FederateName/topic1 33.761151+5.064173j
5 | 3 FederateName/topic1 33.761151+5.064173j
6 | 4 FederateName/topic1 33.761151+5.064173j
7 | 5 FederateName/topic1 33.761151+5.064173j
8 | 6 FederateName/topic1 34.101985+5.115298j
9 | 7 FederateName/topic1 34.101985+5.115298j
10 | 8 FederateName/topic1 34.101985+5.115298j
11 | 9 FederateName/topic1 34.101985+5.115298j
12 | 10 FederateName/topic1 34.101985+5.115298j
13 | 11 FederateName/topic1 34.101985+5.115298j
14 | 12 FederateName/topic1 33.769734+5.065460j
15 | 13 FederateName/topic1 33.769734+5.065460j
16 | 14 FederateName/topic1 33.769734+5.065460j
17 | 15 FederateName/topic1 33.769734+5.065460j
18 | 16 FederateName/topic1 33.769734+5.065460j
19 | 17 FederateName/topic1 33.769734+5.065460j
20 | 18 FederateName/topic1 33.578150+5.036723j
21 | 19 FederateName/topic1 33.578150+5.036723j
22 | 20 FederateName/topic1 33.578150+5.036723j
23 | 21 FederateName/topic1 33.578150+5.036723j
24 | 22 FederateName/topic1 33.578150+5.036723j
25 | 23 FederateName/topic1 33.578150+5.036723j
26 |
27 |
--------------------------------------------------------------------------------
/cpp98/pi-exchange/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 | # Copyright (c) 2017-2019, Battelle Memorial Institute; Lawrence Livermore
3 | # National Security, LLC; Alliance for Sustainable Energy, LLC.
4 | # See the top-level NOTICE for additional details.
5 | # All rights reserved.
6 | #
7 | # SPDX-License-Identifier: BSD-3-Clause
8 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 |
10 | cmake_minimum_required(VERSION 3.4)
11 |
12 | project(pi_exchange-cpp CXX)
13 |
14 | find_package(HELICS 2 REQUIRED)
15 |
16 | add_executable(pi_receiver-cpp pi_receiver.cpp)
17 | target_link_libraries(pi_receiver-cpp HELICS::helicsCpp98)
18 |
19 | add_executable(pi_sender-cpp pi_sender.cpp)
20 | target_link_libraries(pi_sender-cpp HELICS::helicsCpp98)
21 |
22 | add_executable(pi_receiver2-cpp pi_receiver2.cpp)
23 | target_link_libraries(pi_receiver2-cpp HELICS::helicsCpp98)
24 |
25 | add_executable(pi_sender2-cpp pi_sender2.cpp)
26 | target_link_libraries(pi_sender2-cpp HELICS::helicsCpp98)
27 |
28 | set_target_properties(pi_receiver-cpp pi_receiver2-cpp pi_sender-cpp pi_sender2-cpp PROPERTIES FOLDER cpp98/pi_exchange)
29 |
30 | set_property(TARGET pi_receiver-cpp PROPERTY CXX_STANDARD 98)
31 | set_property(TARGET pi_receiver2-cpp PROPERTY CXX_STANDARD 98)
32 | set_property(TARGET pi_sender-cpp PROPERTY CXX_STANDARD 98)
33 | set_property(TARGET pi_sender2-cpp PROPERTY CXX_STANDARD 98)
34 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_dynamic_federation/BatteryConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Battery",
3 | "core_name": "battery_core",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "period": 60,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "wait_for_current_time_update": true,
10 | "publications":[
11 | {
12 | "key":"Battery/EV1_current",
13 | "type":"double",
14 | "unit":"A",
15 | "global": true
16 | },
17 | {
18 | "key":"Battery/EV2_current",
19 | "type":"double",
20 | "unit":"A",
21 | "global": true
22 | },
23 | {
24 | "key":"Battery/EV3_current",
25 | "type":"double",
26 | "unit":"A",
27 | "global": true
28 | },
29 | {
30 | "key":"Battery/EV4_current",
31 | "type":"double",
32 | "unit":"A",
33 | "global": true
34 | }
35 | ],
36 | "subscriptions":[
37 | {
38 | "key":"Charger/EV1_voltage",
39 | "type":"double",
40 | "unit":"V",
41 | "global": true
42 | },
43 | {
44 | "key":"Charger/EV2_voltage",
45 | "type":"double",
46 | "unit":"V",
47 | "global": true
48 | },
49 | {
50 | "key":"Charger/EV3_voltage",
51 | "type":"double",
52 | "unit":"V",
53 | "global": true
54 | },
55 | {
56 | "key":"Charger/EV4_voltage",
57 | "type":"double",
58 | "unit":"V",
59 | "global": true
60 | }
61 | ]
62 | }
63 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | dist: trusty
2 | language: cpp
3 |
4 | cache:
5 | ccache: true
6 | directories:
7 | - dependencies
8 |
9 | before_cache:
10 | - ${TRAVIS_BUILD_DIR}/scripts/cleanup-cmake.sh
11 |
12 | env:
13 | global:
14 | - MAKEFLAGS="-j 2"
15 |
16 | # Create aliases for some of shared build configuration
17 | _basic_env:
18 | - &daily_linux
19 | if: type != cron
20 | os: linux
21 | compiler: gcc
22 | addons:
23 | apt:
24 | sources:
25 | - ubuntu-toolchain-r-test
26 | packages:
27 | - g++-6
28 | - &linux_base
29 | if: type != cron
30 | os: linux
31 | compiler: gcc
32 | addons:
33 | apt:
34 | sources:
35 | - ubuntu-toolchain-r-test
36 | packages:
37 | - g++-6
38 |
39 | jobs:
40 | # On weekdays, the backlog for waiting OS X builds is huge
41 | fast_finish: true
42 | allow_failures:
43 | - os: osx
44 |
45 | include:
46 | - <<: *linux_base
47 | env:
48 | - MATRIX_EVAL="COMPILER=gcc && CC=gcc-6 && CXX=g++-6"
49 | - USE_SWIG=true
50 | - USE_MPI=mpich
51 | - BUILD_TYPE=Release
52 |
53 | branches:
54 | except:
55 | - gh-pages
56 |
57 | before_install:
58 | - eval "${MATRIX_EVAL}"
59 | - $CXX --version
60 |
61 | install:
62 | - source scripts/install-ci-dependencies.sh
63 | - source scripts/install-helics.sh
64 |
65 | script:
66 | - ls ${HELICS_INSTALL_PATH}/bin
67 | - helics_broker --version
68 |
69 | notifications:
70 | email: false
71 |
--------------------------------------------------------------------------------
/unmaintained/python/Manager_Worker_Example/manager.py:
--------------------------------------------------------------------------------
1 | from federate import Federate
2 | import helics as h
3 |
4 | def check_values_returned(n, a):
5 | arr = [False] * n
6 | check = False
7 | while not check:
8 | for i in range(n):
9 | if h.helicsInputIsUpdated(a.sub[i]) == 0:
10 | arr[i] = False
11 | else:
12 | arr[i] = True
13 | if False in arr:
14 | time = h.helicsFederateRequestTime(a.vfed, 0)
15 | check = False
16 | else:
17 | check = True
18 | return time
19 |
20 | helicsversion = h.helicsGetVersion()
21 | print("Manager: Helics version = {}".format(helicsversion))
22 |
23 | n = 5
24 |
25 | a = Federate()
26 | a.create_federate("Manager federate")
27 | a.publish("manager", "double")
28 |
29 | for i in range(n):
30 | a.subscribe(str("worker" + str(i)))
31 | a.start()
32 |
33 | print("Manager: Entering execution mode")
34 | currenttime = -1
35 | for time_s in range(11):
36 | currenttime = h.helicsFederateRequestTime(a.vfed, time_s)
37 | val = time_s + 1
38 | h.helicsPublicationPublishDouble(a.pub[0], val)
39 | print("Manager: Sending value =" ,val, "at time =", currenttime , " to Workers")
40 | print("Manager waiting for workers to send value back")
41 | currenttime = check_values_returned(n, a)
42 | for i in range(n):
43 | val = h.helicsInputGetDouble(a.sub[i])
44 | print("Manager: Received value =", val," at time =", currenttime, " from Worker", i)
45 | print("---------------------------------------------------------------------------")
46 | a.destroy()
47 | print("federates finalized")
48 | h.helicsCloseLibrary()
49 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_fmu/runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fundamental_default",
3 | "broker": true,
4 | "log_level": "interfaces",
5 | "federates": [
6 | {
7 | "directory": ".",
8 | "exec": "python -u Charger.py 1",
9 | "host": "localhost",
10 | "name": "Charger"
11 | },
12 | {
13 | "directory": ".",
14 | "exec": "helics-fmi --stoptime=604800s --step=60s --name=Battery1 --flags=no_free --set soc_init=0.31;E_rate=25 SimpleBattery.fmu",
15 | "host": "localhost",
16 | "name": "Battery1"
17 | },
18 | {
19 | "directory": ".",
20 | "exec": "helics-fmi --stoptime=604800s --step=60s --name=Battery2 --flags=no_free --set soc_init=0.24;E_rate=25 SimpleBattery.fmu",
21 | "host": "localhost",
22 | "name": "Battery2"
23 | },
24 | {
25 | "directory": ".",
26 | "exec": "helics-fmi --stoptime=604800s --step=60s --name=Battery3 --flags=no_free --set soc_init=0.52;E_rate=25 SimpleBattery.fmu",
27 | "host": "localhost",
28 | "name": "Battery3"
29 | },
30 | {
31 | "directory": ".",
32 | "exec": "helics-fmi --stoptime=604800s --step=60s --name=Battery4 --flags=no_free --set soc_init=0.57;E_rate=100 SimpleBattery.fmu",
33 | "host": "localhost",
34 | "name": "Battery4"
35 | },
36 | {
37 | "directory": ".",
38 | "exec": "helics-fmi --stoptime=604800s --step=60s --name=Battery5 --flags=no_free --set soc_init=0.48;E_rate=100 SimpleBattery.fmu",
39 | "host": "localhost",
40 | "name": "Battery5"
41 | }
42 | ]
43 | }
44 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/filter_clone/README.md:
--------------------------------------------------------------------------------
1 | # HELICS User Guide - Undocumented Cloning Filter Example
2 |
3 | This example is not documented in the HELICS User Guide as it was developed to test a bug found in the configuration of HELICS cloning filter (fixed in v3.6). The correct configuration was documented in the Configuration Options Reference but given the simplicity of the example, it didn't seem to warrant full documentation as part of the formal documentation. Nevertheless, it does serve as a useful example of the cloning filter in action and also exposes a timing bug that, as of v3.6, has not been fixed. Thus, this example is being preserved in HELICS-Examples repository in its undocumented state.
4 |
5 | To see the correct configuration of a cloning filter, look at "LoggerConfig.json".
6 |
7 | The timing bug demonstrated in this example is one that has haunted HELICS for several years. At times, when requesting HELICS_TIME_MAXTIME, HELICS will either not wake a federate when it receives incoming messages or publications or it will cause the federation to hang. This example has been constructed such that the Logger and Controller federate change their time request behavior based on the "--max_time" command-line flag. When set, they request HELICS_TIME_MAXTIME and when not set, they request the next second. Each time-request behavior has been implement in a separate runner file for ease of comparison. As of v3.6, expected behavior is that calling `helics run --path=clone_runner_next_time` will run to completion and and `helics run --path=clone_runner_max_time` will not.
--------------------------------------------------------------------------------
/unmaintained/python/fundamental_timing/timing_fed_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "1":{
3 | "subs": ["fed5pub", "fed6pub"],
4 | "execution time":{
5 | "0": 110,
6 | "10": 260,
7 | "20": 90
8 | },
9 | "max time request": false,
10 | "period": 10
11 | },
12 | "2":{
13 | "subs": ["fed1pub", "fed3pub"],
14 | "execution time":{
15 | "0": 80,
16 | "10": 100,
17 | "20": 70
18 | },
19 | "max time request": true,
20 | "period": 10
21 |
22 | },
23 | "3":{
24 | "subs": ["fed1pub"],
25 | "execution time":{
26 | "0": 140,
27 | "10": 150,
28 | "20": 200
29 | },
30 | "max time request": false,
31 | "period": 10
32 | },
33 | "4":{
34 | "subs": [],
35 | "execution time":{
36 | "0": 80,
37 | "10": 80,
38 | "20": 80
39 | },
40 | "max time request": false,
41 | "period": 10
42 | },
43 | "5":{
44 | "subs": [],
45 | "execution time":{
46 | "0": 80,
47 | "10": 330,
48 | "20": 120
49 | },
50 | "max time request": false,
51 | "period": 10
52 | },
53 | "6":{
54 | "subs": ["fed1pub", "fed3pub", "fed5pub"],
55 | "execution time":{
56 | "0": 60,
57 | "10": 170,
58 | "20": 60
59 | },
60 | "max time request": false,
61 | "period": 10
62 | }
63 | }
--------------------------------------------------------------------------------
/unmaintained/python/helics_message_size/long_message_sender.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | """
3 | Created on 19 Nove 2024
4 |
5 | Test federation to evaluate any message size limits of HELICS.
6 | This federate will send a message (string) of increasing size
7 | and the other federate will recieve it and check the size.
8 |
9 | The message size is 10000 times the size of the granted time.
10 |
11 |
12 | @author: Trevor Hardy
13 | trevor.hardy@pnnl.gov
14 | """
15 |
16 | import helics as h
17 | import logging
18 |
19 |
20 | logger = logging.getLogger(__name__)
21 | logger.addHandler(logging.StreamHandler())
22 | logger.setLevel(logging.DEBUG)
23 |
24 |
25 | if __name__ == "__main__":
26 | time_requests = [1, 10, 100, 1000, 10000, 100000, 1000000]
27 |
28 | fedinfo = h.helicsCreateFederateInfo()
29 | fedinfo.core_name = "long_message_sender_core"
30 | fedinfo.core_type = "zmq"
31 | fed = h.helicsCreateCombinationFederate("LongMessageSender", fedinfo)
32 | fed.register_global_endpoint("sender_ep")
33 | fed.property[h.HELICS_PROPERTY_TIME_PERIOD] = 0.0001
34 | fed.flag[h.HELICS_FLAG_WAIT_FOR_CURRENT_TIME_UPDATE] = False
35 |
36 | fed.enter_executing_mode()
37 |
38 | for time in time_requests:
39 | granted_time = fed.request_time(time)
40 | message_size = int(granted_time) * 1000
41 | send_string = 'x' * message_size
42 | fed.endpoints["sender_ep"].send_data(send_string, "receiver_ep")
43 | logger.info(f"Sent message of length {message_size}")
44 |
45 | h.helicsFederateDestroy(fed)
46 | h.helicsCloseLibrary()
47 |
48 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 3-Clause License
2 |
3 | Copyright (c) 2017-2019, Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable Energy, LLC.
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
11 |
12 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
13 |
14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_iteration/ChargerConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "core_name": "Charger",
3 | "core_type": "zmq",
4 | "log_level": "warning",
5 | "name": "Charger",
6 | "period": 60,
7 | "publications": [
8 | {
9 | "global": true,
10 | "key": "Charger/EV1_voltage",
11 | "type": "double",
12 | "unit": "V"
13 | },
14 | {
15 | "global": true,
16 | "key": "Charger/EV2_voltage",
17 | "type": "double",
18 | "unit": "V"
19 | },
20 | {
21 | "global": true,
22 | "key": "Charger/EV3_voltage",
23 | "type": "double",
24 | "unit": "V"
25 | },
26 | {
27 | "global": true,
28 | "key": "Charger/EV4_voltage",
29 | "type": "double",
30 | "unit": "V"
31 | },
32 | {
33 | "global": true,
34 | "key": "Charger/EV5_voltage",
35 | "type": "double",
36 | "unit": "V"
37 | }
38 | ],
39 | "subscriptions": [
40 | {
41 | "global": true,
42 | "key": "Battery/EV1_current",
43 | "type": "double",
44 | "unit": "A"
45 | },
46 | {
47 | "global": true,
48 | "key": "Battery/EV2_current",
49 | "type": "double",
50 | "unit": "A"
51 | },
52 | {
53 | "global": true,
54 | "key": "Battery/EV3_current",
55 | "type": "double",
56 | "unit": "A"
57 | },
58 | {
59 | "global": true,
60 | "key": "Battery/EV4_current",
61 | "type": "double",
62 | "unit": "A"
63 | },
64 | {
65 | "global": true,
66 | "key": "Battery/EV5_current",
67 | "type": "double",
68 | "unit": "A"
69 | }
70 | ],
71 | "terminate_on_error": true,
72 | "uninterruptible": true
73 | }
74 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/combo/BatteryConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Battery",
3 | "log_level": "warning",
4 | "core_type": "zmq",
5 | "period": 60,
6 | "uninterruptible": false,
7 | "terminate_on_error": true,
8 | "wait_for_current_time_update": true,
9 | "publications":[
10 | {
11 | "key":"Battery/EV1_current",
12 | "type":"double",
13 | "unit":"A",
14 | "global": true
15 | },
16 | {
17 | "key":"Battery/EV2_current",
18 | "type":"double",
19 | "unit":"A",
20 | "global": true
21 | },
22 | {
23 | "key":"Battery/EV3_current",
24 | "type":"double",
25 | "unit":"A",
26 | "global": true
27 | },
28 | {
29 | "key":"Battery/EV4_current",
30 | "type":"double",
31 | "unit":"A",
32 | "global": true
33 | },
34 | {
35 | "key":"Battery/EV5_current",
36 | "type":"double",
37 | "unit":"A",
38 | "global": true
39 | }
40 | ],
41 | "subscriptions":[
42 | {
43 | "key":"Charger/EV1_voltage",
44 | "type":"double",
45 | "unit":"V",
46 | "global": true
47 | },
48 | {
49 | "key":"Charger/EV2_voltage",
50 | "type":"double",
51 | "unit":"V",
52 | "global": true
53 | },
54 | {
55 | "key":"Charger/EV3_voltage",
56 | "type":"double",
57 | "unit":"V",
58 | "global": true
59 | },
60 | {
61 | "key":"Charger/EV4_voltage",
62 | "type":"double",
63 | "unit":"V",
64 | "global": true
65 | },
66 | {
67 | "key":"Charger/EV5_voltage",
68 | "type":"double",
69 | "unit":"V",
70 | "global": true
71 | }
72 | ]
73 | }
74 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_brokers/multi_computer/computer2/BatteryConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Battery",
3 | "log_level": "warning",
4 | "core_type": "zmq",
5 | "period": 60,
6 | "uninterruptible": false,
7 | "terminate_on_error": true,
8 | "wait_for_current_time_update": true,
9 | "publications":[
10 | {
11 | "key":"Battery/EV1_current",
12 | "type":"double",
13 | "unit":"A",
14 | "global": true
15 | },
16 | {
17 | "key":"Battery/EV2_current",
18 | "type":"double",
19 | "unit":"A",
20 | "global": true
21 | },
22 | {
23 | "key":"Battery/EV3_current",
24 | "type":"double",
25 | "unit":"A",
26 | "global": true
27 | },
28 | {
29 | "key":"Battery/EV4_current",
30 | "type":"double",
31 | "unit":"A",
32 | "global": true
33 | },
34 | {
35 | "key":"Battery/EV5_current",
36 | "type":"double",
37 | "unit":"A",
38 | "global": true
39 | }
40 | ],
41 | "subscriptions":[
42 | {
43 | "key":"Charger/EV1_voltage",
44 | "type":"double",
45 | "unit":"V",
46 | "global": true
47 | },
48 | {
49 | "key":"Charger/EV2_voltage",
50 | "type":"double",
51 | "unit":"V",
52 | "global": true
53 | },
54 | {
55 | "key":"Charger/EV3_voltage",
56 | "type":"double",
57 | "unit":"V",
58 | "global": true
59 | },
60 | {
61 | "key":"Charger/EV4_voltage",
62 | "type":"double",
63 | "unit":"V",
64 | "global": true
65 | },
66 | {
67 | "key":"Charger/EV5_voltage",
68 | "type":"double",
69 | "unit":"V",
70 | "global": true
71 | }
72 | ]
73 | }
74 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_default/ChargerConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "core_name": "Charger",
3 | "core_type": "zmq",
4 | "log_level": "warning",
5 | "name": "Charger",
6 | "period": 60,
7 | "publications": [
8 | {
9 | "global": true,
10 | "key": "Charger/EV1_voltage",
11 | "type": "double",
12 | "unit": "V"
13 | },
14 | {
15 | "global": true,
16 | "key": "Charger/EV2_voltage",
17 | "type": "double",
18 | "unit": "V"
19 | },
20 | {
21 | "global": true,
22 | "key": "Charger/EV3_voltage",
23 | "type": "double",
24 | "unit": "V"
25 | },
26 | {
27 | "global": true,
28 | "key": "Charger/EV4_voltage",
29 | "type": "double",
30 | "unit": "V"
31 | },
32 | {
33 | "global": true,
34 | "key": "Charger/EV5_voltage",
35 | "type": "double",
36 | "unit": "V"
37 | }
38 | ],
39 | "subscriptions": [
40 | {
41 | "global": true,
42 | "key": "Battery/EV1_current",
43 | "type": "double",
44 | "unit": "A"
45 | },
46 | {
47 | "global": true,
48 | "key": "Battery/EV2_current",
49 | "type": "double",
50 | "unit": "A"
51 | },
52 | {
53 | "global": true,
54 | "key": "Battery/EV3_current",
55 | "type": "double",
56 | "unit": "A"
57 | },
58 | {
59 | "global": true,
60 | "key": "Battery/EV4_current",
61 | "type": "double",
62 | "unit": "A"
63 | },
64 | {
65 | "global": true,
66 | "key": "Battery/EV5_current",
67 | "type": "double",
68 | "unit": "A"
69 | }
70 | ],
71 | "terminate_on_error": true,
72 | "uninterruptible": false
73 | }
74 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/filter_clone/BatteryConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Battery",
3 | "log_level": "warning",
4 | "core_type": "zmq",
5 | "period": 60,
6 | "uninterruptible": false,
7 | "terminate_on_error": true,
8 | "wait_for_current_time_update": true,
9 | "publications":[
10 | {
11 | "key":"Battery/EV1_current",
12 | "type":"double",
13 | "unit":"A",
14 | "global": true
15 | },
16 | {
17 | "key":"Battery/EV2_current",
18 | "type":"double",
19 | "unit":"A",
20 | "global": true
21 | },
22 | {
23 | "key":"Battery/EV3_current",
24 | "type":"double",
25 | "unit":"A",
26 | "global": true
27 | },
28 | {
29 | "key":"Battery/EV4_current",
30 | "type":"double",
31 | "unit":"A",
32 | "global": true
33 | },
34 | {
35 | "key":"Battery/EV5_current",
36 | "type":"double",
37 | "unit":"A",
38 | "global": true
39 | }
40 | ],
41 | "subscriptions":[
42 | {
43 | "key":"Charger/EV1_voltage",
44 | "type":"double",
45 | "unit":"V",
46 | "global": true
47 | },
48 | {
49 | "key":"Charger/EV2_voltage",
50 | "type":"double",
51 | "unit":"V",
52 | "global": true
53 | },
54 | {
55 | "key":"Charger/EV3_voltage",
56 | "type":"double",
57 | "unit":"V",
58 | "global": true
59 | },
60 | {
61 | "key":"Charger/EV4_voltage",
62 | "type":"double",
63 | "unit":"V",
64 | "global": true
65 | },
66 | {
67 | "key":"Charger/EV5_voltage",
68 | "type":"double",
69 | "unit":"V",
70 | "global": true
71 | }
72 | ]
73 | }
74 |
--------------------------------------------------------------------------------
/user_guide_examples/fundamental/fundamental_message_comm/filter_native/BatteryConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Battery",
3 | "log_level": "warning",
4 | "core_type": "zmq",
5 | "period": 60,
6 | "uninterruptible": false,
7 | "terminate_on_error": true,
8 | "wait_for_current_time_update": true,
9 | "publications":[
10 | {
11 | "key":"Battery/EV1_current",
12 | "type":"double",
13 | "unit":"A",
14 | "global": true
15 | },
16 | {
17 | "key":"Battery/EV2_current",
18 | "type":"double",
19 | "unit":"A",
20 | "global": true
21 | },
22 | {
23 | "key":"Battery/EV3_current",
24 | "type":"double",
25 | "unit":"A",
26 | "global": true
27 | },
28 | {
29 | "key":"Battery/EV4_current",
30 | "type":"double",
31 | "unit":"A",
32 | "global": true
33 | },
34 | {
35 | "key":"Battery/EV5_current",
36 | "type":"double",
37 | "unit":"A",
38 | "global": true
39 | }
40 | ],
41 | "subscriptions":[
42 | {
43 | "key":"Charger/EV1_voltage",
44 | "type":"double",
45 | "unit":"V",
46 | "global": true
47 | },
48 | {
49 | "key":"Charger/EV2_voltage",
50 | "type":"double",
51 | "unit":"V",
52 | "global": true
53 | },
54 | {
55 | "key":"Charger/EV3_voltage",
56 | "type":"double",
57 | "unit":"V",
58 | "global": true
59 | },
60 | {
61 | "key":"Charger/EV4_voltage",
62 | "type":"double",
63 | "unit":"V",
64 | "global": true
65 | },
66 | {
67 | "key":"Charger/EV5_voltage",
68 | "type":"double",
69 | "unit":"V",
70 | "global": true
71 | }
72 | ]
73 | }
74 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_iteration/BatteryConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Battery",
3 | "core_type": "zmq",
4 | "log_level": "warning",
5 | "period": 60,
6 | "uninterruptible": true,
7 | "terminate_on_error": true,
8 | "wait_for_current_time_update": false,
9 | "publications": [
10 | {
11 | "global": true,
12 | "key": "Battery/EV1_current",
13 | "type": "double",
14 | "unit": "A"
15 | },
16 | {
17 | "global": true,
18 | "key": "Battery/EV2_current",
19 | "type": "double",
20 | "unit": "A"
21 | },
22 | {
23 | "global": true,
24 | "key": "Battery/EV3_current",
25 | "type": "double",
26 | "unit": "A"
27 | },
28 | {
29 | "global": true,
30 | "key": "Battery/EV4_current",
31 | "type": "double",
32 | "unit": "A"
33 | },
34 | {
35 | "global": true,
36 | "key": "Battery/EV5_current",
37 | "type": "double",
38 | "unit": "A"
39 | }
40 | ],
41 | "subscriptions": [
42 | {
43 | "global": true,
44 | "key": "Charger/EV1_voltage",
45 | "type": "double",
46 | "unit": "V"
47 | },
48 | {
49 | "global": true,
50 | "key": "Charger/EV2_voltage",
51 | "type": "double",
52 | "unit": "V"
53 | },
54 | {
55 | "global": true,
56 | "key": "Charger/EV3_voltage",
57 | "type": "double",
58 | "unit": "V"
59 | },
60 | {
61 | "global": true,
62 | "key": "Charger/EV4_voltage",
63 | "type": "double",
64 | "unit": "V"
65 | },
66 | {
67 | "global": true,
68 | "key": "Charger/EV5_voltage",
69 | "type": "double",
70 | "unit": "V"
71 | }
72 | ]
73 | }
74 |
--------------------------------------------------------------------------------
/user_guide_examples/advanced/advanced_default/BatteryConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Battery",
3 | "core_name": "battery_core",
4 | "log_level": "warning",
5 | "core_type": "zmq",
6 | "period": 60,
7 | "uninterruptible": false,
8 | "terminate_on_error": true,
9 | "wait_for_current_time_update": true,
10 | "publications":[
11 | {
12 | "key":"Battery/EV1_current",
13 | "type":"double",
14 | "unit":"A",
15 | "global": true
16 | },
17 | {
18 | "key":"Battery/EV2_current",
19 | "type":"double",
20 | "unit":"A",
21 | "global": true
22 | },
23 | {
24 | "key":"Battery/EV3_current",
25 | "type":"double",
26 | "unit":"A",
27 | "global": true
28 | },
29 | {
30 | "key":"Battery/EV4_current",
31 | "type":"double",
32 | "unit":"A",
33 | "global": true
34 | },
35 | {
36 | "key":"Battery/EV5_current",
37 | "type":"double",
38 | "unit":"A",
39 | "global": true
40 | }
41 | ],
42 | "subscriptions":[
43 | {
44 | "key":"Charger/EV1_voltage",
45 | "type":"double",
46 | "unit":"V",
47 | "global": true
48 | },
49 | {
50 | "key":"Charger/EV2_voltage",
51 | "type":"double",
52 | "unit":"V",
53 | "global": true
54 | },
55 | {
56 | "key":"Charger/EV3_voltage",
57 | "type":"double",
58 | "unit":"V",
59 | "global": true
60 | },
61 | {
62 | "key":"Charger/EV4_voltage",
63 | "type":"double",
64 | "unit":"V",
65 | "global": true
66 | },
67 | {
68 | "key":"Charger/EV5_voltage",
69 | "type":"double",
70 | "unit":"V",
71 | "global": true
72 | }
73 | ]
74 | }
75 |
--------------------------------------------------------------------------------