Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-dev] Appropriate way of creating junctions in a network importer

Hello,
as soon as you declare at least 1 connection for an edge, no further connections will be guessed.
Declaring an edge to be without connections should work by calling addEdge2EdgeConnection(0). This is how
NIXMLConnectionsHandler does it (The flag that prevents guessing in this case is INIT_REJECT_CONNECTIONS).
You should declare your connections using
edge->addLane2LaneConnection(fromLane, to, toLane, NBEdge::L2L_USER, true, mayDefinitelyPass, keepClear, contPos, visibility, speed, customShape))
The defaults for these parameters can be found here: http://sumo.dlr.de/wiki/Networks/PlainXML#Explicitly_setting_which_Edge_.2F_Lane_is_connected_to_which
The assumption is, that the import process is finished before entering NBNetBuilder::compute()

regards,
Jakob

2018-06-22 19:00 GMT+02:00 Mirko Barthauer <m.barthauer@xxxxxxxxxxx>:

Hi SUMO developers,

I have run into some problems with my netconvert extension. Following the instructions at http://sumo.dlr.de/wiki/Developer/How_To/Net_Importer , I have created the NBNode and NBEdge instances from my input format. Afterwards, I'd like to add connections to the junctions. It seems to me they already get created automatically together with the edges.

My question is: How can I add those connections I want (providing a custom shape, too) and leave out the others? And how do these steps like "INIT_REJECT_CONNECTIONS" interfere with the import process?

 Firstly, I used NBEdge::addEdge2EdgeConnection(0) to remove connections, but somehow netconvert didn't like the dummy Connection struct created in this method. What is the advised way here?

Regards
Mirko


_______________________________________________
sumo-dev mailing list
sumo-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-dev



Back to the top