Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Error in duarouter

Dear Mirko,

Thanks a lot for your valuable information! I think getReachable(self, source, vclass=None, useIncoming=False) in the reference work.

Best,
Yanglan

On Tue, Oct 17, 2023 at 12:28 AM Mirko Barthauer <m.barthauer@xxxxxxxxxxx> wrote:

Well actually the network can be traversed using sumolib (see reference too). The lane permissions can be read from there, too. I think we just have not created a ready-to-use function to return all reachable edges given a certain vehicle class.

 

Best regards

Mirko

 

 

 

 

-----Original-Nachricht-----

Betreff: Re: [sumo-user] Error in duarouter

Datum: 2023-10-17T02:48:02+0200

Von: "Manuel H. Rosales via sumo-user" <sumo-user@xxxxxxxxxxx>

An: "Yanglan Wang" <yanglan119@xxxxxxxxxxxx>

 

 

 

Dear Yanglan Wang, Then, I think you need to use  networkx from Python.
There is a function connected_components(G) that returns connected components for not directional and directional graphs and you can do
lists of them list(nx.connected_components(G)) With a simple "for" you can check if two edges are in the same connected  component.
Now, you must first convert the .net.xml file to the format of networkx.
I don't know if there exists a conversor but it seems not hard to do it.
Does anybody know if it exists?
Saludos cordiales
Mat. Manuel Hernández Rosales
Secretario Técnico
Programa Universitario de Estudios sobre la Ciudad
Universidad Nacional Autónoma de México
Ciudad de México, México
Whats App: 55 45109057

El lun, 16 oct 2023 a las 18:24, Yanglan Wang (<yanglan119@xxxxxxxxxxxx>) escribió:
Dear Manuel,
 
Sorry for confusing you. 
 
My situation is that I use python to generate some OD edge pairs and then use duarouter to generate routes from origin-edges to destination-edges. But it shows no connection between some edges-A and edges-B. So I want to change OD pairs in python to make sure all edges are reachable.
 
But I don't know which function I can use. And from sumo-gui, we can know whether these edges are reachable by right clicking and "select reachable". Is there any similar functions in python that can help me know whether two edges are reachable? 
 
Thanks in advance for your help!
 
Best,
Yanglan

On Mon, Oct 16, 2023 at 5:05 PM Manuel H. Rosales via sumo-user <sumo-user@xxxxxxxxxxx> wrote:
I don't understand very well your question....
But may be you are searching something like TRACI a lib of Python: https://sumo.dlr.de/pydoc/traci.html
If you want for example to know what are edges in a intermodal route between a initial edge and final edge you can use findIntermodalRoute(self, fromEdge, toEdge, modes='', depart=-1.0, routingMode=0, speed=-1.0, walkFactor=-1.0, departPos=0.0, arrivalPos=-1073741824.0, departPosLat=0.0, pType='', vType='', destStop='')  from https://sumo.dlr.de/pydoc/traci._simulation.html
 
Now if you want to know nodes (edges) adjacency you can use networkx from Python applied to the SUMO Networks
 
Regards
Mat. Manuel Hernández Rosales
Secretario Técnico
Programa Universitario de Estudios sobre la Ciudad
Universidad Nacional Autónoma de México
Ciudad de México, México


El lun, 16 oct 2023 a las 17:52, Yanglan Wang via sumo-user (<sumo-user@xxxxxxxxxxx>) escribió:
Dear Mirko,
 
Maybe you miss my e-mail.

Could you reply to my question:  Is there any function in python or other packages that can provide edge's reachable edges as sumo-gui show?
 
Best,
Yanglan

On Fri, Sep 15, 2023 at 10:00 AM Yanglan Wang <yanglan119@xxxxxxxxxxxx> wrote:
Dear Mirko,
 
This is very helpful! And my new question is do we have any such function in python or other package to provide edge's reachable edges? If we have such function, we can use it to generate valid origin-destination pairs. 
 
Thanks a lot!
 
Best,
Yanglan

On Fri, Sep 15, 2023 at 5:59 AM Mirko Barthauer <m.barthauer@xxxxxxxxxxx> wrote:

Dear Yanglan,

 

all edges along the route have to allow the vehicle in question to pass, not only those where it departs and arrives. You can use a feature of sumo-gui to check where your vehicle can arrive:

  • right click on the start edge to open the context menu
  • choose "select reachable" ...
    • .. and the vehicle class of the problematic vehicle
  • the reachable lanes starting from the start edge are highlighted

 

Best regards

Mirko

 

 

 

-----Original-Nachricht-----

Betreff: [sumo-user] Error in duarouter

Datum: 2023-09-14T08:55:14+0200

Von: "Yanglan Wang via sumo-user" <sumo-user@xxxxxxxxxxx>

An: "sumo-user@xxxxxxxxxxx" <sumo-user@xxxxxxxxxxx>

 

 

 

Dear SUMO,
 
When using duarouter to generate routes from "od.odtrips.xml", it has problem like this:
 
Error: No connection between edge '-12184790' and edge '12182499#5' found.
Error: Mandatory edge '12182499#5' not reachable by vehicle '664'.
Error: The vehicle '664' has no valid route.
Error: No connection between edge '12189756#3' and edge '-12182716#3' found.
Error: Mandatory edge '-12182716#3' not reachable by vehicle '692'.
Error: The vehicle '692' has no valid route.
 
I don't want to use "--ignore-errors" in my situation. 
 
The network is generated by using netconvert from openstreetmap. And I also make sure all start edges and end edges in "od.odtrips.xml"  allow for vehicle type of "passenger".
 
I also check some trip, for example like entry "<trip id="0" depart="3720.0" from="12181485#0" to="59779571#4" fromTaz="4549.0" toTaz="4599.0" departLane="free" departSpeed="max" type="type1"/>". I check the two edges(from and to) in sumo-gui. It seems they are connected and I can find a route between them.
 
My question is: 
what may cause the error like this: "No connection between edge '12189756#3' and edge '-12182716#3' found." if two edges are connected by some routes in sumo-gui. Can duarouter consider the road type? like some roads allow vehicles to pass but others don't allow vehicles to pass? If duarouter already considers different road types, how to use it when using duarouter?
 
Thank you very much for your help!
Yanglan
 
 
"od.odtrips.xml" like this:
 
<?xml version="1.0" encoding="UTF-8"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<vType id="type1" vClass="passenger"/>
<trip id="0" depart="3720.0" from="12181485#0" to="59779571#4" fromTaz="4549.0" toTaz="4549.0" departLane="free" departSpeed="max" type="type1"/>
<trip id="1" depart="3720.0" from="-12178844#2" to="-59779605#0" fromTaz="4549.0" toTaz="4549.0" departLane="free" departSpeed="max" type="type1"/>
<trip id="2" depart="3720.0" from="12180095#0" to="-506804742#1" fromTaz="4549.0" toTaz="4549.0" departLane="free" departSpeed="max" type="type1"/>
 
I want to know what
 
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

 



Back to the top