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: adrpo Owned by: somebody
Priority: high Milestone: Future
Component: Backend Version: trunk
Keywords: Cc: wbraun, lochel

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 Changed 10 years ago by adrpo

  • Cc wbraun lochel added

comment:2 Changed 10 years ago by adrpo

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

comment:3 Changed 8 years ago by ptaeuber

  • Resolution set to fixed
  • Status changed from new to closed

Fixed since the new parameter handling (2c1a8a1).

Note: See TracTickets for help on using tickets.