News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

Change to no_routing_over_overcrowded behaviour

Started by TurfIt, October 08, 2015, 02:18:19 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TurfIt

When using the no_routing_over_overcrowded setting, factories such as pak64's Sawyer which consume and produce the same good category can easily deadlock. I propose changing the behaviour so that the overcrowding status of the destination station is ignored. The avoid_overcrowding setting already works this way.

Also, blocking transfers of all goods in a category when only one is overcrowded doesn't make much sense IMHO. Maybe if the halts capacity applied to the category and not the individual goods... So also proposed is changing the overcrowding status to be per good rather than per category.

Patch attached. Thoughts?

Ters

Quote from: TurfIt on October 08, 2015, 02:18:19 AM
I propose changing the behaviour so that the overcrowding status of the destination station is ignored.

Makes perfect sense. Especially for passengers, that will realistically just leave the station immediately (even if they have to force a path). For goods, Simutrans simply treats it the same way as passengers anyway.

Quote from: TurfIt on October 08, 2015, 02:18:19 AM
Also, blocking transfers of all goods in a category when only one is overcrowded doesn't make much sense IMHO. Maybe if the halts capacity applied to the category and not the individual goods... So also proposed is changing the overcrowding status to be per good rather than per category.

Is the limit which stops producers from delivering cargo to the initial station goods specific? I can't tell for sure if that's what your saying in the second sentence. It only makes sense that the same rules apply to each transfer, as for the initial station. I don't have much opinion on whether this should be per goods or per category, as I rarely have conflicts on category level (at the origin station, and I think also on my few hubs even if I had no_routing_over_overcrowded on). It has also been argued that capacity should be measured against the sum of all goods, but this will likely require capacity adjustments in all pak sets.

Dwachs

The second change makes sense imho.

Just for clarification: The only place I can think of, where in the route searching overcrowded destinations are blocked, is the check (simhalt.cc:1419)

if(  overcrowded_nodes == open_list.get_count()  ) {
// all unexplored routes go over overcrowded stations
return ROUTE_OVERCROWDED;
}

So it terminates early if all nodes in the open list are overcrowded including destinations, which made a big difference on large overcrowded maps. Then thhe point of your change is to prevent that   overcrowded destinations with not overcrowded route are counted towards overcrowded_nodes?  This is fine imho, too.

Dwachs


DrSuperGood

I agree that destinations should be ignored. Overcrowding does not matter at destination since the goods depart on arrival to their final destination.

TurfIt

committed r7628.


Quote from: Ters on October 08, 2015, 04:58:13 AM
Is the limit which stops producers from delivering cargo to the initial station goods specific?

Yes.


Quote from: Ters on October 08, 2015, 04:58:13 AM
It has also been argued that capacity should be measured against the sum of all goods, but this will likely require capacity adjustments in all pak sets.

Something to try someday as an option. The existing capacities are likely fine; Would provide some incentive to use the station extension buildings which are rarely seen...