-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider connect sets when conditional component is disabled #2266
Comments
Comment by jmattsson on 25 Sep 2018 09:38 UTC |
Comment by henrikt on 25 Sep 2018 10:58 UTC |
Comment by hansolsson on 25 Sep 2018 11:36 UTC
Currently we (in Dymola and 3D Experience Platform) visually disable connections if either end is disabled, and that is a local check. The proposed change would mean that we need to consider all connections to the same end-point when deciding whether to show each connection. That seems more complicated to implement. (There can also be non-graphical conditional connections, hopefully we can ignore those.) As I see there are two alternatives that could be considered:
In order to evaluate this we would need realistic use-cases. BTW: I assume this is primarily about physical connectors. For causal connectors it seems a bit weird if you remove a source connected two sinks and when removed it introduces a connection between those two sinks. |
Comment by henrikt on 27 Sep 2018 06:12 UTC
I think it is easy to construct a good use cases with Electrical.Analog. Say you create a circuit with a voltage source and two conditional but equal resistors I can see that the suggested style-guide would address the same problem, but I am much in favor of real language support rather than style guides to avoid non-intuitive semantics. |
Comment by henrikt on 27 Sep 2018 06:20 UTC |
Comment by jmattsson on 2 Nov 2018 11:57 UTC Given that, I'd say go with the simpler rule - the one we have currently. The best way to avoid problems with this is probably for tools to give warnings for multiple connections to a conditional connector. |
Poll: Remove double text: Agreement to change by acclamation. |
Closes modelica#2266 (minor part; for the main part it was decided to not make any change).
Reported by henrikt on 6 Sep 2018 12:19 UTC
The current specification (4.4.5, Conditional Component Declaration) says that, when a conditional component is disabled,
Besides stating the rule twice, I feel that the rule doesn't take connect sets into consideration in a natural way; it is counter-intuitive to me that it matters how the connections making up the connect set are made. Instead, I would prefer a rule that only removes the component's connectors from the connect sets they are part of.
For connect sets with only two connectors, this would be the same as the current behavior, but for connect sets with more connectors, this would always leave the other connectors connected, regardless of how the connect set is constructed.
Migrated-From: https://trac.modelica.org/Modelica/ticket/2266
The text was updated successfully, but these errors were encountered: