Opened 5 years ago

Last modified 5 years ago

#5788 new defect

Cannot input parameters redefined in child models using OMEdit

Reported by: Francesco Casella Owned by: Adeel Asghar
Priority: blocker Milestone: 2.0.0
Component: OMEdit Version:
Keywords: Cc:

Description (last modified by Francesco Casella)

Steps to reproduce the issue:

  • open PowerGrids.Examples.IEEE14bus.IEEE14busStaticNetwork
  • double click on bus1
  • the parameter UStart shows up in two separate tabs (General and Initialization
  • if I type in any value for any parameter, the OK button remains greyed out and I cannot input any value

Attachments (1)

TestIdentical.mo (368 bytes ) - added by Francesco Casella 5 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by Adeel Asghar, 5 years ago

the parameter UStart shows up in two separate tabs (General and Initialization

These are two different UStart parameters, one is defined in PowerGrids.Electrical.Buses.ReferenceBus and the other in PowerGrids.Electrical.BaseClasses.OnePortAC which is an extends class of the former.

if I type in any value for any parameter, the OK button remains greyed out and I cannot input any value

This can only happen if you loaded the library as system library.

comment:2 by Francesco Casella, 5 years ago

Description: modified (diff)

in reply to:  1 comment:3 by Francesco Casella, 5 years ago

Milestone: 1.16.02.0.0
Summary: Cannot input parameters in models using OMEditCannot input parameters redefined in child models using OMEdit

Replying to adeas31:

These are two different UStart parameters, one is defined in PowerGrids.Electrical.Buses.ReferenceBus and the other in PowerGrids.Electrical.BaseClasses.OnePortAC which is an extends class of the former.

This was a mistake, we failed to recognize that the parameter was already defined in the base classa and there was no need to define it again in the child class. I will fix the source code so this problem no longer affects the library.

However, this is pattern is allowed by the Modelica Specification, section 5.6.1.4:

At the end, the current instance is checked whether their children (including children of extends-clauses) with the same name are identical and only the first one of them is kept. It is an error if they are not identical.

and should be handled properly. I'll set this as a blocker for 2.0.0, as it is no longer an urgent matter at this moment.

The problem is reproduced in the attached test package, open model S and double-click on m2.

by Francesco Casella, 5 years ago

Attachment: TestIdentical.mo added

comment:4 by Francesco Casella, 5 years ago

See #5981, which is probably closely related

Note: See TracTickets for help on using tickets.