The model compiler can translate a whole model to C++ and make files in a single invocation. The model compiler can be executed from the command line as follows:
java <JVM options> -jar modelcompiler.jar <options> <files>
Which JVM options to use depends on the size of the model and capabilities of the machine. Here is an example:
-Xverify:none -Xmx4g -XX:+AggressiveOpts -XX:+AggressiveHeap
For more information about these, and other available JVM options, please refer to the documentation of your JVM.
At least one of the files that are passed to the model compiler should be a transformation configuration (.tc or .tcjs). It can be specified using a platform resource URI, for example:
platform:/resource/MyProject/my.tcjs
This gives additional flexibility when defining generic rule to run the model compiler. Platform resource URIs are resolved based on the --root
option used.
The model compiler builds the specified TC according to the build properties it contains. All model files that are needed for building the TC will be loaded by the model compiler. If you want additional model files to also be loaded you can specify them on the command-line as well.
The model compiler exits with a non-zero return value if the build fails. In such cases, an explanation of the failure is printed to the console.