You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Cpp,FMI] extend FMI export with optional custom annotations (#15727)
* [Cpp,FMI] extend FMI export with optional custom annotations
This is particularly interesting for applications that go beyond simulation,
like optimization, to specify additional things like constraints via custom
annotations in a Modelica model.
- new flag --fmiExtraAnnotations=<regex for annotations of interest>
- while building the Cpp FMU, CevalScriptBackend.callBuildModelFMU dumps the
model instance JSON (<prefix>_modelInstance.json), guarded by the flag
- a standalone jq filter Compiler/scripts/filter-annotations.jq (installed to
share/omc/scripts) selects the annotations of interest
- FMI export adds file extra/org.openmodelica/modelAnnotations.json to the FMU
This keeps codegen free of an NFApi dependency and moves the jq filter out of
the template for better portability (e.g. paths with spaces on Windows/OMDev).
Note: adds jq as a runtime dependency of the Cpp FMU export when
--fmiExtraAnnotations is used.
Co-authored-by: rfranke <rfranke@users.noreply.github.com>
* [OMDev] bump runtime CXX standard to c++17 for std::string_view
Makefile.omdev.mingw still forced -std=c++11, breaking the OMDev/MinGW
build after std::string_view was introduced in systemimplmisc.cpp
(f643f51). CMake already enforces C++17, so match it here.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Adrian Pop <adrian.pop@liu.se>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments