Opened 5 years ago

Last modified 4 years ago

#5788 new defect

Cannot input parameters redefined in child models using OMEdit

Reported by: casella Owned by: adeas31
Priority: blocker Milestone: 2.0.0
Component: OMEdit Version:
Keywords: Cc:

Description (last modified by 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 casella 4 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 follow-up: Changed 4 years ago by adeas31

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 Changed 4 years ago by casella

  • Description modified (diff)

comment:3 in reply to: ↑ 1 Changed 4 years ago by casella

  • Milestone changed from 1.16.0 to 2.0.0
  • Summary changed from Cannot input parameters in models using OMEdit to Cannot 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.

Changed 4 years ago by casella

comment:4 Changed 4 years ago by casella

See #5981, which is probably closely related

Note: See TracTickets for help on using tickets.