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

Help with override to change guess values (as with a .mos in Dymola)

Help with override to change guess values (as with a .mos in Dymola)

Hello,

I am new with OpenModelica (I am more used to Dymola) and my models use to need help at initializing.
In Dymola, I provide the proper initial variables values after compilation through a .mos file.
I understood that I can do more or less the same thanks to the overrideFile flag. I then tested it in cmd (Windows), starting from a quite simple example.
As stated by the log (but also by the log of OMEdit) "controlValve.C1.P" is an iteration variable of my model:

------------------------------------------------------
############ Solve nonlinear system 78 at time 0 ############
initial variable values:
[…]
[10]              controlValve.C1.P  =         20000000                nom =           100000
[…]
------------------------------------------------------

So I tried to set a differrent initial value for this variable: let's say using"-override=controlValve.C1.P=2500".     
But I got the following message (and no change of the initial value):

------------------------------------------------------
It is not possible to override the following quantity: controlValve.C1.P
It seems to be structural, final, protected or evaluated or has a non-constant binding.
------------------------------------------------------

Any help would be appreciated.
Thanks!

Re: Help with override to change guess values (as with a .mos in Dymola)

Did you by any chance have "Evaluate all parameters" checked in OMEdit->Tools->Option->Simulation?

What variability has component "controlValve.C1.P"? Is it parameter, constant or variable?

Re: Help with override to change guess values (as with a .mos in Dymola)

Thanks for replying.
controlValve.C1.P is a variable.
I will check the 'Evaluate all parameters' option but it should have no impact on the iteration variables, am I wrong?

Re: Help with override to change guess values (as with a .mos in Dymola)

For information, "Evaluate all parameters" is not checked.
Someone has any suggestion?

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