Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#6116 closed defect (fixed)

NF includes input records in the variables count

Reported by: Andrea Bartolini Owned by: Per Östlund
Priority: critical Milestone: 2.0.0
Component: New Instantiation Version: v1.16.0-dev
Keywords: Cc: Francesco Casella

Description

Consider the following package (also attached):

package TestInput
  record R1
    Real x;
    Real y;
  end R1;
  
  model M1
    input R1 rec1;
    Real z;  
  equation
    z = time;    
  end M1;
end TestInput;

In the model M1 the record R1 id declared as input, so when I check the model M1 I expect to obtain a balanced model with 1 equation and 1 variable.

Instead of that, this is what I obtain:

Check of TestInput.M1 completed successfully.
Class TestInput.M1 has 1 equation(s) and 3 variable(s).
1 of these are trivial equation(s).

so it seems that the NF includes in the variables count the two variables declared inside the record R1, also if that record is declared as input in the model M1.

OMEdit - OpenModelica Connection Editor
Connected to OpenModelica 1.16.0~dev-624-g08661c9

Sysop: linux Ubuntu 18.04

Attachments (1)

TestInput.mo (165 bytes ) - added by Andrea Bartolini 4 years ago.

Download all attachments as: .zip

Change History (8)

by Andrea Bartolini, 4 years ago

Attachment: TestInput.mo added

comment:1 by Per Östlund, 4 years ago

Resolution: fixed
Status: newclosed

Fixed in ea33c64.

comment:2 by Andrea Bartolini, 4 years ago

I updated my nightly build this morning but the fix seems to be not available yet...

OMEdit - OpenModelica Connection Editor
Connected to OpenModelica 1.16.0~dev-627-ge2dd3e1

in reply to:  2 comment:3 by Per Östlund, 4 years ago

Resolution: fixed
Status: closedreopened

Replying to Andrea.Bartolini:

I updated my nightly build this morning but the fix seems to be not available yet...

OMEdit - OpenModelica Connection Editor
Connected to OpenModelica 1.16.0~dev-627-ge2dd3e1

My apologies, it seems I missed checking the result of checkModel and assumed it worked since the flat model now matches the old frontend. But it doesn't work with the old frontend either, so there's actually an issue with checkModel too.

comment:4 by Per Östlund, 4 years ago

The checkModel issue should now be fixed in 4617b2bd.

comment:5 by Francesco Casella, 4 years ago

@Andrea, please check also on the real application as soon as the nightly is available and close the ticket if everything's ok.

comment:6 by Andrea Bartolini, 4 years ago

Resolution: fixed
Status: reopenedclosed

Successfully tested on both example and real application.

comment:7 by Andrea Bartolini, 4 years ago

Thanks Per!

Note: See TracTickets for help on using tickets.