Comment 11 for bug 1535115

Revision history for this message
king of nowhere (lainluigi86) wrote :

I considered this mosty an ai problem even if it's actually more of a traffic algorithm one because a human can manage traffic and solve those snags when they happen.
yes, stopping primary producers (buildings that produce something without requiring any input) when there are plenty of their wares would certainly reduce the chances of the problem arising. but it would not be a perfect fix, and would not have helped in this case. consider the beginning of the jam, on screenshot 06. this was done entirely with other resources, and then the wine could no longer go anywhere and it piled up for five screens. cutting a few roads there would solve the problem. I'm thinking of a way to let ai recognize that, but without knowing more of the routing algorithm it's hard to say.
Maybe a possibility could be that when a flag has the maximum 8 wares piled up on it, a timer starts, and if none of those wares are moved in the next five minutes, they get deleted. or maybe their destination is changed from the current one to another, and only if five more minutes pass they are deleted. ai could get an additional warning after two minutes where it would attempt to cut some road, which generally helps; a human could get a message that there is a bad traffic jam.
those kind of snags appear if there is a sort of circular block: there are flags A, B and C and all wares on A must go in B and all wares in B must go in C and all wares in C must go in A, and so none of the carriers can bring their ware at the flag and get another. Cutting some roads generally reroute enough of those wares that the problem is solved.