- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » OMC: simplification of Modelica Model
OMC: simplification of Modelica Model
OMC: simplification of Modelica Model
When i use OMC without the OpenModelica Plateform, with the +help options, we can see that there is a "noSimplify" option.
With or without this option, i observe that there is no modification in the generated files.. So my question is : what kind of simplication does OMC? Is is only a simplification like A=B, where all B are replace by A or is it more complex?
for example, if A=B+C, is A replaces in all equations by B+C
Re: OMC: simplification of Modelica Model
+noSimplify is a misnomer. The flag disables the most expensive simplifications (which are rare and only sometimes results in better code).
- sjoelund.se
- 1700 Posts
Re: OMC: simplification of Modelica Model
Oh. And simplifications refers to simplifications done within an expression. The optimizations performed on multiple equations are done by the preOpt and postOpt modules (which in turn call simplify a lot, so +noSimplify can have an impact on performance).
- sjoelund.se
- 1700 Posts
Re: OMC: simplification of Modelica Model
You can see all operations performed by the compiler by using the debugger. Translate a model with debug information available (Tools->Options->Simulation->Generate operations). Then either click to always open the transformational debugger, or go to file->open and find the generated ModelName_info.xml and view the transformations performed.
Not all equations are kept, but I would expect in this case the two equations are kept as is since you would anyway need to solve for A in most cases (A output to result-file).
- sjoelund.se
- 1700 Posts
Re: OMC: simplification of Modelica Model
One other question i have about OMC compiler : is it possible to generate C files with a full DAE problem et desactivate all mathematical optimization (like tearing algorithm for example) ?
What i want is a C files which is only the traduction of model from Modelica to C?
Let me know if my question is not enough clear
Re: OMC: simplification of Modelica Model
You can try to disable optimization modules, but the model might not translate if you do:
omc +help=optModules
+preOptModules=
+postOptModules=
+indexReductionMethod=uode
+tearingMethod=noTearing
- sjoelund.se
- 1700 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » OMC: simplification of Modelica Model