Opened 16 years ago

Last modified 11 years ago

#1074 closed defect (fixed)

Lookup in inherited classes fail (from MathCore)

Reported by: krsta Owned by: krsta
Priority: high Milestone:
Component: Backend Version:
Keywords: Cc: krsta

Description

(May relate to #1483). The following main model does not work (cannot find flange_b.phi):

partial model Base
  extends Modelica.Mechanics.Rotational.Interfaces.Compliant;
  Real x;
end Base;

model Main
  extends Base(x=flange_b.phi);
end Main;

Change History (3)

comment:2 by Martin Sjölund, 14 years ago

This was fixed in trunk:
{{{$ OPENMODELICALIBRARY=/usr/lib/omlibrary/msl221/ omc a.mo Modelica
class Main

Real phi_rel(quantity = "Angle", unit = "rad", displayUnit = "deg", start = 0.0) "Relative rotation angle (= flange_b.phi - flange_a.phi)";
Real tau(quantity = "Torque", unit = "N.m") "Torque between flanges (= flange_b.tau)";
Real flange_a.phi(quantity = "Angle", unit = "rad", displayUnit = "deg") "Absolute rotation angle of flange";
Real flange_a.tau(quantity = "Torque", unit = "N.m") "Cut torque in the flange";
Real flange_b.phi(quantity = "Angle", unit = "rad", displayUnit = "deg") "Absolute rotation angle of flange";
Real flange_b.tau(quantity = "Torque", unit = "N.m") "Cut torque in the flange";
Real x = flange_b.phi;

equation

phi_rel = flange_b.phi - flange_a.phi;
flange_b.tau = tau;
flange_a.tau = -tau;
flange_b.tau = 0.0;
flange_a.tau = 0.0;

end Main;}}}

comment:3 by Adrian Pop, 11 years ago

Cc: krsta, → krsta
Component: Backend

Add an error instead of a warning on missing inner when the outer component type is partial.

Note: See TracTickets for help on using tickets.