Home » railML newsgroups » railML.infrastructure » NetRelation inconsistency for specific topology (NetRelations and NetElements problem)
Re: NetRelation inconsistency for specific topology [message #2232 is a reply to message #2222] Mon, 26 August 2019 13:06 Go to previous messageGo to previous message
christian.rahmig is currently offline  christian.rahmig
Messages: 436
Registered: January 2016
Senior Member
Dear Fabiana,

Am 12.07.2019 um 18:24 schrieb Fabiana Diotallevi:
> [...]
> In particular, if we consider the netRelation joining
> netElements ne_02 and ne_03 (upper and lower central
> tracks), both of the following relations could be exported:
>
> <netRelation id="nr_0203" positionOnA="0" positionOnB="0"
> navigability="None">
>                    <elementA ref="ne_02"/>
>                    <elementB ref="ne_03"/>
> </netRelation>
>
> <netRelation id="nr_0203" positionOnA="1" positionOnB="1"
> navigability="None">
>                    <elementA ref="ne_02"/>
>                    <elementB ref="ne_03"/>
> </netRelation>
>
> There is no way to decide which  one is the preferred one,
> and I can't export both of them because they have the same
> id and railML does not allow for a duplicate.
>
> Is there a way to solve this problem?

Yes, there is a way how to solve this problem:

In railML, IDs of elements must be unique (otherwise the parser will
throw an error). Further, an ID must not be used to "carry" information.
The ID must only be used for file internal identification (and
referencing). Thus, the ID "aqwzdq278fcas" is an even better ID than
"nr_0203". However, for purpose of understanding, the Simple Example
uses "readable" ID, but the used ID pattern is not mandatory. So, if I
programmed your exporting interface, I would take IDs based on
incrementing numbers (like a counter). Thus, although both netRelations
would connect the same netElements, they would have different IDs (e.g.
"e316" and "e317").

Best regards
Christian

--
Christian Rahmig - Infrastructure scheme coordinator
railML.org (Registry of Associations: VR 5750)
Phone Coordinator: +49 173 2714509; railML.org: +49 351 47582911
Altplauen 19h; 01187 Dresden; Germany www.railml.org


Christian Rahmig – Infrastructure scheme coordinator
railML.org (Registry of Associations: VR 5750)
Altplauen 19h; 01187 Dresden; Germany www.railML.org
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Proposed Semantic Constraint for <speedChange> in railML 2.x
Next Topic: [railML 3.2] extending the <speedProfile> element
Goto Forum:
  


Current Time: Sat Apr 20 06:56:49 CEST 2024