Opened 10 years ago

Closed 10 years ago

#2841 closed defect (fixed)

Nominal values of iteration variables in non-linear system solvers

Reported by: Lennart Ochel Owned by: Lennart Ochel
Priority: high Milestone: 1.9.1
Component: Run-time Version: trunk
Keywords: Cc: Adrian Pop, Willi Braun

Description (last modified by Lennart Ochel)

The solvers for linear, non-linear and mixed systems are working on wrong variable attributes, e.g. nominal values. This can be investigated using the following model:

   model problem10
     parameter Real xn = 1e5;
     parameter Real yn = 1e-5;
     Real x(start=1.5*xn, nominal=xn);
     Real y(start=1.5*yn, nominal=yn);
   equation
     0 = -(x/xn)*exp(-(x/xn)*(y/yn))-1;
     0 = (y/yn)*exp(-(x/xn)+(y/yn))-1;
   end problem10;

The issue is, that the attributes get copied for the solvers before the parameters are calculated. I already worked out a patch that fixes this problem. Unfortunately, there are models that need to solve non-linear systems (by defect) to evaluate parameters, see #1651. Because cyclic dependencies in parameter bindings is not allowed, that ticket should get fixed first.

Change History (8)

comment:1 by Lennart Ochel, 10 years ago

Description: modified (diff)

comment:2 by Willi Braun, 10 years ago

Cc: Willi Braun added

comment:3 by Martin Sjölund, 10 years ago

Note that cyclic dependencies in parameter equations is allowed in initial equations. Since NLS are allowed, it should be possible to create the nominal attributes on the fly however.

in reply to:  3 ; comment:4 by Lennart Ochel, 10 years ago

Replying to sjoelund.se:

Note that cyclic dependencies in parameter equations is allowed in initial equations. Since NLS are allowed, it should be possible to create the nominal attributes on the fly however.

As far as I know it is not allowed to use parameters with fixed=false as, e.g., nominal attribute. Is that what you mean? Can you please given an example?

comment:5 by Lennart Ochel, 10 years ago

Status: newaccepted
Summary: Nominal values of iteration variables in linear/non-linear/mixed system solversNominal values of iteration variables in non-linear system solvers

BTW: this is only about non-linear systems.

in reply to:  4 comment:6 by Martin Sjölund, 10 years ago

Replying to lochel:

As far as I know it is not allowed to use parameters with fixed=false as, e.g., nominal attribute. Is that what you mean? Can you please given an example?

No, it was just a general comment that parameters need to be able to solve NLS.

comment:7 by Lennart Ochel, 10 years ago

Yes, but that is only true for parameters with fixed=false, right? This is about parameter with binding expressions and those have to be acyclic.

comment:8 by Lennart Ochel, 10 years ago

Resolution: fixed
Status: acceptedclosed

fixed in r22519

Note: See TracTickets for help on using tickets.