Opened 5 years ago

Last modified 3 years ago

#5629 reopened defect

OMEdit does allow to set connectorSizing parameters in some cases

Reported by: Andrea.bartolini Owned by: Adeel Asghar
Priority: blocker Milestone: 1.19.0
Component: OMEdit Version: v1.14.0-dev-nightly
Keywords: Cc: Francesco Casella

Description

If you instantiate the following block in a model:

Modelica.Blocks.MathBoolean.And

its parameter pop-up in the graphical view does not show the nu parameter, defined in the

Modelica.Blocks.Interfaces.PartialBooleanMISO

interface (used by the And Block).

OMEdit - OpenModelica Connection Editor
Connected to OpenModelica 1.14.0~dev-26688-gbe00c7f
sysop Ubuntu 18.04

Change History (11)

comment:1 by Adeel Asghar, 5 years ago

Resolution: invalid
Status: newclosed

Because it has the connectorSizing annotation and according to the Modelica specification it should not be modified by the user.

comment:2 by Francesco Casella, 5 years ago

Resolution: invalid
Status: closedreopened
Summary: OMEdit does not show the "nu" parameter in the parameters pop-upOMEdit does allow to set connectorSizing parameters in some cases

See #5628, if we bar the user from setting the parameter, then OMEdit should automatically to set it when connecting to a connector array of known size, or ask for the size when conneting to an array with unknown size (e.g., on an expandable connector).

Currently there is no way to handle that situation, except of course manual a-posteriori editing of the textual code, which is a bit ugly.

I would suggest that before we have a final solution, we keep some way to change those parameters, e.g. in a separate tab of the parameter window, with a message such as:

This parameter is automatically updated by OMEdit when connecting connector xxx to scalar connectors. You can modify it manually to handle connections to arrays of connectors properly.

comment:3 by Andrea Bartolini, 5 years ago

Resolution: fixed
Status: reopenedclosed

comment:4 by Francesco Casella, 5 years ago

@Andrea, are you happy with the outcome?

comment:5 by Andrea Bartolini, 5 years ago

Resolution: fixed
Status: closedreopened

It appears flexible and intuitive... nice for me... just a corner case (found today)....

Consider the following model:

model test
  Modelica.Blocks.MathBoolean.And and1(nu = 0)  annotation(
    Placement(visible = true, transformation(origin = {-30, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Blocks.Interfaces.RealInput u[:] annotation(
    Placement(visible = true, transformation(origin = {-150, 20}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-150, 20}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
equation

end test;

in which the size of input u is undefined.

If you connect u to the and1 and you leave [:] in the pop-up window this is what you obtain:

model test
  Modelica.Blocks.MathBoolean.And and1(nu = 1)  annotation(...);
  Modelica.Blocks.Interfaces.RealInput u[:] annotation(...);
equation
  connect(u, and1.u[1]) annotation(...);
end test;

which is wrong....

The right way in this case maybe to alert the user about the impossibility to properly set the nu
parameter....

OMEdit - OpenModelica Connection Editor
Connected to OpenModelica 1.14.0~dev-26758-g8730c27 (last available for Linux distros)

Sysop Ubuntu 18.04


comment:6 by Francesco Casella, 5 years ago

Milestone: 1.14.01.15.0

Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2.

This issue, previously marked as blocker for 1.14.0, is rescheduled to 1.15.0

comment:7 by Francesco Casella, 5 years ago

Milestone: 1.15.01.16.0

Release 1.15.0 was scrapped, because replaceable support eventually turned out to be more easily implemented in 1.16.0. Hence, all 1.15.0 tickets are rescheduled to 1.16.0

comment:8 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:9 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Rescheduled to 1.18.0

comment:10 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

comment:11 by Francesco Casella, 3 years ago

Milestone: 1.19.0

1.18.0 blocker tickets moved to 1.19.0

Note: See TracTickets for help on using tickets.