Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating valid passenger trips in SUMO using od2trips and duarouter #16083

Open
Ammarah-Irum opened this issue Jan 24, 2025 · 16 comments
Open

Creating valid passenger trips in SUMO using od2trips and duarouter #16083

Ammarah-Irum opened this issue Jan 24, 2025 · 16 comments

Comments

@Ammarah-Irum
Copy link

Ammarah-Irum commented Jan 24, 2025

@namdre Hello.
I'm working on SUMO to analyze public demand and offer. I've used od2trips to generate individual passenger trips from an Origin-Destination (OD) matrix of 2 hours period in the morning(7 am-9 am), which gives me around 5000 passenger trips for 2 hour window. However, when I use duarouter to filter out invalid (disconnected) passenger trips, it outputs only 122 passenger trips for 3-minute window (7:00:00 am -7:03:00 am). The duarouter command that I'm using is as follows:

duarouter --net-file center_v2.net.xml --route-files output.odtrips.xml,gtfs_pt_vehicles.add.xml --additional-files gtfs_pt_stops.add.xml,pt_vtypes.xml --output-file duarouter.rou.xml --persontrip.walk-opposite-factor 0 --repair true --human-readable-time true -v -b 25200 -e 32400

Kindly suggest me a solution to get individual passenger routes also for 2-hours period. Thanks.

@m-kro
Copy link
Contributor

m-kro commented Jan 24, 2025

Did you check if the public transport schedule contains enough opportunities to reach the respective destinations? Is there a special reason for --persontrip.walk-opposite-factor 0?

@Ammarah-Irum
Copy link
Author

The public transport schedule that I use is GTFS, and it gives the detailed bus trips. The reason to use --persontrip.walk-opposite-factor 0 is that it reduces the person jamming and transport to wrong destinations.

@namdre
Copy link
Contributor

namdre commented Jan 24, 2025

Please add duarouter option --log log.txt and attach the generated log file to this issue.

@Ammarah-Irum
Copy link
Author

I'm basically using GTFS data for Public Transport (PT) schedules and od2trips with a real demand matrix. I want to understand the connection between PT offer and demand in SUMO. The log file is attached here.

log.txt

@namdre
Copy link
Contributor

namdre commented Jan 24, 2025

There are two issues at play here:

  • the input you give to duarouter only contains 141 (as evidenced by log output DijkstraRouter answered 141 queries)
  • some of your trips are disconnected (Error: No route for trip in person 'pedestrian2051'. Warning: No connection between edge '620127562#1' and edge '1187795312#1' found. ) which leaves you with only 122 valid trips.

Please zip and attach output.odtrips.xml

@Ammarah-Irum
Copy link
Author

Alright. Please find the attached file.

output.odtrips.zip

@namdre
Copy link
Contributor

namdre commented Jan 24, 2025

I can confirm that the input contains 5039 persons. Try running duarouter with option --ignore-errors

@Ammarah-Irum
Copy link
Author

Using the --ignore-errors option, I get the desired results shown below.

Routes found between time steps 07:00:02.83 and 08:59:57.95.
DijkstraRouter answered 5039 queries and explored 38128. 22 edges on average.
DijkstraRouter spent 46.13s answering queries (9.15ms on average).

But the simulation has a lot of persons and vehicle jams, collisions of vehicles and people, emergency braking, etc. I'm attaching the final statistics file for assistance in reducing these problems. I have also attached the image showing an intense jam at a junction. There are jams at other junctions also.

junction_jam.zip
stats.zip

@namdre
Copy link
Contributor

namdre commented Jan 27, 2025

@Ammarah-Irum
Copy link
Author

Thanks @namdre.

@Ammarah-Irum
Copy link
Author

Ammarah-Irum commented Jan 30, 2025

While using netconvert command to get the net file, I'm getting these warnings. What could be the possible way to remove these warnings?
The command I'm using is:
netconvert --osm-files center_v2.osm -o center_v2.net.xml --walkingareas true --crossings.guess true --osm.sidewalks true --junctions.join-same true --tls.join --tls.default-type actuated

netconvert warnings.zip

@m-kro
Copy link
Contributor

m-kro commented Jan 30, 2025

@Ammarah-Irum It is normal to get quite some warnings when importing a big OSM network like those you captured. Many of them are mainly for your information and do not necessarily mean something is wrong. First have a look at the network though to check whether there are major flaws (e.g. complicated intersections).

You may influence netconvert by several switches (e.g. about joining edges) to change the outcome for the better if you have an idea what is not to your liking.

@Ammarah-Irum
Copy link
Author

  1. The log file for netconvert states that:

Summary:
Node type statistics:

Unregulated junctions : 0
Dead-end junctions : 6237
Priority junctions : 5169
Right-before-left junctions : 996
Traffic light junctions : 521
Rail crossing junctions : 123
Network boundaries:
Original boundary : 11.23,43.75,11.27,43.79
Applied offset : -679268.71,-4846932.36
Converted boundary : 0.00,0.00,3797.37,3847.70

I want to know about the dead-end junctions. Are they the problem behind vehicles and person jams/teleports and other problems?

  1. Secondly, I want to ask about the person definitions generated by using od2trips. Many persons walk on roads and block the passage of buses, resulting in the stats (file attached).

stats.zip

@namdre
Copy link
Contributor

namdre commented Jan 31, 2025

  1. Any junctions that are only used by pedestrians (and thus do not have vehicle-connections) are counted as dead-end. In a typical OSM import, this is not a problem.
  2. To avoid improper interaction between pedestrians and cars, make sure that the relevant pedestrian infrastructure is present: https://sumo.dlr.de/docs/Simulation/Pedestrians.html#generating_a_network_with_sidewalks

@Ammarah-Irum
Copy link
Author

I've been able to add sidewalks, but still the problem is there: persons walking on roads and blocking vehicles. Please find attached the video of the simulation for problem reference.

2025-02-03 10-39-35.zip

@namdre
Copy link
Contributor

namdre commented Feb 3, 2025

Please attach your scenario input files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants