Hey Michael - thanks for the suggestion. It does make sense. I was able to update my script to iterate over origins instead of destinations. It works fine for smaller, test samples (100 x 1,000), but won't work on the full run (100 x 55,000). I've tried various destination sizes, and I can get runs of up to 100 x 54,000 to work without issue. Anything more than that, and I get the error:
[INDENT]ERROR 030024: Solve returned a failure.
Failed to execute (Solve).[/INDENT]
The message doesn't specifically say that the error is because I'm running out of memory, but I suspect that may be what's going on. I can get 1 x 55,000 and 50 x 55,000 to run.
For the test sample runs, there doesn't seem to be any difference in speed, but those run so fast that the difference might not be perceptible. Although I can't get an apples-to-apples comparison, the 100 x 54,000 run seems to take about the same amount of time as the 55,000 x 100 run, so I'm not sure if iterating over origins instead of destinations will have a big effect.
Given the explanation of how the solver works in your previous post, one thing I wonder about is whether my hierarchy is accurate. I built my own network (for the city I'm analyzing, the Washington, DC PMSA) from the StreetMaps_NA data and defined my hierarchy based on the ACC field as:
[INDENT]hierarchy_codeblock = """def my_hierarchy(ACC):
if ACC == 1:
return 1
elif ACC == 2:
return 1
elif ACC == 3:
return 2
elif ACC == 4:
return 3
else:
return 0"""[/INDENT]
Is there a better way to do this or can you point me to some documentation on defining a hierarchy using StreetMaps_NA data? The dataset is too large to code the hierarchy by hand.