Thanks so much for your help! Those functions make sense and should solve my issue.
On 18 April 2014 22:53, Michael Behrisch <[email protected]>wrote: > Hi Kara, > probably the best candidate is traci.lane.getLinks which gives you a > list of links to other lanes for a given lane id, in addition you need > to check whether your vehicle is allowed on both lanes using > traci.lane.getAllowed, for details on both functions see > http://sumo-sim.org/pydoc/traci.lane.html > > Best regards, > Michael > > Am 18.04.2014 09:52, schrieb Kara Micallef: > > Hi all, > > > > I am trying to check through TraCI whether two edges are connected to > each > > other. I was using the junction to check this. I.e. I was assuming that > if > > edgeB is in the list edgeA.getToNode().getOutgoing() then from edgeA you > > can go to edgeB. This works most of the time, except where there are > > connections which don't allow all outgoing edges to be reached from all > > incoming edges. In this case I would get a 'true' (edgeA and B are > > connected) when in reality though they have a common junction you cannot > > reach it. > > > > I have since tried to use the object in connection.py, but haven't > managed > > and found the routecheck.py but I want to check from within traci while > > running the simulation. I've also tried out the node.forbids() function, > > but could not find the definition for a link anywhere so I'm getting > > 'AttributeError: Lane instance has no attribute '__getitem__' ' (not even > > sure it does what I want). > > > > Any help on how to check if it is permissible for a vehicle on edge A to > go > > to edge B is greatly appreciated. > > > > Thanks and good day, > > Kara > > > ------------------------------------------------------------------------------ > > Learn Graph Databases - Download FREE O'Reilly Book > > "Graph Databases" is the definitive new guide to graph databases and > their > > applications. Written by three acclaimed leaders in the field, > > this first edition is now available. Download your free book today! > > http://p.sf.net/sfu/NeoTech > > _______________________________________________ > > sumo-user mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/sumo-user > > > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > sumo-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/sumo-user > ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ sumo-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sumo-user
