Multi-directional connections; or: How to model electrical wires? [message #1743120] |
Mon, 12 September 2016 07:27  |
Eclipse User |
|
|
|
Hello,
I want to design a schematic editor (for electrical networks) with Sirius.
My model consists of a "Schematic" class which can contain many instances of "Element"s (diodes, resistors etc.). Each "Element" has a number of "Port"s (typically 2, for transistors: 3). Currently I'm investigating how to model the wires connecting the ports of the elements. Each port can be connected to many other ports bi-directional because the electrical current can flow in both directions, too.
My current idea is modelling these connections as a "Wire" class which does not has any target or source but simply "wired ports" (like a multi-directional connection). Unfortunately I didn't found any documentation on how to design a diagram representation for this special use case with Sirius.
Did you have an idea how I can solve this?
Maybe there is already something like a modelling "design pattern" for such cases (wire connections)?
Thank you very much in advance!
Best regards,
Stefan
[Updated on: Mon, 12 September 2016 07:32] by Moderator
|
|
|
|
|
|
Re: Multi-directional connections; or: How to model electrical wires? [message #1743313 is a reply to message #1743137] |
Wed, 14 September 2016 05:30  |
Eclipse User |
|
|
|
It is not possible to have edges with more than 2 ends, sorry.
Depending on your case, there might be a workaround, using the capability for an edge to have either its source or its target (not both) be another edge. It would look like this:
* define a first element-based edge mapping which represent the Wire and connect the first 2 ports;
* define a second edge mapping, this time a reference-based mapping. It source mapping would be the first one above, and its "Target Find Expression" would return all the Wire's ports except for the first two.
This would create an asymetry in how the connections are represented, and added complexity in the associated tools to take it into account.
The only other approach I see would be representing the Wire itself by a node (which could be made very small visually) with oubound connections, but while more symetrical/consistent, visually it may not give the result you're looking for.
Regards,
Pierre-Charles
--
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.03994 seconds