First, why do I have to repeat myself again? Post a savegame. Always. Come on, it can't be that hard!el koeno wrote:This might seem silly; but I have to admit that after playing this patch since the first (working) binary got posted here, I still do not fully understand how cargo/passengers are routed.Suppose there's ship between two stations, and a metro/rail connection (requiring transfering from the metro to the train). This is an actual situation in my game. But I have no clue how the passengers choose which option to take...
I do get that capacity matters, but what if capacity is equal? Or the slowest, most inconvenient option has the highest capacity?
In the first pass the shortest routes are saturated up to the percentage given in the option "saturation of short paths". The length of a path is the sum of the manhattan distances between the stations it visits plus one for each hop. The absolutely shortest path is saturated up to that percentage first, then the second shortest one and so on until all paths are saturated (up to the given percentage) or no demand is left. The very shortest path in your game is probably the ship as I guess it has no other stops in between.
In the second pass the paths with most capacity left are saturated in turn. I guess after the first pass more capacity is left on the train route than on the ship route. So first the train route is saturated until less capacity is left there than on the ship route. Then the ship route gets more flow assigned, then the train route again and so on until all demand is used up. The result is what you see in the "planned" view. Cargo is always sent along the most undersupplied link, which is the one where (planned - sent) is greatest. After sending cargo "sent" is increased accordingly. "sent" is also subject to the moving average calculation so it won't grow infinitely.