impure functiontranslateModelFMU
Translates a model into C code for a FMU without building it.
Extends from Internal.fmuArguments (The arguments of buildModelFMU and translateModelFMU that come before the experiment.), Internal.experimentArguments (The experiment of simulate, buildModelFMU and the other calls that simulate or export a model.).
Information
The only required argument is the className, while all others have some default values.
For the experiment, see Internal.experimentArguments.
Example command:
translateModelFMU(className, version="2.0");
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| TypeName | className (from fmuArguments) | the class that should translated | |
| String | version (from fmuArguments) | "2.0" | FMU version, 2.0 or 3.0 (1.0 is deprecated). |
| String | fmuType (from fmuArguments) | "me" | FMU type, me (model exchange), cs (co-simulation), me_cs (both model exchange and co-simulation) |
| String | fileNamePrefix (from fmuArguments) | "<default>" | fileNamePrefix. <default> = "className" |
| String[:] | platforms (from fmuArguments) | {"static"} | The list of platforms to generate code for. "dynamic"=current platform, dynamically link the runtime. "static"=current platform, statically link everything. "<cpu>-<vendor>-<os>", host tripple, e.g. "x86_64-linux-gnu" or "x86_64-w64-mingw32". "<cpu>-<vendor>-<os> docker run ghcr.io/openmodelica/crossbuild:v1.28.0" host triple with OpenModelica supplied Docker image, e.g. "x86_64-linux-gnu docker run ghcr.io/openmodelica/crossbuild:v1.28.0". "<cpu>-<vendor>-<os> docker run <image>" host triple with Docker image, e.g. "x86_64-linux-gnu docker run --pull=never multiarch/crossbuild" |
| Boolean | includeResources (from fmuArguments) | false | Deprecated and has no effect |
| String | method (from fmuArguments) | "<default>" | Integration method of a Co-Simulation FMU. <default>: cvode, or the method of the model for a wasm FMU |
| Real | startTime (from experimentArguments) | nan() | Start time |
| Real | stopTime (from experimentArguments) | nan() | Stop time |
| Integer | numberOfIntervals (from experimentArguments) | -1 | Number of intervals |
| Real | stepSize (from experimentArguments) | nan() | Interval |
| Real | tolerance (from experimentArguments) | nan() | Integration tolerance |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | success |