Re: P****enger routing code?
Reply #106 –
Some feedback for r2382 with settings
seperate_halt_capacities = 1
pay_for_total_distance = 1
avoid_overcrowding = 1
no_routing_over_overcrowded = 1
no_routing_over_overcrowded=1 improves the situation a lot, deadlocks are less likely to occur, and can be dealt with easily when they happen; overflowing stops are reduced by much. There are still some things:
1) the capacity limit is not applied for all goods together, but for goods grouped by type and next transfer stop (this behaviour might be limited to goods being released by a connected factory, routed goods might have other behaviour); it may be useful and intended, but it is still quite generous towards the player.
2) For goods, the input behaviour may now switch between full stop and full flow, depending on the state of transfer stops. When releasing goods, it might be a good idea to check for the remaining input storage capacity of the recipient, and limit the good's amount at the origin stop to that remainder, instead of filling it with as much stuff as possible; the same check could be done for transfer stops, to avoid a fast return of the transfer stop to overflowing state, even worse than before. However, if a vehicle is set to full load at the origin stop, this simple mechanism would be byp****ed, to another throttle method would be needed (e.g. control release rate).
3) certain hubs tend to nearly always stay in overflowing state because of 1) and 2) (together with transport delay); instead of yes/no decisions, randomization could be used, with a routing/acceptance probability depending on the grade of over-utilization. (Any call for a random number generator etc. would have to happen outside of the routing code.)
Now after setting avoid_overcrowding to 0 (does this still have an effect anyway?): I still get some instances of the behaviour with this parameter set to 1: goods will not be loaded if the next transfer stop (the only possible one) is full, although the goods have already been released by the factory, and the recipient is not overflowing. So, the check seems to happen not only for the release of goods, but for in-transit routing, too.
I think that the code for no_routing_over_overcrowded is on the way to provide sufficient control against overcrowding, therefore the behaviour set by avoid_overcrowding (don't load if next transfer stop is full) is not necessary.