Opened 10 years ago

Closed 8 years ago

#2921 closed defect (fixed)

Final parameters that depend on non-final parameters should not be replaced in the front-end or back-end

Reported by: Adrian Pop Owned by: somebody
Priority: high Milestone: Future
Component: Backend Version: trunk
Keywords: Cc: Willi Braun, Lennart Ochel

Description

Here is an example (from BoschRexroth):

model test
  parameter Real c = 2.0;
  final parameter Real a = 2.0*c;
  final parameter Real b = 23.0*c;
  Real y;
equation
y=a*b;
end test;

which after front-end leads to:

class test
  parameter Real c = 2.0;
  final parameter Real a = 2.0 * c;
  final parameter Real b = 23.0 * c;
  Real y;
equation
  y = a * b;
end test;

and after back-end optimizations leads to equation:

y=184.0

The idea would be to not replace final parameters depending on non-final parameters in the back-end so people can still change the non-final parameter and not have to recompile the model.

Change History (3)

comment:1 by Adrian Pop, 10 years ago

Cc: Willi Braun Lennart Ochel added

comment:2 by Adrian Pop, 10 years ago

Added also a Modelica ticket about this m:#1592.

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

Resolution: fixed
Status: newclosed

Fixed since the new parameter handling (2c1a8a1).

Note: See TracTickets for help on using tickets.