-
test_federate.py
defines the core Python simulation code using HELICS and oedisi types. -
component_definition.json
defines static inputs and dynamic inputs/outputs managed by JSON files and HELICS respectively. -
requirements.txt
any python requirements used by Python. -
server.py
is an optional file used in multi-container simulations. No modifications may be necessary.
pip install -r requirements.txt
- (Preferred) Copy or clone oedisi-template to the simulation folder.
- Add the location of the component_definition.json to a components.json in your simulation folder along with a preferred federate name.
- Either create a system.json or add to an existing one with static information and any links.
{
"components": [
...,
{
"name": "unique_simulation_name",
"type": "TypeNameDefinedInComponentsDict",
"parameters": {
"input_needed_at_startup": 31.415926535
}
}
],
"links": [
...,
{
"source": "unique_simulation_name",
"source_port": "appropriate_helics_pub",
"target": "another_federate_which_wants_data",
"target_port": "subscription"
}
]
}
- Build with
oedisi build --system system.json
. A folder calledbuild
should be created. - Run with
oedisi run
.
For a more complete example along with multi-container settings, see https://github.com/openEDI/oedisi-example.