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

Question about warnings

Question about warnings

Hello all

There are now some new warning messages including OMC parameter "+d=initialization" I would like to understand. Could you analise it?

Code:

Trying to fix over-determined initial system

========================================
Variables (0)
========================================
Equations (1, 1)
========================================
1/1 (1): 10.0 * v1 + 100.0 * v2 = 0.0
State Sets
========================================
no matching
record SimulationResult
...
end SimulationResult;
"Warning: Trying to fix over-determined initial system Variables 0 Equations 1... [not implemented yet!]
Warning: System is over-determined in Equations 1: 10.0 * v1 + 100.0 * v2 = 0.0;
Warning: Iteration variables with default zero start attribute in equation system:
         $DER.v1:DUMMY_DER(fixed = false ) .MyModel, .Real type: Real
"

The model is:

Code:

model MyModel

    constant Real rho = 1000;
    constant Real g = 9.81;
   
    constant Real S1 = 10;
    constant Real S2 = 100;
    constant Real h = 50;
   
    Real m1(fixed = false);
    Real m2(fixed = false);
    Real x1(start = 5, fixed = true);
    Real x2(fixed = false);
    Real v1(start = 0, fixed = true);
    Real v2(start = 0, fixed = true);

equation
    m1 = rho*S1*(h + x1);
    m2 = rho*S2*(h + x2);
    S1*x1 + S2*x2 = 0;
    v1 = der(x1);
    v2 = der(x2);
    v1^2/2 + (h + x1)*(g + der(v1)) = v2^2/2 + (h + x2)*(g + der(v2));
end MyModel;

Re: Question about warnings

I am also seeing:
Translation    14:39:36        0:0-0:0    The initial conditions are not fully specified. Use +d=initialization for more information.

I am not sure, from the warning, where or how to us +d=initialization?  Or how to set initial conditions so this warning going away.  Can anyone offer any guidance?
Does this just mean that some of the variables in my model need start=0.0 (or whatever is an appropriate value?). 

Thanks,

--Adam

Re: Question about warnings

dersh wrote:

I am also seeing:
Translation    14:39:36        0:0-0:0    The initial conditions are not fully specified. Use +d=initialization for more information.

I am not sure, from the warning, where or how to us +d=initialization?  Or how to set initial conditions so this warning going away.  Can anyone offer any guidance?
Does this just mean that some of the variables in my model need start=0.0 (or whatever is an appropriate value?). 

Thanks,

--Adam

Hello dersh

To get the later messages +d=initialization was used.

Probably some "start" or "fixed" conditions are necessary. However I do not know where.

Best regards
Koldo

Re: Question about warnings

I figured out something about that message.  If, in OMEdit, I select Preferences->Simulation I can then put in to OMC Flags:  +d=initialization
Then when I run, it shows the specific variables it is initializing.

There are 0 guests and 0 other users also viewing this topic