Letting train leave if the station is missing requested items?

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Post Reply
wild_dog
Inserter
Inserter
Posts: 21
Joined: Tue Apr 19, 2016 8:07 pm
Contact:

Letting train leave if the station is missing requested items?

Post by wild_dog »

Hi all,

Sometimes, my stations will not have the items needed/requested by the train.
This could be because I used logistics chests for the storage at the sation, and some got picked up by bots before the train arrived.
Or I had a low provider threshold, a previous train took more items that it strictly needed, and the station didn't have enough items to supply a second train dispatched while the first was still underway.

Up until now, I could do some workarounds:
Limit stations to 1 train only.
Set a high supply threshold if a train is already underway.
Not using logistics storage chests at the stations.

But now, I have a fairly complex station that supplies a lot of different items, and usually in small supply, and the above tricks don't work any more.
Basically, a provider station on my 'mall'.

Limiting to only 1 train means the throughput is abysmal, and there is a high chance that by the time that the train for item X has made a pickup, another train is dispatched for more of item X, even though requests for items KLMNO and P are also supplied by this station.
Set a high supply threshold if a train is already underway has the same limitation as above, where I can only handle 1 type of small quantity item order at a time, with repeat orders for the same subgroup of items downing out the rest.
Set a high supply threshold if # number of train is already underway does alow me to provide multiple small quantity orders at the same time, but often, multiple trains for item X are dispatched, and the first train to arrive would load up all the supplies for the following trains, getting it stuck in the station untill the timeout.

I know about the cirquit network condition option, but AFAIK, that needs ALL my 500+ stations to now also include the cirquit condition, and I would really like to not have to retrofit all of my stations (besides the fact that the numerous cirquit logic combinators is already reducing my UPS to 30).

Is it possible to have the cirquit logic condition as an OR in strad of an AND?
Or to trick the station/train into thinking it has more cargo loaded thatn it actually has? (I could send the signal with the requested cargo amount for all requested cargo the station doens't have in supply in that case).

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Letting train leave if the station is missing requested items?

Post by Optera »

Just report to LTN what's actually available.
If your station tells LTN it has items that it doesn't then your setup is wrong.

wild_dog
Inserter
Inserter
Posts: 21
Joined: Tue Apr 19, 2016 8:07 pm
Contact:

Re: Letting train leave if the station is missing requested items?

Post by wild_dog »

That does not adress the main edge case I am experiencing:

Station A requests 1000 of X.
Station B(problem station) contains 3 of X.
Train with 4 cargo wagons is dispatched to Station B to pick up 3 of X.
Staton B recieves 2 more of X from the factory.
Second train with 4 cargo wagons is dispatched to Station B to pick up 2 of X.
First train arrives at station B, is loaded with 5 of X, and leaves for station A.
Second train arrives at station B, has no X available, and has to wait full timeout timer.

At all times, i only supplied the LTN station with EXACTLY what is available in the station.
But due to unavoidable overloading and multiple trains being dispatched for the same item, this lead to trains getting stuck.

Loading trains with EXACTLY the requested amount is near impossible since the cargo is semi-randomly distributed over 4 cargo wagons.
And since this is the station at my 'mall', it is a loader for a WIDE variety of items.
These problems are compounded into a chain reaction, if 2-3 trains need to wait their full loading timeout, until the overall travel timeout of other trains waiting on the stuck trains also passes, and so duplicates for those are dispatched, which will also find materials missing from the station.



There were several patches to this problem i already tried;

I tried setting the train limit to 1.
But this decreases the throughput of the station to an unacceptable degree.
It also resulted in the station only fulfilling request for 1-2 different items, even though it had 20+ different items it could resupply, since it could supply more of X once the first train wanting X left, and thus a new train to pick up X was dispatched right away, not one for the others.

I tried to increase the supply threshold over the possible 'overfill' inacuracy of loading the trains.
But for a station providing low quantity items, this won't work.

I tried to set it so that the increased threshold only activates when a train is already underway to the station.
But the station provides multiple low quantity items, and a train comming to puck up 1 low quantity item thus blocks all the others.
It also repeated the stuck on a few items loop from setting train limit to 1.

I tried activating this threshold only when a certain number of trains is dispatched.
But then the origional situation with multiple trains being dispatched for item X occours again.



I managed to patch it for now using the LTN combinators mod to filter out all materials for which a train is currently in route anywhere as not available at the station.

User avatar
Nosferatu
Fast Inserter
Fast Inserter
Posts: 228
Joined: Fri Jan 20, 2017 4:48 pm
Contact:

Re: Letting train leave if the station is missing requested items?

Post by Nosferatu »

You are loading mixed goods randomly placed into 4 Cargo Wagons?

What are your typical deliverys?
Are you sure you cant Limit your mixed deliverys to 1 Wagon or Sort your stuff better?

wild_dog
Inserter
Inserter
Posts: 21
Joined: Tue Apr 19, 2016 8:07 pm
Contact:

Re: Letting train leave if the station is missing requested items?

Post by wild_dog »

The workaround with the delivery combinatie works quite well.

As to your question, it varies a lot. Using the Space Exploration mod, and I'm basically supplying all the items available in the 'space mall'. Varying length space pipes, the withe belts, all the components of the space ships, wide area beacons, all if the advanced solar panels and accumulators, the high temperature steam and anti matter reactor stuff.

Basically, it is a station that fulfills "for all items requested in the LTN network, if it is not available elsewhere in the LTN network and available in the local logistics network, deliver them to the station and make them available".

Sorting becomes basically unviable due to the wide selection of items. Can't really reduce it to 1 wagon, since sometimes I have to fulfill deliveries of 25k+ space scaffolding for example, that is over 2 full 4 cargo wagon trains by itself, and I'd rather keep all my trains 1-4-1 if I can help it.

Basically all my stations are designed to deal with trains loaded with more materials than requested/expected or even unexpecred materials, so I don't care that much that every train has the exact amounts expected actually loaded (single item requesters will leave non-requested items, depots will unload left behind items, and multi item requesters will unload all and return to central storage excess items). I'm more interested in throughput.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Letting train leave if the station is missing requested items?

Post by Optera »

wild_dog wrote:
Tue Oct 03, 2023 7:19 pm
That does not adress the main edge case I am experiencing:

Station A requests 1000 of X.
Station B(problem station) contains 3 of X.
Train with 4 cargo wagons is dispatched to Station B to pick up 3 of X.
Staton B recieves 2 more of X from the factory.
Second train with 4 cargo wagons is dispatched to Station B to pick up 2 of X.
First train arrives at station B, is loaded with 5 of X, and leaves for station A.
Second train arrives at station B, has no X available, and has to wait full timeout timer.
When setting request and provide thresholds too single items, LTN will do as being told and try deliver single items.

Set thresholds to several stacks worth, ideally slightly under a full train capacity, especially if you are optimizing throughput.

Post Reply

Return to “Logistic Train Network”