Skip to content

faq 310247425

Billy Charlton edited this page Sep 5, 2018 · 2 revisions

scenario freezes (no error) with 16 agents but runs with 15

by Gregory Macfarlane on 2018-08-16 18:57:27


I have a fairly large scenario for the Washington, D.C. metro region. 65,536 highway links in 5 states, etc.

I have two different minimal population files. population_15agents.xml.gz has (as one might expect) 15 agents and population_16agents.xml.gz has 16 agents, both drawn randomly from the same population. I have confirmed that the agent's plans are consistent as far as my model can produce.

If I run the configuration with 15 agents, everything proceeds exactly as I would expect and I can even run it on my laptop. If I run with 16 agents the simulation stops in PersonPrepareForSim without any log or warning, and will hang indefinitely until I kill the process. This happens on my laptop and on a beefy AWS virtual machine.

Here's the log from the 15-agent scenario:

2018-08-16 14:25:08,337  INFO NetworkImpl:163  link # 16384
 2018-08-16 14:25:08,630  INFO NetworkImpl:163  link # 65536
 2018-08-16 14:25:08,693 DEBUG NetworkRoutingProvider:75 requesting network routing module with routingMode=car;	mode=car
 2018-08-16 14:25:08,786 DEBUG NetworkRoutingProvider:75 requesting network routing module with routingMode=car;	mode=car
 .....
 2018-08-16 14:25:09,220  INFO NetworkImpl:426 building QuadTree for nodes: xrange(287594.9188538875,502836.7654349389); yrange(64809.94697203914,261016.29658383696)
 2018-08-16 14:25:09,298  INFO NetworkImpl:435 Building QuadTree took 0.096 seconds.
 2018-08-16 14:25:09,886  INFO Counter:61 [PersonPrepareForSim] handled person # 1
 2018-08-16 14:25:12,529  INFO Counter:61 [PersonPrepareForSim] handled person # 2
 2018-08-16 14:25:12,572  INFO Counter:61 [PersonPrepareForSim] handled person # 4
 2018-08-16 14:25:12,988  INFO Counter:61 [PersonPrepareForSim] handled person # 8
 2018-08-16 14:25:13,274  INFO Counter:67 [PersonPrepareForSim] handled person # 15
 2018-08-16 14:25:13,275  INFO Counter:61  vehicles # 1
 2018-08-16 14:25:13,275  INFO Counter:61  vehicles # 2
 2018-08-16 14:25:13,275  INFO Counter:61  vehicles # 4
 2018-08-16 14:25:13,275  INFO Counter:61  vehicles # 8
 2018-08-16 14:25:13,294  INFO AbstractController:126 ###################################################
 2018-08-16 14:25:13,295  INFO AbstractController:127 ### ITERATION 0 BEGINS

And from the 16-agent one:

2018-08-16 14:25:09,153  INFO NetworkImpl:163  link # 16384
 2018-08-16 14:25:09,768  INFO NetworkImpl:163  link # 65536
 2018-08-16 14:25:09,928 DEBUG NetworkRoutingProvider:75 requesting network routing module with routingMode=car;	mode=car
 2018-08-16 14:25:10,142 DEBUG NetworkRoutingProvider:75 requesting network routing module with routingMode=car;	mode=car
 2018-08-16 14:25:10,171 DEBUG NetworkRoutingProvider:75 requesting network routing module with routingMode=car;	mode=car
 2018-08-16 14:25:10,186 DEBUG NetworkRoutingProvider:75 requesting network routing module with routingMode=car;	mode=car
 2018-08-16 14:25:10,242 DEBUG NetworkRoutingProvider:75 requesting network routing module with routingMode=car;	mode=car
 2018-08-16 14:25:10,283 DEBUG NetworkRoutingProvider:75 requesting network routing module with routingMode=car;	mode=car
 2018-08-16 14:25:10,297 DEBUG NetworkRoutingProvider:75 requesting network routing module with routingMode=car;	mode=car
 2018-08-16 14:25:10,306 DEBUG NetworkRoutingProvider:75 requesting network routing module with routingMode=car;	mode=car
 2018-08-16 14:25:10,315 DEBUG NetworkRoutingProvider:75 requesting network routing module with routingMode=car;	mode=car
 2018-08-16 14:25:10,324 DEBUG NetworkRoutingProvider:75 requesting network routing module with routingMode=car;	mode=car
 2018-08-16 14:25:10,332 DEBUG NetworkRoutingProvider:75 requesting network routing module with routingMode=car;	mode=car
 2018-08-16 14:25:10,398 DEBUG NetworkRoutingProvider:75 requesting network routing module with routingMode=car;	mode=car
 2018-08-16 14:25:10,422 DEBUG NetworkRoutingProvider:75 requesting network routing module with routingMode=car;	mode=car
 2018-08-16 14:25:10,439 DEBUG NetworkRoutingProvider:75 requesting network routing module with routingMode=car;	mode=car
 2018-08-16 14:25:10,479 DEBUG NetworkRoutingProvider:75 requesting network routing module with routingMode=car;	mode=car
 2018-08-16 14:25:10,504 DEBUG NetworkRoutingProvider:75 requesting network routing module with routingMode=car;	mode=car
 2018-08-16 14:25:10,530  INFO NetworkImpl:426 building QuadTree for nodes: xrange(287594.9188538875,502836.7654349389); yrange(64809.94697203914,261016.29658383696)
 2018-08-16 14:25:10,600  INFO NetworkImpl:435 Building QuadTree took 0.087 seconds.
 2018-08-16 14:25:10,620  INFO Counter:61 [PersonPrepareForSim] handled person # 1
 2018-08-16 14:25:10,620  INFO Counter:61 [PersonPrepareForSim] handled person # 2
 2018-08-16 14:25:11,031  INFO Counter:61 [PersonPrepareForSim] handled person # 4
 2018-08-16 14:25:13,877  INFO Counter:61 [PersonPrepareForSim] handled person # 8
 

I have placed the population, network, and configuration files for this runs on Dropbox. The configs can be run from the GUI without modification. As a note, I am able to run this precise config with a full scenario for other cities without modification.


Comments: 1


Re: scenario freezes (no error) with 16 agents but runs with 15

by Kai Nagel on 2018-08-17 07:17:11

So the answer is once more "read the warnings in the logfile" (which I could have done myself). It states at some point

2018-08-17 08:55:59,425 WARN LinkImpl:148 length=0.0 of link id 102924_A may cause problems 2018-08-17 08:55:59,425 WARN LinkImpl:150 Future occurences of this logging statement are suppressed.

There is indeed a link of length zero in your route search, and Dijkstra (or more precisely the path reconstruction after Dijkstra has finished) starts circling on it. I have then set all link length to at least 1 (meter), and the problem goes away. I have now only tested that one route but I would assume that it solves to whole issue.


I can't say what to do about it. We don't want the data model too restrictive, and the Dijkstra algo can actually accept links of length zero (or even negative cost = positive utility) as long as it does not have full circles with this property. On the other hand, this has now cost me 2 hours of debugging time ...

Clone this wiki locally