Skip to content

Export the FMUs with --fmiFilter=internal - #424

Merged
sjoelund merged 1 commit into
masterfrom
fmu-export-protected
Nov 17, 2026
Merged

sjoelund merged 1 commit into
masterfrom
fmu-export-protected

Conversation

@sjoelund

Copy link
Copy Markdown
Member

An FMU run writes only the variables of the modelDescription.xml to the result file. The default --fmiFilter=protected removes all protected variables from it, so -emit_protected cannot add them. simulate() writes them, and the references contain them, for example the protected controlBus of Modelica.Blocks.Examples.BusUsage.

Since OpenModelica #17888, diffSimulationResults fails when a variable of the reference is not in the result. Before, it ignored the variable. The wasm-jit-cs run of 2026-11-16 had 1269 such Verify -> Simulate rows that master and wasm-jit verify.

  • testmodel.py: when the model has a reference, export the FMU with --fmiFilter=internal. This applies to the wasm FMU runners and to the FMI lanes.

Tested with a two-model library through test.py --wasmfmu=me,cs: a model that extends BusUsage went from Verify -> Simulate (3 bus signals missing) to verified in both lanes. In a sample of 28 failing rows from 7 libraries, 24 had all missing variables in the modelDescription.xml after the change. The other 4 lacked only names that simulate() also does not write (CPUtime, NonlinearSystems.*, constants), which the verification already skips.

Assisted-by: Claude Opus 5.5

An FMU run writes only the variables of the modelDescription.xml to the
result file. The default --fmiFilter=protected removes all protected
variables from it, so -emit_protected cannot add them. simulate()
writes them, and the references contain them, for example the
protected controlBus of Modelica.Blocks.Examples.BusUsage.

Since OpenModelica #17888, diffSimulationResults fails when a variable
of the reference is not in the result. Before, it ignored the variable.
The wasm-jit-cs run of 2026-11-16 had 1269 such Verify -> Simulate
rows that master and wasm-jit verify.

- testmodel.py: when the model has a reference, export the FMU with
  --fmiFilter=internal. This applies to the wasm FMU runners and to
  the FMI lanes.

Tested with a two-model library through test.py --wasmfmu=me,cs:
a model that extends BusUsage went from Verify -> Simulate (3 bus
signals missing) to verified in both lanes. In a sample of 28 failing
rows from 7 libraries, 24 had all missing variables in the
modelDescription.xml after the change. The other 4 lacked only names
that simulate() also does not write (CPUtime, NonlinearSystems.*,
constants), which the verification already skips.

Assisted-by: Claude Opus 5.5
@sjoelund
sjoelund merged commit 59c8e4f into master Nov 17, 2026
7 checks passed
@sjoelund
sjoelund deleted the fmu-export-protected branch November 17, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant