OpenModelica Compiler Flags¶
Usage: omc [Options] (Model.mo | Script.mos) [Libraries | .mo-files]
Libraries: Fully qualified names of libraries to load before processing Model or Script. The libraries should be separated by spaces: Lib1 Lib2 ... LibN.
Options¶
Sets debug flags. Use --help=debug to see available flags.
String list (default empty).
Displays the help text. Use --help=topics for more information.
String (default empty).
Print the version and exit.
Boolean (default false
).
Sets the target compiler to use.
String (default gcc). Valid options:
gcc
msvc
msvc10
msvc12
msvc13
msvc15
msvc19
vxworks69
debugrt
Sets the grammar and semantics to accept.
String (default Modelica). Valid options:
Modelica
MetaModelica
ParModelica
Optimica
PDEModelica
Sets the annotation version that should be used.
String (default 3.x). Valid options:
1.x
2.x
3.x
Sets the language standard that should be used.
String (default latest). Valid options:
1.x
2.x
3.1
3.2
3.3
3.4
3.5
latest
experimental
Show error messages immediately when they happen.
Boolean (default false
).
Show annotations in the flattened code.
Boolean (default false
).
Do not simplify expressions if set.
Boolean (default false
).
Sets the pre optimization modules to use in the back end. See --help=optmodules for more info.
String list (default normalInlineFunction,evaluateParameters,simplifyIfEquations,expandDerOperator,clockPartitioning,findStateOrder,replaceEdgeChange,inlineArrayEqn,removeEqualRHS,removeSimpleEquations,comSubExp,resolveLoops,evalFunc,encapsulateWhenConditions). Valid options:
introduceOutputAliases (Introduces aliases for top-level outputs.)
clockPartitioning (Does the clock partitioning.)
collapseArrayExpressions (Simplifies {x[1],x[2],x[3]} → x for arrays of whole variable references (simplifies code generation).)
comSubExp (Introduces alias assignments for variables which are assigned to simple terms i.e. a = b/c; d = b/c; --> a=d)
dumpDAE (dumps the DAE representation of the current transformation state)
dumpDAEXML (dumps the DAE as xml representation of the current transformation state)
encapsulateWhenConditions (This module replaces each when condition with a boolean variable.)
evalFunc (evaluates functions partially)
evaluateParameters (Evaluates parameters with annotation(Evaluate=true). Use '--evaluateFinalParameters=true' or '--evaluateProtectedParameters=true' to specify additional parameters to be evaluated. Use '--replaceEvaluatedParameters=true' if the evaluated parameters should be replaced in the DAE. To evaluate all parameters in the Frontend use -d=evaluateAllParameters.)
expandDerOperator (Expands der(expr) using Derive.differentiteExpTime.)
findStateOrder (Sets derivative information to states.)
inlineArrayEqn (This module expands all array equations to scalar equations.)
normalInlineFunction (Perform function inlining for function with annotation Inline=true.)
inputDerivativesForDynOpt (Allowed derivatives of inputs in dyn. optimization.)
introduceDerAlias (Adds for every der-call an alias equation e.g. dx = der(x).)
removeEqualRHS (Detects equal expressions of the form a=<exp> and b=<exp> and substitutes them to get speed up.)
removeProtectedParameters (Replace all parameters with protected=true in the system.)
removeSimpleEquations (Performs alias elimination and removes constant variables from the DAE, replacing all occurrences of the old variable reference with the new value (constants) or variable reference (alias elimination).)
removeUnusedParameter (Strips all parameter not present in the equations from the system.)
removeUnusedVariables (Strips all variables not present in the equations from the system.)
removeVerySimpleEquations ([Experimental] Like removeSimpleEquations, but less thorough. Note that this always uses the experimental new alias elimination, --removeSimpleEquations=new, which makes it unstable. In particular, MultiBody systems fail to translate correctly. It can be used for simple (but large) systems of equations.)
replaceEdgeChange (Replace edge(b) = b and not pre(b) and change(b) = v <> pre(v).)
residualForm (Transforms simple equations x=y to zero-sum equations 0=y-x.)
resolveLoops (resolves linear equations in loops)
simplifyAllExpressions (Does simplifications on all expressions.)
simplifyIfEquations (Tries to simplify if equations by use of information from evaluated parameters.)
sortEqnsVars (Heuristic sorting for equations and variables.)
unitChecking (This module is no longer available and its use is deprecated. Use --unitChecking instead.)
wrapFunctionCalls (This module introduces variables for each function call and substitutes all these calls with the newly introduced variables.)
Sets the cheap matching algorithm to use. A cheap matching algorithm gives a jump start matching by heuristics.
Integer (default 3
). Valid options:
0 (No cheap matching.)
1 (Cheap matching, traverses all equations and match the first free variable.)
3 (Random Karp-Sipser: R. M. Karp and M. Sipser. Maximum matching in sparse random graphs.)
Sets the matching algorithm to use. See --help=optmodules for more info.
String (default PFPlusExt). Valid options:
BFSB (Breadth First Search based algorithm.)
DFSB (Depth First Search based algorithm.)
MC21A (Depth First Search based algorithm with look ahead feature.)
PF (Depth First Search based algorithm with look ahead feature.)
PFPlus (Depth First Search based algorithm with look ahead feature and fair row traversal.)
HK (Combined BFS and DFS algorithm.)
HKDW (Combined BFS and DFS algorithm.)
ABMP (Combined BFS and DFS algorithm.)
PR (Matching algorithm using push relabel mechanism.)
DFSBExt (Depth First Search based Algorithm external c implementation.)
BFSBExt (Breadth First Search based Algorithm external c implementation.)
MC21AExt (Depth First Search based Algorithm with look ahead feature external c implementation.)
PFExt (Depth First Search based Algorithm with look ahead feature external c implementation.)
PFPlusExt (Depth First Search based Algorithm with look ahead feature and fair row traversal external c implementation.)
HKExt (Combined BFS and DFS algorithm external c implementation.)
HKDWExt (Combined BFS and DFS algorithm external c implementation.)
ABMPExt (Combined BFS and DFS algorithm external c implementation.)
PRExt (Matching algorithm using push relabel mechanism external c implementation.)
BB (BBs try.)
SBGraph (Set-Based Graph matching algorithm for efficient array handling.)
pseudo (Pseudo array matching that uses scalar matching and reconstructs arrays afterwards as much as possible.)
Sets the index reduction method to use. See --help=optmodules for more info.
String (default dynamicStateSelection). Valid options:
none (Skip index reduction)
uode (Use the underlying ODE without the constraints.)
dynamicStateSelection (Simple index reduction method, select (dynamic) dummy states based on analysis of the system.)
dummyDerivatives (Simple index reduction method, select (static) dummy states based on heuristic.)
Sets the post optimization modules to use in the back end. See --help=optmodules for more info.
String list (default lateInlineFunction,wrapFunctionCalls,inlineArrayEqn,constantLinearSystem,simplifysemiLinear,removeSimpleEquations,simplifyComplexFunction,solveSimpleEquations,tearingSystem,inputDerivativesUsed,calculateStrongComponentJacobians,calculateStateSetsJacobians,symbolicJacobian,removeConstants,simplifyTimeIndepFuncCalls,simplifyAllExpressions,findZeroCrossings,collapseArrayExpressions). Valid options:
addScaledVars_states (added var_norm = var/nominal, where var is state)
addScaledVars_inputs (added var_norm = var/nominal, where var is input)
addTimeAsState (Experimental feature: this replaces each occurrence of variable time with a new introduced state $time with equation der($time) = 1.0)
calculateStateSetsJacobians (Generates analytical jacobian for dynamic state selection sets.)
calculateStrongComponentJacobians (Generates analytical jacobian for torn linear and non-linear strong components. By default linear components and non-linear components with user-defined function calls are skipped. See also debug flags: LSanalyticJacobian, NLSanalyticJacobian and forceNLSanalyticJacobian)
collapseArrayExpressions (Simplifies {x[1],x[2],x[3]} → x for arrays of whole variable references (simplifies code generation).)
constantLinearSystem (Evaluates constant linear systems (a*x+b*y=c; d*x+e*y=f; a,b,c,d,e,f are constants) at compile-time.)
countOperations (Count the mathematical operations of the system.)
cseBinary (Common Sub-expression Elimination)
dumpComponentsGraphStr (Dumps the assignment graph used to determine strong components to format suitable for Mathematica)
dumpDAE (dumps the DAE representation of the current transformation state)
dumpDAEXML (dumps the DAE as xml representation of the current transformation state)
evaluateParameters (Evaluates parameters with annotation(Evaluate=true). Use '--evaluateFinalParameters=true' or '--evaluateProtectedParameters=true' to specify additional parameters to be evaluated. Use '--replaceEvaluatedParameters=true' if the evaluated parameters should be replaced in the DAE. To evaluate all parameters in the Frontend use -d=evaluateAllParameters.)
extendDynamicOptimization (Move loops to constraints.)
generateSymbolicLinearization (Generates symbolic linearization matrices A,B,C,D for linear model:)
generateSymbolicSensitivities (Generates symbolic Sensivities matrix, where der(x) is differentiated w.r.t. param.)
inlineArrayEqn (This module expands all array equations to scalar equations.)
inputDerivativesUsed (Checks if derivatives of inputs are need to calculate the model.)
lateInlineFunction (Perform function inlining for function with annotation LateInline=true.)
partlintornsystem (partitions linear torn systems.)
recursiveTearing (inline and repeat tearing)
reduceDynamicOptimization (Removes equations which are not needed for the calculations of cost and constraints. This module requires --postOptModules+=reduceDynamicOptimization.)
relaxSystem (relaxation from gausian elemination)
removeConstants (Remove all constants in the system.)
removeEqualRHS (Detects equal function calls of the form a=f(b) and c=f(b) and substitutes them to get speed up.)
removeSimpleEquations (Performs alias elimination and removes constant variables from the DAE, replacing all occurrences of the old variable reference with the new value (constants) or variable reference (alias elimination).)
removeUnusedParameter (Strips all parameter not present in the equations from the system to get speed up for compilation of target code.)
removeUnusedVariables (Strips all variables not present in the equations from the system to get speed up for compilation of target code.)
reshufflePost (Reshuffles algebraic loops.)
simplifyAllExpressions (Does simplifications on all expressions.)
simplifyComplexFunction (Some simplifications on complex functions (complex refers to the internal data structure))
simplifyConstraints (Rewrites nonlinear constraints into box constraints if possible. This module requires +gDynOpt.)
simplifyLoops (Simplifies algebraic loops. This modules requires +simplifyLoops.)
simplifyTimeIndepFuncCalls (Simplifies time independent built in function calls like pre(param) -> param, der(param) -> 0.0, change(param) -> false, edge(param) -> false.)
simplifysemiLinear (Simplifies calls to semiLinear.)
solveLinearSystem (solve linear system with newton step)
solveSimpleEquations (Solves simple equations)
symSolver (Rewrites the ode system for implicit Euler method. This module requires +symSolver.)
symbolicJacobian (Detects the sparse pattern of the ODE system and calculates also the symbolic Jacobian if flag '--generateSymbolicJacobian' is enabled.)
tearingSystem (For method selection use flag tearingMethod.)
wrapFunctionCalls (This module introduces variables for each function call and substitutes all these calls with the newly introduced variables.)
Sets the target language for the code generation.
String (default C). Valid options:
None
C
Cpp
omsicpp
ExperimentalEmbeddedC
JavaScript
omsic
XML
MidC
Orders connect equations alphabetically if set.
Boolean (default true
).
Prints out extra type information if set.
Boolean (default false
).
Sets whether to split arrays or not.
Boolean (default false
).
Enables valid modelica output for flat modelica.
Boolean (default false
).
Turns on silent mode.
Boolean (default false
).
Sets the name of the corba session if -d=interactiveCorba or --interactive=corba is used.
String (default empty).
Sets the number of processors to use (0=default=auto).
Integer (default 0
).
Sets the latency for parallel execution.
Integer (default 0
).
Sets the bandwidth for parallel execution.
Integer (default 0
).
Instantiate the class given by the fully qualified path.
String (default empty).
Sets the vectorization limit, arrays and matrices larger than this will not be vectorized.
Integer (default 0
).
Turns on simulation code generation.
Boolean (default false
).
Sets whether to evaluate parameters in annotations or not.
Boolean (default false
).
Turns on labeled SimCode generation for reduction algorithms.
Boolean (default false
).
Turns on reducing terms for reduction algorithms.
Boolean (default false
).
Sets the reduction method to be used.
String (default deletion). Valid options:
deletion
substitution
linearization
Disable Warning/Error Massages.
Boolean (default false
).
Override the locale from the environment.
String (default empty).
Sets the default OpenCL device to be used for parallel execution.
Integer (default 0
).
Maximal traversals to find simple equations in the acausal system.
Integer (default 2
).
Redirect the dump to file. If the file ends with .html HTML code is generated.
String (default empty).
Enables (very) experimental code to break algebraic loops using the delay() operator. Probably messes with initialization.
Boolean (default true
).
Sets the tearing method to use. Select no tearing or choose tearing method.
String (default cellier). Valid options:
noTearing (Skip tearing. This breaks models with mixed continuous-integer/boolean unknowns)
minimalTearing (Minimal tearing method to only tear discrete variables.)
omcTearing (Tearing method developed by TU Dresden: Frenkel, Schubert.)
cellier (Tearing based on Celliers method, revised by FH Bielefeld: Täuber, Patrick)
Sets the tearing heuristic to use for Cellier-tearing.
String (default MC3). Valid options:
MC1 (Original cellier with consideration of impossible assignments and discrete Vars.)
MC2 (Modified cellier, drop first step.)
MC11 (Modified MC1, new last step 'count impossible assignments'.)
MC21 (Modified MC2, new last step 'count impossible assignments'.)
MC12 (Modified MC1, step 'count impossible assignments' before last step.)
MC22 (Modified MC2, step 'count impossible assignments' before last step.)
MC13 (Modified MC1, build sum of impossible assignment and causalizable equations, choose var with biggest sum.)
MC23 (Modified MC2, build sum of impossible assignment and causalizable equations, choose var with biggest sum.)
MC231 (Modified MC23, Two rounds, choose better potentials-set.)
MC3 (Modified cellier, build sum of impossible assignment and causalizable equations for all vars, choose var with biggest sum.)
MC4 (Modified cellier, use all heuristics, choose var that occurs most in potential sets)
Scalarizes the builtin min/max reduction operators if true.
Boolean (default false
).
Enables stricter enforcement of Modelica language rules.
Boolean (default false
).
Always scalarizes bindings if set.
Boolean (default false
).
--corbaObjectReferenceFilePath
Sets the path for corba object reference file if -d=interactiveCorba is used.
String (default empty).
Sets the scheduler for task graph scheduling (list | listr | level | levelfix | ext | metis | mcp | taskdep | tds | bls | rand | none). Default: level.
String (default level).
Sets the code-type produced by hpcom (openmp | pthreads | pthreads_spin | tbb | mpi). Default: openmp.
String (default openmp).
Activates user given rewrite rules for Absyn expressions. The rules are read from the given file and are of the form rewrite(fromExp, toExp);
String (default empty).
Replaces homotopy(actual, simplified) with the actual expression or the simplified expression. Good for debugging models which use homotopy. The default is to not replace homotopy.
String (default none). Valid options:
none (Default, do not replace homotopy.)
actual (Replace homotopy(actual, simplified) with actual.)
simplified (Replace homotopy(actual, simplified) with simplified.)
Generates symbolic Jacobian matrix, where der(x) is differentiated w.r.t. x. This matrix can be used by dassl or ida solver with simulation flag '-jacobian'.
Boolean (default false
).
--generateSymbolicLinearization
- Generates symbolic linearization matrices A,B,C,D for linear model:
Boolean (default false
).
Allow Integer to enumeration conversion.
Boolean (default false
).
Sets the profiling level to use. Profiled equations and functions record execution time and count for each time step taken by the integrator.
String (default none). Valid options:
none (Generate code without profiling)
blocks (Generate code for profiling function calls as well as linear and non-linear systems of equations)
blocks+html (Like blocks, but also run xsltproc and gnuplot to generate an html report)
all (Generate code for profiling of all functions and equations)
all_perf (Generate code for profiling of all functions and equations with additional performance data using the papi-interface (cpp-runtime))
all_stat (Generate code for profiling of all functions and equations with additional statistics (cpp-runtime))
sets tolerance of reshuffling algorithm: 1: conservative, 2: more tolerant, 3 resolve all
Integer (default 1
).
Generate dynamic optimization problem based on annotation approach.
Boolean (default false
).
Max size for solveLinearSystem.
Integer (default 0
).
Sets extra flags for compilation with the C++ compiler (e.g. +cppFlags=-O3,-Wall)
String list (default ).
Specifies method that removes simple equations.
String (default default). Valid options:
none (Disables module)
default (Performs alias elimination and removes constant variables. Default case uses in preOpt phase the fastAcausal and in postOpt phase the causal implementation.)
causal (Performs alias elimination and removes constant variables. Causal implementation.)
fastAcausal (Performs alias elimination and removes constant variables. fastImplementation fastAcausal.)
allAcausal (Performs alias elimination and removes constant variables. Implementation allAcausal.)
new (New implementation (experimental))
Activates dynamic tearing (TearingSet can be changed automatically during runtime, strict set vs. casual set.)
String (default false). Valid options:
false (No dynamic tearing.)
true (Dynamic tearing for linear and nonlinear systems.)
linear (Dynamic tearing only for linear systems.)
nonlinear (Dynamic tearing only for nonlinear systems.)
Activates symbolic implicit solver (original system is not changed).
String (default none). Valid options:
none
impEuler
expEuler
Specifies method that transform loops in constraints. hint: using initial guess from file!
String (default none). Valid options:
none (Disables module)
lin (linear loops --> constraints)
noLin (no linear loops --> constraints)
all (loops --> constraints)
Use tearing set even if it is not smaller than the original component.
Boolean (default false
).
Simplify algebraic loops.
Integer (default 0
). Valid options:
0 (do nothing)
1 (special modification of residual expressions)
2 (special modification of residual expressions with helper variables)
Inline and repeat tearing.
Integer (default 0
). Valid options:
0 (do nothing)
1 (linear tearing set of size 1)
2 (linear tearing)
Sets the minium threshold for stream flow rates
Real (default 1e-07
).
Sets the matrix format type in cpp runtime which should be used (dense | sparse ). Default: dense.
String (default dense).
Sets the limit for partitionin of linear torn systems.
Integer (default 0
).
Sets the initialization optimization modules to use in the back end. See --help=optmodules for more info.
String list (default simplifyComplexFunction,tearingSystem,solveSimpleEquations,calculateStrongComponentJacobians,simplifyAllExpressions,collapseArrayExpressions). Valid options:
calculateStrongComponentJacobians (Generates analytical jacobian for torn linear and non-linear strong components. By default linear components and non-linear components with user-defined function calls are skipped. See also debug flags: LSanalyticJacobian, NLSanalyticJacobian and forceNLSanalyticJacobian)
collapseArrayExpressions (Simplifies {x[1],x[2],x[3]} → x for arrays of whole variable references (simplifies code generation).)
constantLinearSystem (Evaluates constant linear systems (a*x+b*y=c; d*x+e*y=f; a,b,c,d,e,f are constants) at compile-time.)
extendDynamicOptimization (Move loops to constraints.)
generateHomotopyComponents (Finds the parts of the DAE that have to be handled by the homotopy solver and creates a strong component out of it.)
inlineHomotopy (Experimental: Inlines the homotopy expression to allow symbolic simplifications.)
inputDerivativesUsed (Checks if derivatives of inputs are need to calculate the model.)
recursiveTearing (inline and repeat tearing)
reduceDynamicOptimization (Removes equations which are not needed for the calculations of cost and constraints. This module requires --postOptModules+=reduceDynamicOptimization.)
replaceHomotopyWithSimplified (Replaces the homotopy expression homotopy(actual, simplified) with the simplified part.)
simplifyAllExpressions (Does simplifications on all expressions.)
simplifyComplexFunction (Some simplifications on complex functions (complex refers to the internal data structure))
simplifyConstraints (Rewrites nonlinear constraints into box constraints if possible. This module requires +gDynOpt.)
simplifyLoops (Simplifies algebraic loops. This modules requires +simplifyLoops.)
solveSimpleEquations (Solves simple equations)
tearingSystem (For method selection use flag tearingMethod.)
wrapFunctionCalls (This module introduces variables for each function call and substitutes all these calls with the newly introduced variables.)
Sets the maximum mixed-determined index that is handled by the initialization.
Integer (default 10
).
Keeps the input/output prefix for all variables in the flat model, not only top-level ones.
Boolean (default false
).
If this is activated, then the specified pre-/post-/init-optimization modules will be rearranged to the recommended ordering.
Boolean (default true
).
Enables additional pre-optimization modules, e.g. --preOptModules+=module1,module2 would additionally enable module1 and module2. See --help=optmodules for more info.
String list (default empty).
Disables a list of pre-optimization modules, e.g. --preOptModules-=module1,module2 would disable module1 and module2. See --help=optmodules for more info.
String list (default empty).
Enables additional post-optimization modules, e.g. --postOptModules+=module1,module2 would additionally enable module1 and module2. See --help=optmodules for more info.
String list (default empty).
Disables a list of post-optimization modules, e.g. --postOptModules-=module1,module2 would disable module1 and module2. See --help=optmodules for more info.
String list (default empty).
Enables additional init-optimization modules, e.g. --initOptModules+=module1,module2 would additionally enable module1 and module2. See --help=optmodules for more info.
String list (default empty).
Disables a list of init-optimization modules, e.g. --initOptModules-=module1,module2 would disable module1 and module2. See --help=optmodules for more info.
String list (default empty).
Sets the size of the internal hash table used for instantiation caching.
Integer (default 25343
).
Sets the maximum system size for tearing of linear systems (default 200).
Integer (default 200
).
Sets the maximum system size for tearing of nonlinear systems (default 10000).
Integer (default 10000
).
Deactivates tearing for the specified components. Use '-d=tearingdump' to find out the relevant indexes.
Unknown default valueFlags.FlagData.INT_LIST_FLAG(data = {NIL})
Generates code to simulate models in DAE mode. The whole system is passed directly to the DAE solver SUNDIALS/IDA and no algebraic solver is involved in the simulation process.
Boolean (default false
).
Sets the inline method to use. replace : This method inlines by replacing in place all expressions. Might lead to very long expression. append : This method inlines by adding additional variables to the whole system. Might lead to much bigger system.
String (default replace). Valid options:
replace
append
Sets the tearing variables by its strong component indexes. Use '-d=tearingdump' to find out the relevant indexes. Use following format: '--setTearingVars=(sci,n,t1,...,tn)*', with sci = strong component index, n = number of tearing variables, t1,...tn = tearing variables. E.g.: '--setTearingVars=4,2,3,5' would select variables 3 and 5 in strong component 4.
Unknown default valueFlags.FlagData.INT_LIST_FLAG(data = {NIL})
Sets the residual equations by its strong component indexes. Use '-d=tearingdump' to find out the relevant indexes for the collective equations. Use following format: '--setResidualEqns=(sci,n,r1,...,rn)*', with sci = strong component index, n = number of residual equations, r1,...rn = residual equations. E.g.: '--setResidualEqns=4,2,3,5' would select equations 3 and 5 in strong component 4. Only works in combination with 'setTearingVars'.
Unknown default valueFlags.FlagData.INT_LIST_FLAG(data = {NIL})
--ignoreCommandLineOptionsAnnotation
Ignores the command line options specified as annotation in the class.
Boolean (default false
).
Generates sensitivities variables and matrixes.
Boolean (default false
).
Sets the number seconds until omc timeouts and exits. Used by the testing framework to terminate infinite running processes.
Integer (default 0
).
Activates total tearing (determination of all possible tearing sets) for the specified components. Use '-d=tearingdump' to find out the relevant indexes.
Unknown default valueFlags.FlagData.INT_LIST_FLAG(data = {NIL})
--ignoreSimulationFlagsAnnotation
Ignores the simulation flags specified as annotation in the class.
Boolean (default false
).
--dynamicTearingForInitialization
Enable Dynamic Tearing also for the initialization system.
Boolean (default false
).
Prefer tearing variables with start value for initialization.
Boolean (default true
).
Generate code for at most this many equations per C-file (partially implemented in the compiler).
Integer (default 2000
).
Evaluates all the final parameters in addition to parameters with annotation(Evaluate=true).
Boolean (default false
).
Evaluates all the protected parameters in addition to parameters with annotation(Evaluate=true).
Boolean (default false
).
Replaces all the evaluated parameters in the DAE.
Boolean (default true
).
Sets whether array expressions containing function calls are condensed or not.
Boolean (default true
).
wrapFunctionCalls ignores more then default cases, e.g. exp, sin, cos, log, (experimental flag)
Boolean (default false
).
Sets the strictness of the tearing method regarding the solvability restrictions.
String (default strict). Valid options:
casual (Loose tearing rules using ExpressionSolve to determine the solvability instead of considering the partial derivative. Allows to solve for everything that is analytically possible. This could lead to singularities during simulation.)
strict (Robust tearing rules by consideration of the partial derivative. Allows to divide by parameters that are not equal to or close to zero.)
veryStrict (Very strict tearing rules that do not allow to divide by any parameter. Use this if you aim at overriding parameters after compilation with values equal to or close to zero.)
Sets the interactive mode for omc.
String (default none). Valid options:
none (do nothing)
corba (Starts omc as a server listening on the Corba interface.)
tcp (Starts omc as a server listening on the socket interface.)
zmq (Starts omc as a ZeroMQ server listening on the socket interface.)
Sets the file suffix for zeroMQ port file if --interactive=zmq is used.
String (default empty).
Sets the homotopy approach.
String (default equidistantGlobal). Valid options:
equidistantLocal (Local homotopy approach with equidistant lambda steps. The homotopy parameter only effects the local strongly connected component.)
adaptiveLocal (Local homotopy approach with adaptive lambda steps. The homotopy parameter only effects the local strongly connected component.)
equidistantGlobal (Default, global homotopy approach with equidistant lambda steps. The homotopy parameter effects the entire initialization system.)
adaptiveGlobal (Global homotopy approach with adaptive lambda steps. The homotopy parameter effects the entire initialization system.)
Sets whether to ignore replaceability or not when redeclaring.
Boolean (default false
).
Sets the optimization modules for the DAEmode in the back end. See --help=optmodules for more info.
String list (default lateInlineFunction,wrapFunctionCalls,simplifysemiLinear,simplifyComplexFunction,removeConstants,simplifyTimeIndepFuncCalls,simplifyAllExpressions,findZeroCrossings,createDAEmodeBDAE,symbolicJacobianDAE,setEvaluationStage).
The loop iteration limit used when evaluating constant function calls.
Integer (default 100000
).
The recursion limit used when evaluating constant function calls.
Integer (default 256
).
Sets to instantiate only one algebraic loop solver all algebraic loops
Boolean (default false
).
Show annotations affecting the solution process in the flattened code.
Boolean (default false
).
Activates the state selection inside initialization to avoid singularities.
Boolean (default false
).
Sets the target language for the produced code of linearization. Only works with '--generateSymbolicLinearization' and 'linearize(modelName)'.
String (default modelica). Valid options:
modelica
matlab
julia
python
Disables analytical to structural singularity conversion.
Boolean (default false
).
Enables full equation replacement for BLT transformation from the ASSC algorithm.
Boolean (default false
).
Enables the ASSC algorithm to evaluate real valued coefficients (usually only integers).
Boolean (default false
).
Enables the ASSC algorithm for initialization.
Boolean (default false
).
Sets the maximum system size for the analytical to structural conversion algorithm (default 200).
Integer (default 200
).
Outputs experimental flat Modelica.
Boolean (default false
).
Specifies which model variables are exposed by the modelDescription.xml
String (default protected). Valid options:
none (All variables are exposed, even variables introduced by the symbolic transformations. This is mainly for debugging purposes.)
internal (All model variables are exposed, including protected ones. Variables introduced by the symbolic transformations are filtered out, with minor exceptions, e.g. for state sets.)
protected (All public model variables are exposed. Internal and protected variables are filtered out, with small exceptions, e.g. for state sets.)
blackBox (Only the interface is exposed. All other variables are hidden or exposed with concealed names.)
Defines if FMUs will be exported with sources or not. --fmiFilter=blackBox might override this, because black box FMUs do never contain their source code.
Boolean (default true
).
Add simulation flags to FMU. Will create <fmiPrefix>_flags.json in resources folder with given flags. Use --fmiFlags or --fmiFlags=none to disable [default]. Use --fmiFlags=default for the default simulation flags. To pass flags use e.g. --fmiFlags=s:cvode,nls:homotopy or --fmiFlags=path/to/yourFlags.json.
String list (default empty).
Defines if FMUs will be configured and build with CMake.
String (default default). Valid options:
default (Let omc decide if CMake should be used.)
true (Use CMake to compile FMU binaries.)
false (Use default GNU Autoconf toolchain to compile FMU binaries.)
Activates experimental new backend for better array handling. This also activates the new frontend. [WIP]
Boolean (default false
).
Experimental: Enable parallelization of independent systems of equations in the translated model.
Boolean (default false
).
Sets the port used by the interactive server.
Integer (default 0
).
Flags to allow non-standard Modelica.
String list (default empty). Valid options:
nonStdMultipleExternalDeclarations (Allow several external declarations in functions.See: https://specification.modelica.org/maint/3.5/functions.html#function-as-a-specialized-class)
nonStdEnumerationAsIntegers (Allow enumeration as integer without casting via Integer(Enum).See: https://specification.modelica.org/maint/3.5/class-predefined-types-and-declarations.html#type-conversion-of-enumeration-values-to-string-or-integer)
nonStdIntegersAsEnumeration (Allow integer as enumeration without casting via Enum(Integer).See: https://specification.modelica.org/maint/3.5/class-predefined-types-and-declarations.html#type-conversion-of-integer-to-enumeration-values)
nonStdDifferentCaseFileVsClassName (Allow directory or file with different case in the name than the contained class name.See: https://specification.modelica.org/maint/3.5/packages.html#mapping-package-class-structures-to-a-hierarchical-file-system)
protectedAccess (Allow access of protected elements)
--exportClocksInModelDescription
exports clocks in modeldescription.xml for fmus, The default is false.
Boolean (default false
).
Sets the link type for the simulation executable. dynamic: libraries are dynamically linked; the executable is built very fast but is not portable because of DLL dependencies. static: libraries are statically linked; the executable is built more slowly but it is portable and dependency-free.
String (default dynamic). Valid options:
dynamic
static
Always choose state derivatives as iteration variables in strong components.
Boolean (default false
).
Dumps the flat model at the given stages of the frontend.
String list (default all). Valid options:
flatten (After flattening but before connection handling.)
connections (After connection handling.)
eval (After evaluating constants.)
simplify (After model simplification.)
scalarize (After scalarizing arrays.)
Simulates the last model in the given Modelica file.
Boolean (default false
).
Obfuscates identifiers in the simulation model
String (default none). Valid options:
none (No obfuscation.)
protected (Obfuscates everything except for public variables.)
full (Obfuscates everything.)
Debug flags¶
The debug flag takes a comma-separated list of flags which are used by the compiler for debugging or experimental purposes. Flags prefixed with "-" or "no" will be disabled. The available flags are (+ are enabled by default, - are disabled):
- Cache (default: on)
Turns off the instantiation cache.
- LSanalyticJacobian (default: off)
Enables analytical jacobian for linear strong components. Defaults to false
- NLSanalyticJacobian (default: on)
Enables analytical jacobian for non-linear strong components without user-defined function calls, for that see forceNLSanalyticJacobian
- acceptTooManyFields (default: off)
Accepts passing records with more fields than expected to a function. This is not allowed, but is used in Fluid.Dissipation. See https://trac.modelica.org/Modelica/ticket/1245 for details.
- aliasConflicts (default: off)
Dumps alias sets with different start or nominal values.
- arrayConnect (default: off)
Use experimental array connection handler.
- backendKeepEnv (default: on)
When enabled, the environment is kept when entering the backend, which enables CevalFunction (function interpretation) to work. This module not essential for the backend to function in most cases, but can improve simulation performance by evaluating functions. The drawback to keeping the environment graph in memory is that it is huge (~80% of the total memory in use when returning the frontend DAE).
- backendReduceDAE (default: off)
Prints all Reduce DAE debug information.
- backenddaeinfo (default: off)
Enables dumping of back-end information about system (Number of equations before back-end,...).
- bltdump (default: off)
Dumps information from index reduction.
- bltmatrixdump (default: off)
Dumps the blt matrix in html file. IE seems to be very good in displaying large matrices.
- buildExternalLibs (default: on)
Use the autotools project in the Resources folder of the library to build missing external libraries.
- ceval (default: off)
Prints extra information from Ceval.
- cgraph (default: off)
Prints out connection graph information.
- cgraphGraphVizFile (default: off)
Generates a graphviz file of the connection graph.
- cgraphGraphVizShow (default: off)
Displays the connection graph with the GraphViz lefty tool.
- checkASUB (default: off)
Prints out a warning if an ASUB is created from a CREF expression.
- checkBackendDae (default: off)
Do some simple analyses on the datastructure from the frontend to check if it is consistent.
- checkDAECrefType (default: off)
Enables extra type checking for cref expressions.
- checkSimplify (default: off)
Enables checks for expression simplification and prints a notification whenever an undesirable transformation has been performed.
- combineSubscripts (default: off)
Move all subscripts to the end of component references.
- constjac (default: off)
solves linear systems with constant Jacobian and variable b-Vector symbolically
- countOperations (default: off)
Count operations.
- daedumpgraphv (default: off)
Dumps the DAE in graphviz format.
- dataReconciliation (default: off)
Dumps all the dataReconciliation extraction algorithm procedure
- debugAlgebraicLoopsJacobian (default: off)
Dumps debug output while creating symbolic jacobians for non-linear systems.
- debugAlias (default: off)
Dumps some information about the process of removeSimpleEquations.
- debugDAEmode (default: off)
Dump debug output for the DAEmode.
- debugDifferentiation (default: off)
Dumps debug output for the differentiation process.
- debugDifferentiationVerbose (default: off)
Dumps verbose debug output for the differentiation process.
- disableColoring (default: off)
Disables coloring algorithm while spasity detection.
- disableDirectionalDerivatives (default: on)
For FMI 2.0 only dependecy analysis will be perform.
- disableFMIDependency (default: off)
Disables the dependency analysis and generation for FMI 2.0.
- disableJacsforSCC (default: off)
Disables calculation of jacobians to detect if a SCC is linear or non-linear. By disabling all SCC will handled like non-linear.
- disableRecordConstructorOutput (default: off)
Disables output of record constructors in the flat code.
- disableSingleFlowEq (default: off)
Disables the generation of single flow equations.
- disableStartCalc (default: off)
Deactivates the pre-calculation of start values during compile-time.
- disableWindowsPathCheckWarning (default: off)
Disables warnings on Windows if OPENMODELICAHOME/MinGW is missing.
- discreteinfo (default: off)
Enables dumping of discrete variables. Extends -d=backenddaeinfo.
- dummyselect (default: off)
Dumps information from dummy state selection heuristic.
- dump (default: off)
Dumps the absyn representation of a program.
- dumpASSC (default: off)
Dumps the conversion process of analytical to structural singularities.
- dumpBackendClocks (default: off)
Dumps times for each backend module (only new backend).
- dumpBackendInline (default: off)
Dumps debug output while inline function.
- dumpBackendInlineVerbose (default: off)
Dumps debug output while inline function.
- dumpCSE (default: off)
Additional output for CSE module.
- dumpCSE_verbose (default: off)
Additional output for CSE module.
- dumpConstrepl (default: off)
Dump the found replacements for constants.
- dumpConversionRules (default: off)
Dumps the rules when converting a package using a conversion script.
- dumpEArepl (default: off)
Dump the found replacements for evaluate annotations (evaluate=true) parameters.
- dumpEncapsulateConditions (default: off)
Dumps the results of the preOptModule encapsulateWhenConditions.
- dumpEqInUC (default: off)
Dumps all equations handled by the unit checker.
- dumpEqUCStruct (default: off)
Dumps all the equations handled by the unit checker as tree-structure.
- dumpExcludedSymJacExps (default: off)
This flags dumps all expression that are excluded from differentiation of a symbolic Jacobian.
- dumpFPrepl (default: off)
Dump the found replacements for final parameters.
- dumpFunctions (default: off)
Add functions to backend dumps.
- dumpHomotopy (default: off)
Dumps the results of the postOptModule optimizeHomotopyCalls.
- dumpInlineSolver (default: off)
Dumps the inline solver equation system.
- dumpJL (default: off)
Dumps the absyn representation of a program as a Julia representation
- dumpLoops (default: off)
Dumps loop equation.
- dumpLoopsVerbose (default: off)
Dumps loop equation and enhanced adjacency matrix.
- dumpPPrepl (default: off)
Dump the found replacements for protected parameters.
- dumpParamrepl (default: off)
Dump the found replacements for remove parameters.
- dumpRecursiveTearing (default: off)
Dump between steps of recursiveTearing
- dumpSCCGraphML (default: off)
Dumps graphml files with the strongly connected components.
- dumpSetBasedGraphs (default: off)
Dumps information about set based graphs for efficient array handling (only new frontend and new backend).
- dumpSimCode (default: off)
Dumps the simCode model used for code generation.
- dumpSimplify (default: off)
Dumps expressions before and after simplification.
- dumpSimplifyLoops (default: off)
Dump between steps of simplifyLoops
- dumpSlice (default: off)
Dumps information about the slicing process (pseudo-array causalization).
- dumpSortEqnsAndVars (default: off)
Dumps debug output for the modules sortEqnsVars.
- dumpSparsePattern (default: off)
Dumps sparse pattern with coloring used for simulation.
- dumpSparsePatternVerbose (default: off)
Dumps in verbose mode sparse pattern with coloring used for simulation.
- dumpSynchronous (default: off)
Dumps information of the clock partitioning.
- dumpUnits (default: off)
Dumps all the calculated units.
- dumpdaelow (default: off)
Dumps the equation system at the beginning of the back end.
- dumpdgesv (default: off)
Enables dumping of the information whether DGESV is used to solve linear systems.
- dumpeqninorder (default: off)
Enables dumping of the equations in the order they are calculated.
- dumpindxdae (default: off)
Dumps the equation system after index reduction and optimization.
- dumpinitialsystem (default: off)
Dumps the initial equation system.
- dumprepl (default: off)
Dump the found replacements for simple equation removal.
- dynload (default: off)
Display debug information about dynamic loading of compiled functions.
- evalFuncDump (default: off)
dumps debug information about the function evaluation
- evalOutputOnly (default: off)
Generates equations to calculate outputs only.
- evalParameterDump (default: off)
Dumps information for evaluating parameters.
- evalfunc (default: on)
Turns on/off symbolic function evaluation.
- evaluateAllParameters (default: off)
Evaluates all parameters if set.
- events (default: on)
Turns on/off events handling.
- execHash (default: off)
Measures the time it takes to hash all simcode variables before code generation.
- execstat (default: off)
Prints out execution statistics for the compiler.
- execstatGCcollect (default: off)
When running execstat, also perform an extra full garbage collection.
- experimentalReductions (default: off)
Turns on custom reduction functions (OpenModelica extension).
- failtrace (default: off)
Sets whether to print a failtrace or not.
- fmuExperimental (default: off)
Adds features to the FMI export that are considered experimental as of now: fmi2GetSpecificDerivatives, canGetSetFMUState
- force-fmi-attributes (default: off)
Force to export all fmi attributes to the modelDescription.xml, including those which have default values
- forceNLSanalyticJacobian (default: off)
Forces calculation analytical jacobian also for non-linear strong components with user-defined functions.
- frontEndUnitCheck (default: off)
Checks the consistency of units in equation.
- gcProfiling (default: off)
Prints garbage collection stats to standard output.
- gen (default: off)
Turns on/off dynamic loading of functions that are compiled during translation. Only enable this if external functions are needed to calculate structural parameters or constants.
- gendebugsymbols (default: off)
Generate code with debugging symbols.
- generateCodeCheat (default: off)
Used to generate code for the bootstrapped compiler.
- graphInst (default: off)
Do graph based instantiation.
- graphInstGenGraph (default: off)
Dumps a graph of the program. Use with -d=graphInst
- graphInstRunDep (default: off)
Run scode dependency analysis. Use with -d=graphInst
- graphml (default: off)
Dumps .graphml files for the bipartite graph after Index Reduction and a task graph for the SCCs. Can be displayed with yEd.
- graphviz (default: off)
Dumps the absyn representation of a program in graphviz format.
- graphvizDump (default: off)
Activates additional graphviz dumps (as .dot files). It can be used in addition to one of the following flags: {dumpdaelow|dumpinitialsystems|dumpindxdae}.
- hardcodedStartValues (default: off)
Embed the start values of variables and parameters into the c++ code and do not read it from xml file.
- hpcom (default: off)
Enables parallel calculation based on task-graphs.
- hpcomDump (default: off)
Dumps additional information on the parallel execution with hpcom.
- hpcomMemoryOpt (default: off)
Optimize the memory structure regarding the selected scheduler
- ignoreCycles (default: off)
Ignores cycles between constant/parameter components.
- implOde (default: off)
activates implicit codegen
- infoXmlOperations (default: off)
Enables output of the operations in the _info.xml file when translating models.
- initialization (default: off)
Shows additional information from the initialization process.
- inlineFunctions (default: on)
Controls if function inlining should be performed.
- inlineSolver (default: off)
Generates code for inline solver.
- instance (default: off)
Prints extra failtrace from InstanceHierarchy.
- interactive (default: off)
Starts omc as a server listening on the socket interface.
- interactiveCorba (default: off)
Starts omc as a server listening on the Corba interface.
- interactivedump (default: off)
Prints out debug information for the interactive server.
- iterationVars (default: off)
Shows a list of all iteration variables.
- listAppendWrongOrder (default: on)
Print notifications about bad usage of listAppend.
- lookup (default: off)
Print extra failtrace from lookup.
- mergeAlgSections (default: off)
Disables coloring algorithm while sparsity detection.
- mergeComponents (default: off)
Enables automatic merging of components into arrays.
- metaModelicaRecordAllocWords (default: off)
Instrument the source code to record memory allocations (requires run-time and generated files compiled with -DOMC_RECORD_ALLOC_WORDS).
- multirate (default: off)
The solver can switch partitions in the system.
- newInst (default: on)
Enables new instantiation phase.
- nfAPI (default: off)
Enables experimental new instantiation use in the OMC API.
- nfAPIDynamicSelect (default: off)
Show DynamicSelect(static, dynamic) in annotations. Default to false and will select the first (static) expression
- nfAPINoise (default: off)
Enables error display for the experimental new instantiation use in the OMC API.
- nfEvalConstArgFuncs (default: on)
Evaluate all functions with constant arguments in the new frontend.
- nfExpandFuncArgs (default: off)
Expand all function arguments in the new frontend.
- nfExpandOperations (default: on)
Expand all unary/binary operations to scalar expressions in the new frontend.
- nfScalarize (default: on)
Run scalarization in NF, default true.
- oldFrontEndUnitCheck (default: off)
Checks the consistency of units in equation (for the old front-end).
- optdaedump (default: off)
Dumps information from the optimization modules.
- parallelCodegen (default: on)
Enables code generation in parallel (disable this if compiling a model causes you to run out of RAM).
- paramdlowdump (default: off)
Enables dumping of the parameters in the order they are calculated.
- partitionInitialization (default: on)
This flag controls if partitioning is applied to the initialization system.
- patternmAllInfo (default: off)
Adds notifications of all pattern-matching optimizations that are performed.
- patternmDeadCodeElimination (default: on)
Performs dead code elimination in match-expressions.
- patternmMoveLastExp (default: on)
Optimization that moves the last assignment(s) into the result of a match-expression. For example: equation c = fn(b); then c; => then fn(b);
patternmSkipFilterUnusedBindings (default: off)
- printRecordTypes (default: off)
Prints out record types as part of the flat code.
- printStructuralParameters (default: off)
Prints the structural parameters identified by the front-end
- pthreads (default: off)
Experimental: Unused parallelization.
- relidx (default: off)
Prints out debug information about relations, that are used as zero crossings.
- relocatableFunctions (default: off)
Generates relocatable code: all functions become function pointers and can be replaced at run-time.
- reportSerializedSize (default: off)
Reports serialized sizes of various data structures used in the compiler.
- reshufflePost (default: off)
Reshuffles the systems of equations.
- resolveLoopsDump (default: off)
Debug Output for ResolveLoops Module.
- rml (default: off)
Converts Modelica-style arrays to lists.
- runtimeStaticLinking (default: off)
Use the static simulation runtime libraries (C++ simulation runtime).
- scodeDep (default: on)
Does scode dependency analysis prior to instantiation. Defaults to true.
- semiLinear (default: off)
Enables dumping of the optimization information when optimizing calls to semiLinear.
- shortOutput (default: off)
Enables short output of the simulate() command. Useful for tools like OMNotebook.
- showDaeGeneration (default: off)
Show the dae variable declarations as they happen.
- showEquationSource (default: off)
Display the element source information in the dumped DAE for easier debugging.
- showExpandableInfo (default: off)
Show information about expandable connector handling.
- showInstCacheInfo (default: off)
Prints information about instantiation cache hits and additions. Defaults to false.
- showStartOrigin (default: off)
Enables dumping of the DAE startOrigin attribute of the variables.
- showStatement (default: off)
Shows the statement that is currently being evaluated when evaluating a script.
- skipInputOutputSyntacticSugar (default: off)
Used when bootstrapping to preserve the input output parsing of the code output by the list command.
- stateselection (default: off)
Enables dumping of selected states. Extends -d=backenddaeinfo.
- static (default: off)
Enables extra debug output from the static elaboration.
- stripPrefix (default: on)
Strips the environment prefix from path/crefs. Defaults to true.
- susanDebug (default: off)
Makes Susan generate code using try/else to better debug which function broke the expected match semantics.
- symJacConstantSplit (default: off)
Generates all symbolic Jacobians with splitted constant parts.
- symjacdump (default: off)
Dumps information about symbolic Jacobians. Can be used only with postOptModules: generateSymbolicJacobian, generateSymbolicLinearization.
- symjacdumpeqn (default: off)
Dump for debug purpose of symbolic Jacobians. (deactivated now).
- symjacdumpverbose (default: off)
Dumps information in verbose mode about symbolic Jacobians. Can be used only with postOptModules: generateSymbolicJacobian, generateSymbolicLinearization.
- symjacwarnings (default: off)
Prints warnings regarding symoblic jacbians.
- tail (default: off)
Prints out a notification if tail recursion optimization has been applied.
- tearingdump (default: off)
Dumps tearing information.
- tearingdumpV (default: off)
Dumps verbose tearing information.
- totaltearingdump (default: off)
Dumps total tearing information.
- totaltearingdumpV (default: off)
Dumps verbose total tearing information.
- tplPerfTimes (default: off)
Enables output of template performance data for rendering text to file.
- transformsbeforedump (default: off)
Applies transformations required for code generation before dumping flat code.
- types (default: off)
Prints extra failtrace from Types.
- uncertainties (default: off)
Enables dumping of status when calling modelEquationsUC.
- updmod (default: off)
Prints information about modification updates.
- useMPI (default: off)
Add MPI init and finalize to main method (CPPruntime).
- vectorize (default: off)
Activates vectorization in the backend.
- visxml (default: off)
Outputs a xml-file that contains information for visualization.
- warnMinMax (default: on)
Makes a warning assert from min/max variable attributes instead of error.
- warnNoNominal (default: off)
Prints the iteration variables in the initialization and simulation DAE, which do not have a nominal value.
- writeToBuffer (default: off)
Enables writing simulation results to buffer.
- zmqDangerousAcceptConnectionsFromAnywhere (default: off)
When opening a zmq connection, listen on all interfaces instead of only connections from 127.0.0.1.
Flags for Optimization Modules¶
Flags that determine which symbolic methods are used to produce the causalized equation system.
The --preOptModules flag sets the optimization modules which are used before the matching and index reduction in the back end. These modules are specified as a comma-separated list.
The --matchingAlgorithm sets the method that is used for the matching algorithm, after the pre optimization modules.
The --indexReductionMethod sets the method that is used for the index reduction, after the pre optimization modules.
The --initOptModules then sets the optimization modules which are used after the index reduction to optimize the system for initialization, specified as a comma-separated list.
The --postOptModules then sets the optimization modules which are used after the index reduction to optimize the system for simulation, specified as a comma-separated list.