Opened 12 years ago

Closed 11 years ago

#1824 closed defect (fixed)

model not knowing inherited global Variables

Reported by: julian.wyszynski Owned by: Per Östlund
Priority: high Milestone: 1.9.1
Component: Frontend Version: trunk
Keywords: Cc:

Description

"Model2" in attached Package is working in Dymola but not in OMShell giving out Error: "Illegal subscript"

Attachments (1)

VariableError.mo (602 bytes ) - added by julian.wyszynski 12 years ago.
Package showing error

Download all attachments as: .zip

Change History (4)

by julian.wyszynski, 12 years ago

Attachment: VariableError.mo added

Package showing error

comment:1 by Martin Sjölund, 12 years ago

Component: BackendFrontend
Owner: changed from somebody to Per Östlund
Status: newassigned

Interestingly, the new instantiation does not handle the redeclare correctly, but the current one does...

$ omc a.mo +i=VariableError.Model2 +d=scodeInst
/home/marsj/dev/trunk/build/bin/omc 1.9.0 Beta1 (r12993)
class Model2
  Real Variable1;
  Real Variable2[1] = 1;
  Real Variable2[2] = 2;
equation
  Variable1 = c[VariableError.Common.int2];
  Variable2[1] = c[1];
  Variable2[2] = c[2];
end Model2;

And if I replace c[int2] with int2, the current instantiation succeeds and gives the correct value...

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

Milestone: 1.9.01.9.1

Postponed until 1.9.1

comment:3 by Per Östlund, 11 years ago

Resolution: fixed
Status: assignedclosed
Version: trunk

This seems to have been fixed some time ago, the model now works correctly.

Note: See TracTickets for help on using tickets.