Re: NetRelation inconsistency for specific topology [message #2250 is a reply to message #2232] |
Tue, 17 September 2019 10:31 |
Fabiana Diotallevi
Messages: 21 Registered: October 2018
|
Junior Member |
|
|
Dear Jörg and Christian,
thank you very much for your feedback, the point is clear.
Since we need to export netElements and netRelations Ids from the drawing, we need a rule to automatically assign the Ids. At the same time, for sake of clarity, these Ids have to be "readable" for the user, in order to easily check the correctness of the exported xml file.
After some thoughts on this topic we have internally decided to define the rule that assigns the netRelation Id as follows:
nr_<ne1>_<ne2>_<connectingId>
where <ne1> and <ne2> are the ids of the involved netElements, while <connectingId> id the id of the connecting entity (switch/joint ...).
Therefore, the snippet of the exported railML file related to the attached figure shall be:
<netRelation id="nr_0203_swi01" positionOnA="0" positionOnB="0" navigability="None">
<elementA ref="ne_02"/>
<elementB ref="ne_03"/>
</netRelation>
<netRelation id="nr_0203_swi02" positionOnA="1" positionOnB="1" navigability="None">
<elementA ref="ne_02"/>
<elementB ref="ne_03"/>
</netRelation>
Hope this solution can help also other community members.
f.
|
|
|