Opened 11 years ago

Closed 8 years ago

#2698 closed defect (fixed)

EvaluateParameter.evaluateParameters

Reported by: Martin Sjölund Owned by: probably noone
Priority: high Milestone: 1.11.0
Component: Backend Version: trunk
Keywords: Cc: Willi Braun, Lennart Ochel, Adrian Pop, Volker Waurich

Description

evaluateParameters will currently evaluate a b parameter like:

parameter Real a = 0.0;
parameter Real b = a*2 annotation(Evaluate=true);

But a will not be replaced. This makes the backend behave weirdly in some places because b you replace b in equations the code might not be valid unless a is also replaced.

The new errors in https://test.openmodelica.org/hudson/view/Library%20Testing/job/Annex60_Compilation/229/ depends on this. And possibly if a would be evaluated here we can go back to not evaluating protected parameters by default (which causes the problems in Annex60).

Change History (10)

comment:1 by Lennart Ochel, 11 years ago

Cc: Volker Waurich added

comment:2 by Lennart Ochel, 11 years ago

I discussed it briefly with Volker. If we got it right, it is just needed to mark all parameters as final, of which depend any of the final parameters. This could be done in the front end module DAEUtil.makeEvaluatedParamFinal.

BTW: Why is this a front end module? Shouldn’t it work on the back end types?

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

That one is for structural parameters evaluated in the front-end. It is a front-end thing.

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

Milestone: 1.9.11.9.2

This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).

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

Milestone: 1.9.21.9.3

Milestone changed to 1.9.3 since 1.9.2 was released.

comment:6 by Martin Sjölund, 9 years ago

Milestone: 1.9.31.9.4

Moved to new milestone 1.9.4

comment:7 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.5

Milestone pushed to 1.9.5

comment:8 by Martin Sjölund, 9 years ago

Milestone: 1.9.51.10.0

Milestone renamed

comment:9 by Martin Sjölund, 8 years ago

Milestone: 1.10.01.11.0

Ticket retargeted after milestone closed

comment:10 by Patrick Täuber, 8 years ago

Resolution: fixed
Status: newclosed

This should be fixed since the new parameter handling (2c1a8a1).

Note: See TracTickets for help on using tickets.