Opened 8 years ago

Closed 10 months ago

#4337 closed defect (fixed)

OMEdit allows invalid connections

Reported by: massimo ceraolo Owned by: Adrian Pop
Priority: high Milestone:
Component: OMEdit Version:
Keywords: Cc: Adeel Asghar

Description (last modified by massimo ceraolo)

1) OMEdit allows two output connectors to be connected to each other. For instance allows to connect the output of two Modelica.Blocks.Source.Constant blocks, which is evidently nonsense.

2) It allows also to connect to each other input connectors, such as the input connectors of two integrator blocks.

Dymola allows 2), but rejects 1).

IMO it would be better to reject both 1) and 2); but at least 1) shouldn't be allowed, as explicitly stated in section 9.3 of specification, fourth-last bullet.

OMEdit v1.12.0-dev-229-g44b8b42 (64-bit)
Connected to v1.12.0-dev-293-gec908e4 (64-bit)

DESCRIPTION EDITED ON 21/03/2020
The situation is even worse than the original description.
It looks like ANY connection is allowed by OMEdit when assembling components in a diagram: a mechanics.rotational flange to an input connector, a mechanics.translational flange into a rotational one, etc. Naturally, these are rare mistakes by a sane user. However, this can occur inadvertently, especially when we have components with different connector types, because of #4645 (and occurs to new users and students).

Change History (19)

comment:1 by massimo ceraolo, 8 years ago

Description: modified (diff)

comment:2 by massimo ceraolo, 8 years ago

Description: modified (diff)

comment:3 by Adeel Asghar, 8 years ago

Cc: Adrian Pop added
Resolution: fixed
Status: newclosed

In order to check the connectors compatibility I need to instantiate the model. We use to do this but not doing it now because of #2450.

I suggest we extend the addConnection API and check in it if the connection is valid and if not then set error message.

comment:4 by Adeel Asghar, 8 years ago

Resolution: fixed
Status: closedreopened

comment:5 by Adrian Pop, 8 years ago

Owner: changed from Adeel Asghar to Adrian Pop
Status: reopenedaccepted

We will do some basic checks in omc when using addConnection.

comment:6 by Adeel Asghar, 8 years ago

Cc: Adeel Asghar added; Adrian Pop removed

comment:7 by massimo ceraolo, 8 years ago

Maybe is not that important for OMEdit to forbid connection of outputs to each other, since it results in an over-determined system, as is clearly stated when checking and running the model.
Thus I will reduce the priority of this ticket.

Last edited 8 years ago by massimo ceraolo (previous) (diff)

comment:8 by massimo ceraolo, 8 years ago

Priority: highnormal

comment:9 by Adeel Asghar, 7 years ago

Milestone: 1.12.01.13.0

comment:10 by Francesco Casella, 7 years ago

See also the discussion in #4551

comment:11 by Francesco Casella, 7 years ago

I think the correctness of connections should be checked by the front-end, before the equations are passed to the backend and found to have structural problems.

The question is if the new front-end is fast enough that we can make this check immediately when the connection is made, or rather only do this at compile time.

I understand that with the current front-end immediate checking is not feasible, since instantiation of Modelica.Fluid connectors just takes forever.

comment:12 by Francesco Casella, 6 years ago

Milestone: 1.13.01.14.0

Rescheduled to 1.14.0 after 1.13.0 releasee

comment:13 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:14 by massimo ceraolo, 5 years ago

Priority: normalhigh

comment:15 by massimo ceraolo, 5 years ago

Description: modified (diff)

comment:16 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:17 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:18 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

comment:19 by massimo ceraolo, 10 months ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.