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 )
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)
Change History (5)
follow-up: 3 comment:1 by , 5 years ago
comment:2 by , 5 years ago
Description: | modified (diff) |
---|
comment:3 by , 5 years ago
Milestone: | 1.16.0 → 2.0.0 |
---|---|
Summary: | Cannot input parameters in models using OMEdit → Cannot input parameters redefined in child models using OMEdit |
Replying to adeas31:
These are two different
UStart
parameters, one is defined inPowerGrids.Electrical.Buses.ReferenceBus
and the other inPowerGrids.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 , 5 years ago
Attachment: | TestIdentical.mo added |
---|
These are two different
UStart
parameters, one is defined inPowerGrids.Electrical.Buses.ReferenceBus
and the other inPowerGrids.Electrical.BaseClasses.OnePortAC
which is an extends class of the former.This can only happen if you loaded the library as system library.