Opened 7 years ago

Last modified 3 years ago

#4555 new defect

Redundantly inherited parameters (diamond inheritance) appear multiple times in parameters dialog of instantiated model

Reported by: anonymous Owned by: adeas31
Priority: high Milestone:
Component: OMEdit Version:
Keywords: diamond, inheritance, parameters, dialog Cc:

Description

When a model is built by extending superclasses with diamond inheritance, the resulting model will show multiple instances of the same inherited parameter in its parameters dialog. A minimal working example is shown below. Open the model mwe_duplicate_parameters in OMEdit and open the Parameters dialog of thesubmodel.

model mwe_duplicate_parameters
  model submodel
    extends extendme1;
    extends extendme2;
  end submodel;

  model extendme1
    extends extendme0;
  end extendme1;

  model extendme2
    extends extendme0;
  end extendme2;

  mwe_duplicate_parameters.submodel thesubmodel annotation(
    Placement(
      visible = true, 
      transformation(
        origin = {0, 0}, 
        extent = {{-10, -10}, {10, 10}}, 
        rotation = 0)));

  model extendme0
    parameter Real p;
  end extendme0;

  annotation(
    Icon(coordinateSystem(grid = {1, 1})));
end mwe_duplicate_parameters;

Attachments (2)

diamond_inheritance_duplicate_parameters_in_dialog.png (23.9 KB) - added by anonymous 7 years ago.
Screenshot of OMEdit Parameters dialog for thesubmodel
mwe_duplicate_parameters.mo (618 bytes) - added by anonymous 7 years ago.
Minimal working example that reproduces the redundant parameters dialog lines from diamond-inherited parameters

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by anonymous

Screenshot of OMEdit Parameters dialog for thesubmodel

Changed 7 years ago by anonymous

Minimal working example that reproduces the redundant parameters dialog lines from diamond-inherited parameters

comment:1 Changed 6 years ago by casella

  • Milestone changed from 1.13.0 to 1.14.0

Rescheduled to 1.14.0 after 1.13.0 releasee

comment:2 Changed 5 years ago by casella

  • Milestone changed from 1.14.0 to 1.16.0

Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0

comment:3 Changed 4 years ago by casella

  • Milestone changed from 1.16.0 to 1.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:4 Changed 4 years ago by casella

  • Milestone changed from 1.17.0 to 1.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:5 Changed 3 years ago by casella

  • Milestone 1.18.0 deleted

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.