0ptera / Logistic-Train-Network

Factorio mod adding logistic network for trains.
Other
155 stars 55 forks source link

Rolling 'Limit Trains' configuration after departing station #316

Closed PiggyWhiskey closed 1 year ago

PiggyWhiskey commented 1 year ago

TL;DR Reset LTN stop train limit after trains have departed

What ? Example: Provider with 'Limit Trains' = 2 Requester with 'Limit Trains' = 5 After the trains have departed the provider, allow other trains to be assigned to that station.

Currently the entire route (Including returning to Depot) must be cleared before any more are sent

Basically, stop counting trains 'assigned' to a stop after they departed.

Why ? For large deliveries over long distances (Provider -> Requester, Requester -> Depot) this is a limiting factor. Allowing a rolling system would allow smarter/denser networks.

Players could remove the 'Limit Trains' value, but it runs the risk of too many being assigned at the Requester or Provider and potentially causing deadlock/breaks.

heliocat commented 1 year ago

As far as I can tell this already works this way. LTN version 1.18.2

Test setup using 1-1 trains and infinity chests. Provider station set to Limit Trains 1 and locked slots per wagon 2, Requestor set to Limit Trains 2, request set to -7000 iron plates.

Observed behavior: first train loads 3800 iron plates (plus a bit of overage), second train leaves depot as soon as the first train has left the provider with a ~3200 pickup order.

Setting both station limits to 1 has the same net effect though in that case the second train does not depart until the first train has left the requestor. Setting a limit of 2 on the provider and a limit of 1 on the requestor has the same effect as the requestor is not allowed to be a part of a new schedule until it has been cleared.

I also confirmed that the same behavior with split loads (-7000 iron and copper plates) between those two stations.

PiggyWhiskey commented 1 year ago

You are correct. That's my mistake. Something in my system was not functioning properly.