[sumo-user] some questions about rerouting in SUMO

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

[sumo-user] some questions about rerouting in SUMO

Jane Cheung
Dear all, 
I have defined the configuration in .sumocfg as below:


<routing>
        <device.rerouting.probability value="-1"/>
        <device.rerouting.period value="300"/>
        <device.rerouting.pre-period value="300"/>
    </routing>

(1)
my question is 
 "-1'' means no vehicles in my simulation could change their route after departing? Does it mean the other two commands are useless with <device.rerouting?probability value="-1"/> ?
If I set the <device.rerouting.probability value="1"/>,   all the vehicles could change their route to the faster in every 300s?

(2)
If my simuation duration is 3600s(1h) and I set the
                    <device.rerouting.probability value="1"/>,    
                   <device.rerouting.period value="75000000000000000"/>  
                   <device.rerouting.pre-period value=" 75000000000000000 "/>  
all the vehicles can change to the fastest route and would not change to the fastest one in my simulation as I had set the rerouting period is  75000000000000000? And vehicles could change to the fastest route when currenttime = 75000000000000001 if I had set the <end valute= "75000000000000001">?


(3) 
if my simulation period is 3600, and the pre-period rerouting value was set to   <device.rerouting.pre-period value="300"/>
<device.rerouting.period value="75000000000000000"/>   
 all the vehicles will be loaded in my simulation would check the fastest route for themself every 300s before departure? The lastest fastest route of one vehicle will be chosen as its route during the whole simulation and would not change their route during the simulation as I set the  <device.rerouting.period value="75000000000000000"/>   ?


(4)  
if I  set the rerouting command as 
  <routing>
        <device.rerouting.probability value="1"/>
        <device.rerouting.period value="300"/>
        <device.rerouting.pre-period value="300"/>
    </routing> 
 
What‘s the difference betwwen using  <route-files value="cross0.trips.xml"/> (1.sumocfg)and  <route-files value="cross0.route.xml"/>( 2.sumocfg   )

the mean travel time in 1.sumocfg is shorter than 2.sumocfg. 
So, why mean travel time is shorter in 1.sumocfg? how do vehicles in 1.sumocfg decide the route? And which route one vehicle would choose before it is going to depart?


Best regard,

Jane Cheung








_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] some questions about rerouting in SUMO

Jakob Erdmann
1) Mostly yes. Normal vehicles will not perform rerouting when probabiliy is <= 0 (all of them will do if probability=1). However, trips implicitly receive the routing device because they must compute their initial route and then the other options also apply to them by default. If you set the probability option explicitly to a value in [0,1], the given fraction of trips will perform periodic rerouting.

2) all vehicles will reroute once when entering the simulation (pre-insertion rerouting uses the departure as the first routing time)  but no further rerouting takes place due to the high period

3) yes.

4) this finding surprises me a little and does not match my own test results. Feel free to share a *small* scenario that shows the difference.

regards,
Jakob

Am Mi., 2. Sept. 2020 um 08:30 Uhr schrieb Jane Cheung <[hidden email]>:
Dear all, 
I have defined the configuration in .sumocfg as below:


<routing>
        <device.rerouting.probability value="-1"/>
        <device.rerouting.period value="300"/>
        <device.rerouting.pre-period value="300"/>
    </routing>

(1)
my question is 
 "-1'' means no vehicles in my simulation could change their route after departing? Does it mean the other two commands are useless with <device.rerouting?probability value="-1"/> ?
If I set the <device.rerouting.probability value="1"/>,   all the vehicles could change their route to the faster in every 300s?

(2)
If my simuation duration is 3600s(1h) and I set the
                    <device.rerouting.probability value="1"/>,    
                   <device.rerouting.period value="75000000000000000"/>  
                   <device.rerouting.pre-period value=" 75000000000000000 "/>  
all the vehicles can change to the fastest route and would not change to the fastest one in my simulation as I had set the rerouting period is  75000000000000000? And vehicles could change to the fastest route when currenttime = 75000000000000001 if I had set the <end valute= "75000000000000001">?


(3) 
if my simulation period is 3600, and the pre-period rerouting value was set to   <device.rerouting.pre-period value="300"/>
<device.rerouting.period value="75000000000000000"/>   
 all the vehicles will be loaded in my simulation would check the fastest route for themself every 300s before departure? The lastest fastest route of one vehicle will be chosen as its route during the whole simulation and would not change their route during the simulation as I set the  <device.rerouting.period value="75000000000000000"/>   ?


(4)  
if I  set the rerouting command as 
  <routing>
        <device.rerouting.probability value="1"/>
        <device.rerouting.period value="300"/>
        <device.rerouting.pre-period value="300"/>
    </routing> 
 
What‘s the difference betwwen using  <route-files value="cross0.trips.xml"/> (1.sumocfg)and  <route-files value="cross0.route.xml"/>( 2.sumocfg   )

the mean travel time in 1.sumocfg is shorter than 2.sumocfg. 
So, why mean travel time is shorter in 1.sumocfg? how do vehicles in 1.sumocfg decide the route? And which route one vehicle would choose before it is going to depart?


Best regard,

Jane Cheung







_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] some questions about rerouting in SUMO

Jane Cheung

Jakob,

Thanks for your reply.

 More questions about the previous email.

1) the probability could be set in the range of (0,1], and <00 value means normal vehicles will not perform rerouting. 

  • What kind of vehicle is not the normal vehicle?  The the only scenario I know is to use Traci to reroute in the simulation.
  • If I set  <device.rerouting.probability value="0.5"/> and the s log.txt is printed as below:

 

Performance:

 Duration: 297822ms

 Real time factor: 18.1316

 UPS: 32080.783152

Vehicles:

 Inserted: 14158 (Loaded: 17538)

 Running: 2061

 Waiting: 3356

 

Does it mean SUMO would choose 50% of vehicles to have the ability of rerouting?  

  • The vehicles are in terms of the inserted vehicles(14158) or the loaded ones(17538)
  • How does SUMO decide which vehicle can reroute?
  • For example, edge A1B1 and edge B1A1  are 100m, the number of vehicles on edgeA1B1 is 18(edge A1B1 most in congestion), the number of vehicles on edge B1A1  is 6. The Sumo would choose 10 vehicles among  20 vehicles on edge A1B1 and 3 vehicles among 6 vehicles on edgeB1A1. Is that right? Obviously, traffic conditions in the two edges are different. Edge A1B1 is mostly in congestion, and vehicles on edge B1A1 can run in free-flow speed. More rerouting devices are assigned to vehicles on edge A1B1 might be a better choice. Could SUMO assign rerouting devices like that, or SUMO uses other more realistic strategies to choose which vehicle can reroute?
  • As explained in    https://sumo.dlr.de/docs/Simulation/Output.html#timing_data
  • How to let output printed the total time spend routing and average time per routing call?
  • According to your experience, the suitable frequency of calling rerouting is?

 

 

2) as you explained in 2),all vehicles   <route-files value="casemy.trips.xml"/>when entering the simulation (pre-insertion rerouting uses the departure as the first routing time)  but no further rerouting takes place due to the high period.

In my understanding,

  • if I use the trips   <route-files value="casemy.trips.xml"/> in .sumocfg file, the “reroute once” means route or generating the route    file firstly for inserted vehicles to let vehicles know edges they are scheduled to drive, and then, during the simulation the inserted vehicle will not reroute due to the high period;
  • if I have the trips file, how could I generate the route file randomly?
  • if I use the routes   <route-files value="casemy.rou.xml"/> in .sumocfg file, the “reroute once”  means reroute. In other words, SUMO will assign the fastest routes to all inserted vehicles according to the traffic condition at the inserted time point of vehicles.
  • Which algorithm does SUMO use to find the fastest routes when vehicles are going to enter into the simulation? The user equilibrium model, such as call duarouter.exe run in 50 interaction or other ones?

Appreciated in advance!

Best regards,

Jane Cheung


_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] some questions about rerouting in SUMO_rerouting algorithm & their relationship

Jane Cheung
In reply to this post by Jane Cheung
Jakob,
Thanks for your reply!

Based on your reply I read the document to find a way to generate rou.xml from trips.xml
( https://sumo.dlr.de/docs/duarouter.html). The document suggests to use the duarouter.exe to do what I want, and I also found tools ( https://sumo.dlr.de/docs/Tools/Assign.html ) can also be used as alternative methods to generate rou.xml.

Then, I have a little confusion about the relationship between duarouter.exedua-iterate.py and on-shot.py

1) the relationship between duarouter.exe and dua-Iterate.py
The relationship in my understanding is illustrated below:

image.png
Assume the simulation begin--time is  0 and end-time is 3600.
Duarouter.exe will use the travel time of each edge (free-flow speed) as the effort or weight in the shortest route algorithm to generate pre-defined routes for vehicles before begin-time=0, and routes would not be updated during the simulation period(=3600s)。Actual trave time of edges would be generated as the results. When calling dua-iterate.py, duarouter.exe will run as the sub-function to generate the actual travel time of each edge, and next iteration of dua-Iterate.py will run shortest route algorithm using the generated travel time.

 2) the relationship between dua-Iterate.py  and one-shot.py
The travel time of each edge is updated after simulation in dua-Iterate.py,but updated in simulation in each given travel-time updating interval in one-shot.py as shown below


image.png


Appreciated your help to correct my wrong understanding and looking forward to your reply.
Best,
Jane

On Wed, Sep 2, 2020 at 2:29 PM Jane Cheung <[hidden email]> wrote:
Dear all, 
I have defined the configuration in .sumocfg as below:


<routing>
        <device.rerouting.probability value="-1"/>
        <device.rerouting.period value="300"/>
        <device.rerouting.pre-period value="300"/>
    </routing>

(1)
my question is 
 "-1'' means no vehicles in my simulation could change their route after departing? Does it mean the other two commands are useless with <device.rerouting?probability value="-1"/> ?
If I set the <device.rerouting.probability value="1"/>,   all the vehicles could change their route to the faster in every 300s?

(2)
If my simuation duration is 3600s(1h) and I set the
                    <device.rerouting.probability value="1"/>,    
                   <device.rerouting.period value="75000000000000000"/>  
                   <device.rerouting.pre-period value=" 75000000000000000 "/>  
all the vehicles can change to the fastest route and would not change to the fastest one in my simulation as I had set the rerouting period is  75000000000000000? And vehicles could change to the fastest route when currenttime = 75000000000000001 if I had set the <end valute= "75000000000000001">?


(3) 
if my simulation period is 3600, and the pre-period rerouting value was set to   <device.rerouting.pre-period value="300"/>
<device.rerouting.period value="75000000000000000"/>   
 all the vehicles will be loaded in my simulation would check the fastest route for themself every 300s before departure? The lastest fastest route of one vehicle will be chosen as its route during the whole simulation and would not change their route during the simulation as I set the  <device.rerouting.period value="75000000000000000"/>   ?


(4)  
if I  set the rerouting command as 
  <routing>
        <device.rerouting.probability value="1"/>
        <device.rerouting.period value="300"/>
        <device.rerouting.pre-period value="300"/>
    </routing> 
 
What‘s the difference betwwen using  <route-files value="cross0.trips.xml"/> (1.sumocfg)and  <route-files value="cross0.route.xml"/>( 2.sumocfg   )

the mean travel time in 1.sumocfg is shorter than 2.sumocfg. 
So, why mean travel time is shorter in 1.sumocfg? how do vehicles in 1.sumocfg decide the route? And which route one vehicle would choose before it is going to depart?


Best regard,

Jane Cheung



_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] some questions about rerouting in SUMO

Jakob Erdmann
In reply to this post by Jane Cheung
1) "normal" vehicle was meant in contrast to trips (which already imply some routing)
2) random roll of the dice (unrelated to traffic situation). Think of this as the set of vehicles equipped with a live-traffic route finding software
3) option --verbose
4) it depends. We often use 300s in our projects
5) duarouter -r trips.xml -o routes.xml --weights.random-factor FLOAT
6) The "current traffic condition" is an average over past traffic states as explained at https://sumo.dlr.de/docs/Demand/Automatic_Routing.html. No equilibrium iteration is done for this.

Am Fr., 4. Sept. 2020 um 05:54 Uhr schrieb Jane Cheung <[hidden email]>:

Jakob,

Thanks for your reply.

 More questions about the previous email.

1) the probability could be set in the range of (0,1], and <00 value means normal vehicles will not perform rerouting. 

  • What kind of vehicle is not the normal vehicle?  The the only scenario I know is to use Traci to reroute in the simulation.
  • If I set  <device.rerouting.probability value="0.5"/> and the s log.txt is printed as below:

 

Performance:

 Duration: 297822ms

 Real time factor: 18.1316

 UPS: 32080.783152

Vehicles:

 Inserted: 14158 (Loaded: 17538)

 Running: 2061

 Waiting: 3356

 

Does it mean SUMO would choose 50% of vehicles to have the ability of rerouting?  

  • The vehicles are in terms of the inserted vehicles(14158) or the loaded ones(17538)
  • How does SUMO decide which vehicle can reroute?
  • For example, edge A1B1 and edge B1A1  are 100m, the number of vehicles on edgeA1B1 is 18(edge A1B1 most in congestion), the number of vehicles on edge B1A1  is 6. The Sumo would choose 10 vehicles among  20 vehicles on edge A1B1 and 3 vehicles among 6 vehicles on edgeB1A1. Is that right? Obviously, traffic conditions in the two edges are different. Edge A1B1 is mostly in congestion, and vehicles on edge B1A1 can run in free-flow speed. More rerouting devices are assigned to vehicles on edge A1B1 might be a better choice. Could SUMO assign rerouting devices like that, or SUMO uses other more realistic strategies to choose which vehicle can reroute?
  • As explained in    https://sumo.dlr.de/docs/Simulation/Output.html#timing_data
  • How to let output printed the total time spend routing and average time per routing call?
  • According to your experience, the suitable frequency of calling rerouting is?

 

 

2) as you explained in 2),all vehicles   <route-files value="casemy.trips.xml"/>when entering the simulation (pre-insertion rerouting uses the departure as the first routing time)  but no further rerouting takes place due to the high period.

In my understanding,

  • if I use the trips   <route-files value="casemy.trips.xml"/> in .sumocfg file, the “reroute once” means route or generating the route    file firstly for inserted vehicles to let vehicles know edges they are scheduled to drive, and then, during the simulation the inserted vehicle will not reroute due to the high period;
  • if I have the trips file, how could I generate the route file randomly?
  • if I use the routes   <route-files value="casemy.rou.xml"/> in .sumocfg file, the “reroute once”  means reroute. In other words, SUMO will assign the fastest routes to all inserted vehicles according to the traffic condition at the inserted time point of vehicles.
  • Which algorithm does SUMO use to find the fastest routes when vehicles are going to enter into the simulation? The user equilibrium model, such as call duarouter.exe run in 50 interaction or other ones?

Appreciated in advance!

Best regards,

Jane Cheung

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

[sumo-user] Trapping routing errors

Richard Tasgal
In reply to this post by Jane Cheung
I'm trying to simulate identical traffic -- trips with the same start and end points, and scheduled to leave at the same time -- across multiple road networks. The road networks are supposed to have identical edges, but the intersections differ from network to network. Every edge should be reachable from every edge, though in some cases the routes may be roundabout due to restrictions on allowed turns, and I'm not sure if the routing algorithm does a complete enough search to always find a valid route.

I'm currently generating the sets of trips using randomTrips.py with one of the network files, and I use the same trips file (start and end edges, not middle) with all of the different network files. Although if I did everything correctly, the trips should be viable for all the different networks, and most trips are OK in all the different networks; but contrary to my expectation, the simulation often stops because it can't find a path between one edge and another edge.

I am using the option --ignore-route-errors which I thought would have let the simulation skip trips that it can't find a route for. However, it's still happening and the whole simulations are stopping. I'm using TraCI to run each step, but I'm not putting in the trips that way, rather I'm using a route file.

I thought about trapping the error in python (try except), but I don't see how to do this using a route file. All I can think of is something that would take considerably more work: obtaining the list of all edges, and choosing start and end points and departure times), adding the trips by using traci.vehicle.add(), and using try: except: on the traci.vehicle.add(). This seems (guessing) like more work than necessary, like I'm overlooking a better solution. 

Any ideas about where I might be going wrong, so I can make corrections more easily?

Rich Tasgal


   

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] Trapping routing errors

Jakob Erdmann
It would help if you posted the error message (using option --log may make it easier to find the error). The message should at least tell you which vehicle / origin-destination is causing the problem.
There are only a few types of errors that cannot be ignored with --ignore-route-errors (i.e. the starting edge is unknown or  has no permissible lane for the vehicle).
For investigating connectivity, see https://sumo.dlr.de/docs/sumo-gui.html#check_connected_components (use this on the from-edge).

Am Mo., 7. Sept. 2020 um 13:47 Uhr schrieb Richard Tasgal <[hidden email]>:
I'm trying to simulate identical traffic -- trips with the same start and end points, and scheduled to leave at the same time -- across multiple road networks. The road networks are supposed to have identical edges, but the intersections differ from network to network. Every edge should be reachable from every edge, though in some cases the routes may be roundabout due to restrictions on allowed turns, and I'm not sure if the routing algorithm does a complete enough search to always find a valid route.

I'm currently generating the sets of trips using randomTrips.py with one of the network files, and I use the same trips file (start and end edges, not middle) with all of the different network files. Although if I did everything correctly, the trips should be viable for all the different networks, and most trips are OK in all the different networks; but contrary to my expectation, the simulation often stops because it can't find a path between one edge and another edge.

I am using the option --ignore-route-errors which I thought would have let the simulation skip trips that it can't find a route for. However, it's still happening and the whole simulations are stopping. I'm using TraCI to run each step, but I'm not putting in the trips that way, rather I'm using a route file.

I thought about trapping the error in python (try except), but I don't see how to do this using a route file. All I can think of is something that would take considerably more work: obtaining the list of all edges, and choosing start and end points and departure times), adding the trips by using traci.vehicle.add(), and using try: except: on the traci.vehicle.add(). This seems (guessing) like more work than necessary, like I'm overlooking a better solution. 

Any ideas about where I might be going wrong, so I can make corrections more easily?

Rich Tasgal


   
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] Trapping routing errors

Richard Tasgal
It might be helpful for me (for comparisons across a more diverse set
of road networks) to be able to ignore a route that has an erroneous
(non-existent) starting or ending edge. No current way to do it when
using a route file? I hope I'm not wasting my time trying to put in
the trips using traci.vehicle.add() and trapping errors in python with
try: except: on that command.

Rich Tasgal

On Mon, Sep 7, 2020 at 3:21 PM Jakob Erdmann <[hidden email]> wrote:

>
> It would help if you posted the error message (using option --log may make it easier to find the error). The message should at least tell you which vehicle / origin-destination is causing the problem.
> There are only a few types of errors that cannot be ignored with --ignore-route-errors (i.e. the starting edge is unknown or  has no permissible lane for the vehicle).
> For investigating connectivity, see https://sumo.dlr.de/docs/sumo-gui.html#check_connected_components (use this on the from-edge).
>
> Am Mo., 7. Sept. 2020 um 13:47 Uhr schrieb Richard Tasgal <[hidden email]>:
>>
>> I'm trying to simulate identical traffic -- trips with the same start and end points, and scheduled to leave at the same time -- across multiple road networks. The road networks are supposed to have identical edges, but the intersections differ from network to network. Every edge should be reachable from every edge, though in some cases the routes may be roundabout due to restrictions on allowed turns, and I'm not sure if the routing algorithm does a complete enough search to always find a valid route.
>>
>> I'm currently generating the sets of trips using randomTrips.py with one of the network files, and I use the same trips file (start and end edges, not middle) with all of the different network files. Although if I did everything correctly, the trips should be viable for all the different networks, and most trips are OK in all the different networks; but contrary to my expectation, the simulation often stops because it can't find a path between one edge and another edge.
>>
>> I am using the option --ignore-route-errors which I thought would have let the simulation skip trips that it can't find a route for. However, it's still happening and the whole simulations are stopping. I'm using TraCI to run each step, but I'm not putting in the trips that way, rather I'm using a route file.
>>
>> I thought about trapping the error in python (try except), but I don't see how to do this using a route file. All I can think of is something that would take considerably more work: obtaining the list of all edges, and choosing start and end points and departure times), adding the trips by using traci.vehicle.add(), and using try: except: on the traci.vehicle.add(). This seems (guessing) like more work than necessary, like I'm overlooking a better solution.
>>
>> Any ideas about where I might be going wrong, so I can make corrections more easily?
>>
>> Rich Tasgal
>>
>>
>>
>> _______________________________________________
>> sumo-user mailing list
>> [hidden email]
>> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
>
> _______________________________________________
> sumo-user mailing list
> [hidden email]
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] Trapping routing errors

Jakob Erdmann
The easier way to perform this filtering is to call
duarouter -r trips.xml --ignore-route-errors --write-trips -o valid.trips.xml
and then only use valid.trips.xml in the simulation.

Am Mo., 7. Sept. 2020 um 15:06 Uhr schrieb Richard Tasgal <[hidden email]>:
It might be helpful for me (for comparisons across a more diverse set
of road networks) to be able to ignore a route that has an erroneous
(non-existent) starting or ending edge. No current way to do it when
using a route file? I hope I'm not wasting my time trying to put in
the trips using traci.vehicle.add() and trapping errors in python with
try: except: on that command.

Rich Tasgal

On Mon, Sep 7, 2020 at 3:21 PM Jakob Erdmann <[hidden email]> wrote:
>
> It would help if you posted the error message (using option --log may make it easier to find the error). The message should at least tell you which vehicle / origin-destination is causing the problem.
> There are only a few types of errors that cannot be ignored with --ignore-route-errors (i.e. the starting edge is unknown or  has no permissible lane for the vehicle).
> For investigating connectivity, see https://sumo.dlr.de/docs/sumo-gui.html#check_connected_components (use this on the from-edge).
>
> Am Mo., 7. Sept. 2020 um 13:47 Uhr schrieb Richard Tasgal <[hidden email]>:
>>
>> I'm trying to simulate identical traffic -- trips with the same start and end points, and scheduled to leave at the same time -- across multiple road networks. The road networks are supposed to have identical edges, but the intersections differ from network to network. Every edge should be reachable from every edge, though in some cases the routes may be roundabout due to restrictions on allowed turns, and I'm not sure if the routing algorithm does a complete enough search to always find a valid route.
>>
>> I'm currently generating the sets of trips using randomTrips.py with one of the network files, and I use the same trips file (start and end edges, not middle) with all of the different network files. Although if I did everything correctly, the trips should be viable for all the different networks, and most trips are OK in all the different networks; but contrary to my expectation, the simulation often stops because it can't find a path between one edge and another edge.
>>
>> I am using the option --ignore-route-errors which I thought would have let the simulation skip trips that it can't find a route for. However, it's still happening and the whole simulations are stopping. I'm using TraCI to run each step, but I'm not putting in the trips that way, rather I'm using a route file.
>>
>> I thought about trapping the error in python (try except), but I don't see how to do this using a route file. All I can think of is something that would take considerably more work: obtaining the list of all edges, and choosing start and end points and departure times), adding the trips by using traci.vehicle.add(), and using try: except: on the traci.vehicle.add(). This seems (guessing) like more work than necessary, like I'm overlooking a better solution.
>>
>> Any ideas about where I might be going wrong, so I can make corrections more easily?
>>
>> Rich Tasgal
>>
>>
>>
>> _______________________________________________
>> sumo-user mailing list
>> [hidden email]
>> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
>
> _______________________________________________
> sumo-user mailing list
> [hidden email]
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] Trapping routing errors

Richard Tasgal
Thanks!

On Mon, Sep 7, 2020 at 4:13 PM Jakob Erdmann <[hidden email]> wrote:

>
> The easier way to perform this filtering is to call
> duarouter -r trips.xml --ignore-route-errors --write-trips -o valid.trips.xml
> and then only use valid.trips.xml in the simulation.
>
> Am Mo., 7. Sept. 2020 um 15:06 Uhr schrieb Richard Tasgal <[hidden email]>:
>>
>> It might be helpful for me (for comparisons across a more diverse set
>> of road networks) to be able to ignore a route that has an erroneous
>> (non-existent) starting or ending edge. No current way to do it when
>> using a route file? I hope I'm not wasting my time trying to put in
>> the trips using traci.vehicle.add() and trapping errors in python with
>> try: except: on that command.
>>
>> Rich Tasgal
>>
>> On Mon, Sep 7, 2020 at 3:21 PM Jakob Erdmann <[hidden email]> wrote:
>> >
>> > It would help if you posted the error message (using option --log may make it easier to find the error). The message should at least tell you which vehicle / origin-destination is causing the problem.
>> > There are only a few types of errors that cannot be ignored with --ignore-route-errors (i.e. the starting edge is unknown or  has no permissible lane for the vehicle).
>> > For investigating connectivity, see https://sumo.dlr.de/docs/sumo-gui.html#check_connected_components (use this on the from-edge).
>> >
>> > Am Mo., 7. Sept. 2020 um 13:47 Uhr schrieb Richard Tasgal <[hidden email]>:
>> >>
>> >> I'm trying to simulate identical traffic -- trips with the same start and end points, and scheduled to leave at the same time -- across multiple road networks. The road networks are supposed to have identical edges, but the intersections differ from network to network. Every edge should be reachable from every edge, though in some cases the routes may be roundabout due to restrictions on allowed turns, and I'm not sure if the routing algorithm does a complete enough search to always find a valid route.
>> >>
>> >> I'm currently generating the sets of trips using randomTrips.py with one of the network files, and I use the same trips file (start and end edges, not middle) with all of the different network files. Although if I did everything correctly, the trips should be viable for all the different networks, and most trips are OK in all the different networks; but contrary to my expectation, the simulation often stops because it can't find a path between one edge and another edge.
>> >>
>> >> I am using the option --ignore-route-errors which I thought would have let the simulation skip trips that it can't find a route for. However, it's still happening and the whole simulations are stopping. I'm using TraCI to run each step, but I'm not putting in the trips that way, rather I'm using a route file.
>> >>
>> >> I thought about trapping the error in python (try except), but I don't see how to do this using a route file. All I can think of is something that would take considerably more work: obtaining the list of all edges, and choosing start and end points and departure times), adding the trips by using traci.vehicle.add(), and using try: except: on the traci.vehicle.add(). This seems (guessing) like more work than necessary, like I'm overlooking a better solution.
>> >>
>> >> Any ideas about where I might be going wrong, so I can make corrections more easily?
>> >>
>> >> Rich Tasgal
>> >>
>> >>
>> >>
>> >> _______________________________________________
>> >> sumo-user mailing list
>> >> [hidden email]
>> >> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
>> >
>> > _______________________________________________
>> > sumo-user mailing list
>> > [hidden email]
>> > To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
>> _______________________________________________
>> sumo-user mailing list
>> [hidden email]
>> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
>
> _______________________________________________
> sumo-user mailing list
> [hidden email]
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] some questions about rerouting in SUMO

Jane Cheung
In reply to this post by Jakob Erdmann
Jakob,
thanks for your reply.
 As described in the document, the function of --weights.random-factor FLOAT  is  "   Edge weights for routing are dynamically  disturbed by a random factor drawn  uniformly from [1,FLOAT)"  
Where could I find some mathematical formulation or the function describe the dynamically disturbed process?  


Best regards,

Jane



On Mon, Sep 7, 2020 at 6:27 PM Jakob Erdmann <[hidden email]> wrote:
1) "normal" vehicle was meant in contrast to trips (which already imply some routing)
2) random roll of the dice (unrelated to traffic situation). Think of this as the set of vehicles equipped with a live-traffic route finding software
3) option --verbose
4) it depends. We often use 300s in our projects
5) duarouter -r trips.xml -o routes.xml --weights.random-factor FLOAT
6) The "current traffic condition" is an average over past traffic states as explained at https://sumo.dlr.de/docs/Demand/Automatic_Routing.html. No equilibrium iteration is done for this.

Am Fr., 4. Sept. 2020 um 05:54 Uhr schrieb Jane Cheung <[hidden email]>:

Jakob,

Thanks for your reply.

 More questions about the previous email.

1) the probability could be set in the range of (0,1], and <00 value means normal vehicles will not perform rerouting. 

  • What kind of vehicle is not the normal vehicle?  The the only scenario I know is to use Traci to reroute in the simulation.
  • If I set  <device.rerouting.probability value="0.5"/> and the s log.txt is printed as below:

 

Performance:

 Duration: 297822ms

 Real time factor: 18.1316

 UPS: 32080.783152

Vehicles:

 Inserted: 14158 (Loaded: 17538)

 Running: 2061

 Waiting: 3356

 

Does it mean SUMO would choose 50% of vehicles to have the ability of rerouting?  

  • The vehicles are in terms of the inserted vehicles(14158) or the loaded ones(17538)
  • How does SUMO decide which vehicle can reroute?
  • For example, edge A1B1 and edge B1A1  are 100m, the number of vehicles on edgeA1B1 is 18(edge A1B1 most in congestion), the number of vehicles on edge B1A1  is 6. The Sumo would choose 10 vehicles among  20 vehicles on edge A1B1 and 3 vehicles among 6 vehicles on edgeB1A1. Is that right? Obviously, traffic conditions in the two edges are different. Edge A1B1 is mostly in congestion, and vehicles on edge B1A1 can run in free-flow speed. More rerouting devices are assigned to vehicles on edge A1B1 might be a better choice. Could SUMO assign rerouting devices like that, or SUMO uses other more realistic strategies to choose which vehicle can reroute?
  • As explained in    https://sumo.dlr.de/docs/Simulation/Output.html#timing_data
  • How to let output printed the total time spend routing and average time per routing call?
  • According to your experience, the suitable frequency of calling rerouting is?

 

 

2) as you explained in 2),all vehicles   <route-files value="casemy.trips.xml"/>when entering the simulation (pre-insertion rerouting uses the departure as the first routing time)  but no further rerouting takes place due to the high period.

In my understanding,

  • if I use the trips   <route-files value="casemy.trips.xml"/> in .sumocfg file, the “reroute once” means route or generating the route    file firstly for inserted vehicles to let vehicles know edges they are scheduled to drive, and then, during the simulation the inserted vehicle will not reroute due to the high period;
  • if I have the trips file, how could I generate the route file randomly?
  • if I use the routes   <route-files value="casemy.rou.xml"/> in .sumocfg file, the “reroute once”  means reroute. In other words, SUMO will assign the fastest routes to all inserted vehicles according to the traffic condition at the inserted time point of vehicles.
  • Which algorithm does SUMO use to find the fastest routes when vehicles are going to enter into the simulation? The user equilibrium model, such as call duarouter.exe run in 50 interaction or other ones?

Appreciated in advance!

Best regards,

Jane Cheung

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] some questions about rerouting in SUMO

Jakob Erdmann

Am Di., 8. Sept. 2020 um 05:40 Uhr schrieb Jane Cheung <[hidden email]>:
Jakob,
thanks for your reply.
 As described in the document, the function of --weights.random-factor FLOAT  is  "   Edge weights for routing are dynamically  disturbed by a random factor drawn  uniformly from [1,FLOAT)"  
Where could I find some mathematical formulation or the function describe the dynamically disturbed process?  


Best regards,

Jane



On Mon, Sep 7, 2020 at 6:27 PM Jakob Erdmann <[hidden email]> wrote:
1) "normal" vehicle was meant in contrast to trips (which already imply some routing)
2) random roll of the dice (unrelated to traffic situation). Think of this as the set of vehicles equipped with a live-traffic route finding software
3) option --verbose
4) it depends. We often use 300s in our projects
5) duarouter -r trips.xml -o routes.xml --weights.random-factor FLOAT
6) The "current traffic condition" is an average over past traffic states as explained at https://sumo.dlr.de/docs/Demand/Automatic_Routing.html. No equilibrium iteration is done for this.

Am Fr., 4. Sept. 2020 um 05:54 Uhr schrieb Jane Cheung <[hidden email]>:

Jakob,

Thanks for your reply.

 More questions about the previous email.

1) the probability could be set in the range of (0,1], and <00 value means normal vehicles will not perform rerouting. 

  • What kind of vehicle is not the normal vehicle?  The the only scenario I know is to use Traci to reroute in the simulation.
  • If I set  <device.rerouting.probability value="0.5"/> and the s log.txt is printed as below:

 

Performance:

 Duration: 297822ms

 Real time factor: 18.1316

 UPS: 32080.783152

Vehicles:

 Inserted: 14158 (Loaded: 17538)

 Running: 2061

 Waiting: 3356

 

Does it mean SUMO would choose 50% of vehicles to have the ability of rerouting?  

  • The vehicles are in terms of the inserted vehicles(14158) or the loaded ones(17538)
  • How does SUMO decide which vehicle can reroute?
  • For example, edge A1B1 and edge B1A1  are 100m, the number of vehicles on edgeA1B1 is 18(edge A1B1 most in congestion), the number of vehicles on edge B1A1  is 6. The Sumo would choose 10 vehicles among  20 vehicles on edge A1B1 and 3 vehicles among 6 vehicles on edgeB1A1. Is that right? Obviously, traffic conditions in the two edges are different. Edge A1B1 is mostly in congestion, and vehicles on edge B1A1 can run in free-flow speed. More rerouting devices are assigned to vehicles on edge A1B1 might be a better choice. Could SUMO assign rerouting devices like that, or SUMO uses other more realistic strategies to choose which vehicle can reroute?
  • As explained in    https://sumo.dlr.de/docs/Simulation/Output.html#timing_data
  • How to let output printed the total time spend routing and average time per routing call?
  • According to your experience, the suitable frequency of calling rerouting is?

 

 

2) as you explained in 2),all vehicles   <route-files value="casemy.trips.xml"/>when entering the simulation (pre-insertion rerouting uses the departure as the first routing time)  but no further rerouting takes place due to the high period.

In my understanding,

  • if I use the trips   <route-files value="casemy.trips.xml"/> in .sumocfg file, the “reroute once” means route or generating the route    file firstly for inserted vehicles to let vehicles know edges they are scheduled to drive, and then, during the simulation the inserted vehicle will not reroute due to the high period;
  • if I have the trips file, how could I generate the route file randomly?
  • if I use the routes   <route-files value="casemy.rou.xml"/> in .sumocfg file, the “reroute once”  means reroute. In other words, SUMO will assign the fastest routes to all inserted vehicles according to the traffic condition at the inserted time point of vehicles.
  • Which algorithm does SUMO use to find the fastest routes when vehicles are going to enter into the simulation? The user equilibrium model, such as call duarouter.exe run in 50 interaction or other ones?

Appreciated in advance!

Best regards,

Jane Cheung

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user