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: Adeel Asghar
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)

by anonymous, 7 years ago

Screenshot of OMEdit Parameters dialog for thesubmodel

by anonymous, 7 years ago

Attachment: mwe_duplicate_parameters.mo added

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

comment:1 by Francesco Casella, 6 years ago

Milestone: 1.13.01.14.0

Rescheduled to 1.14.0 after 1.13.0 releasee

comment:2 by Francesco Casella, 5 years ago

Milestone: 1.14.01.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 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:4 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:5 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.