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 , 11 years ago
Cc: | added |
---|
comment:2 by , 11 years ago
comment:3 by , 11 years ago
That one is for structural parameters evaluated in the front-end. It is a front-end thing.
comment:4 by , 10 years ago
Milestone: | 1.9.1 → 1.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 , 10 years ago
Milestone: | 1.9.2 → 1.9.3 |
---|
Milestone changed to 1.9.3 since 1.9.2 was released.
comment:10 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This should be fixed since the new parameter handling (2c1a8a1).
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?