StandardModelingRules judgeConnection returns nondeterministic connection type results for unfinished connections
|Assignee:||Tuukka Lehtonen||% Done:|
|Category:||-||Spent time:||3.00 hours|
|Release notes:||Developers: StandardModelingrules.judgeConnection now returns a deterministic connection type based on alphanumeric connection type name sorting a possibly unfinished connection has multiple possible connection types.|
|Velocity based estimate||-|
|Release||Simantics 1.18.1||Release relationship||Auto|
Connections that are in some contexts considered unfinished, such as connection from a component terminal to a disconnected flag, can currently have a connection type calculated for them in a nondeterministic manner.
We should add a mechanism to make it possible to specify a default connection type for a connection point relation. If the system is otherwise incapable of determining an single unambiguous connection type for a connection, it should use this default connection type if and only if all the connection points in the connection type evaluation agree on the default type.
As a secondary measure, if no default type can be used, StandardModelingRules should make the connection type selection out of the possible alternatives by selecting the connection type with the name that sorts first in ascending lexicographic order.
Added STR.DefaultsToConnectionType to allow determining a default connection type for connection points relations.
Use this in StandardModelingRules and make the ambiguous connection type case type selection deterministic by choosing connection type with the first name in ascending lexicographical order.