Workflow - ModelC FMU
Synposis
Generate an FMU which includes the ModelC Runtime and a complete simulation.
Workflow
Structure
examples/direct
└── sim
│ ├── data
│ │ └── simulation.yml
│ │ └── direct_index.yml <-- Workflow generated direct index (SignalGroup).
│ └── model
│ └── direct
│ └── lib/libdirect.so
│ └── data/model.yml
└── fmu
└── direct/ <-- Packaged FMU layout (can be directly operated).
└── direct.fmu <-- FMU archive file.
Transformations
generate-fmimodelc gen-modelcfmu gen-modelcfmu-annotations
GenFmiModelcCommand (gen-modelcfmu) signalgroups Signal Groups to export as FMU variables default is all
GenFmuAnnotationCommand (gen-modelcfmu-annotations) fmi_variable_vref fmi_variable_type fmi_variable_name
GenModelCFmuAnnotationCommand signalgroups **** needs to smart select all ****
Stack
model_runtime__model_inst ... list of mi, set automatically
model_runtime__yaml_files ... all yaml files
SignalGroup
must contain metadata:name
signal must contain direction
fmi_variable_vref
fmi_variable_type
fmi_variable_name
Annotations
Direct Index
Patcher
Generate FMU
Simulation (DSE)
simulation
channel in
channel out
uses
dse.fmi file:///repo
model direct dse.fmi.example.direct
channel in in_vector
channel out out_vector
envar OFFSET 100
envar FACTOR 4
workflow generate-modelcfmu
var FMU_NAME direct
var FMI_VERSION 2
var INDEX direct
Workflow
Example
task generate-modelcfmu FMU_NAME=foo
Task CLI
task: dse:fmi:generate-modelcfmu
Generate a FMI ModelC FMU from an existing (DSE/ModelC) Simer simulation.
aliases:
- generate-fmimodelc
commands:
- Task: gen-modelcfmu-annotations
- Task: gen-modelcfmu