Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

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).

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).

Re: OMC: simplification of Modelica Model

Let's say we have this kind of model
A=B+C
D=A+B

is the model simplify like that:
D=2*B+C ??

What kind of simplification are made by the compiler? are all equations keep during the simulation?

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).

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

There are 0 guests and 0 other users also viewing this topic
You are here: