matsim-org / matsim-code-examples

A repository containing code examples around MATSim
GNU General Public License v3.0
81 stars 178 forks source link

Many agent cannot reach their destination. #659

Open rara1484 opened 2 years ago

rara1484 commented 2 years ago

Hello.

I am running a simulation of a self-driving cab in Tokyo. The number of agents is 200000 and the number of cabs is 15000. I have also set the appropriate scale parameters for road capacity. The simulation without self-driving cabs was executed without any problems, but the simulation with self-driving cabs encountered a problem. The problem was that a large number of agents could not reach their destinations. Not only the cab users, but also many agents using private cars, bicycles, and walking could not reach their destinations. Since all these four means of transportation use the network to travel, it is believed that the traffic congestion caused by the self-driving cabs is a result of this. However, it is unusual for many agents to be unable to complete their morning journeys until the evening. Therefore, we believe that there is a cause other than traffic congestion, but we do not know the cause. If anyone knows how to address the cause of this problem, please let me know the solution.

Also, a question about the network. In reality, even if there is a traffic jam, people on bicycles and on foot are supposed to be able to move smoothly. But in this simulation, people on foot and bicycles travel on the same network as cars, so people on foot and bicycles also get stuck in traffic jams. I am thinking that only walking and bicycles can be teleported according to the network distance. However, I don't know how to do that. If anyone knows how to solve this problem, please let me know.

Thank you.

balacmi commented 2 years ago

Hi @rara1484 ,

To answer your first question it would be great if you could share your log file as a starting point.

For your second question. If you want to teleport bike and walk according to the network distance , you need to remove walk and bike from mainMode param in the qsim module in your config file. However, like this bike and walk will still use the maximum speeds of the links. To avoid this you would need to add information of the cycling and walking speeds in a vehicles file. You can do that in a following way:

<module name="vehicles" > <param name="vehiclesFile" value="path-to-vehicles-file" /> </module>

I hope this will help.

rara1484 commented 2 years ago

@balacmi Thank you very much.

  • in the config file, in the qsim module put param vehiclesSource to fromVehiclesData; this will tell qsim to look for the vehicles file below where the information on the speeds is located

I will try to improve the config qsim, as I had already adopted this approach.

I will also attach a configure file of the process so you can see it. I cannot attach a log file because of too much size.

The figure below shows the status of the cab at the 13th attempt and leg histogram of 13th. Many of the cabs are EMPTY, even though few plans have been executed. Do not worry about quick leaving work at 18:00:00 because I focus on the Change in travel during commute.

config.txt 13 taxi_status_time_profiles_taxi_Line

13 legHistogram_all

michalmac commented 2 years ago

Thanks for sharing the output. What I see is:

It would be helpful if you could share your config file and the output logs.

Many of the cabs are EMPTY, even though few plans have been executed.

EMPTY_DRIVE means driving empty to pickup the next customer. Idle vehicles are marked as "STAY" (i.e. stay task). But looking at the first chart - all vehicles are busy from 7:30 to 22:00

michalmac commented 2 years ago

I just noticed you have uploaded the config file.

rara1484 commented 2 years ago

@balacmi and @michalmac ,Thank you for your kind.

After making the following changes, I had a problem.

you need to remove walk and bike from mainMode param in the qsim module in your config file. However, like this bike and walk will still use the maximum speeds of the links. To avoid this you would need to add information of the cycling and walking speeds in a vehicles file. You can do that in a following way:

in the config file, in the qsim module put param vehiclesSource to fromVehiclesData; this will tell qsim to look for the vehicles file below where the information on the speeds is located in the config file in the vehicle module, put the path to the vehiclesFIle that you will generate; like this:

first problem is that simulation cannot run because of following error.

Could not retrieve vehicle id from person: 1 for mode: car.

This problem is solved by changing vehiclesSorce from fromVehiclesData to modeVehicleTypesFromVehiclesData.

However, this approach meant that bicycle and walking had to move at the maximum speed of the road.

It seems that maximumVelocity in vehicle file is applied if we do not include a mode in the mainMode of qsim.

Please let me know about these solutions.

@michalmac When I changed two scale factors, The problem of spending too much time was solved. I mean, this could be caused by a traffic jam. Thank you for your great advice.