old LTN discussion thread

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

ryder1977
Burner Inserter
Burner Inserter
Posts: 6
Joined: Wed May 10, 2017 4:40 pm
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.4

Post by ryder1977 »

Hi Ryn and I are playing a map together. What Ryn wanted to say is this:

We read the content of the logistic network from a roboport. Then we know how much iron ore is on the whole network. Lets say it is 100k for the moment and falling. We want to start a logistic train to fetch - lets say 10k more ore if the global iron ore reading from the roboport falls below 50k. How do we have to wire and what is to do with LTN? Thanks so far.

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

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.4

Post by Optera »

ryder1977 wrote:Hi Ryn and I are playing a map together. What Ryn wanted to say is this:

We read the content of the logistic network from a roboport. Then we know how much iron ore is on the whole network. Lets say it is 100k for the moment and falling. We want to start a logistic train to fetch - lets say 10k more ore if the global iron ore reading from the roboport falls below 50k. How do we have to wire and what is to do with LTN? Thanks so far.
Please check the blueprints and demo from the first post.

ryder1977
Burner Inserter
Burner Inserter
Posts: 6
Joined: Wed May 10, 2017 4:40 pm
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.4

Post by ryder1977 »

I'm sorry. Your Demo wont load due to an error in control.lua:73 of the ceative mode and it is really hard to understand your instructions if english isn't your mother language :(

Mobius1
Fast Inserter
Fast Inserter
Posts: 191
Joined: Thu Feb 09, 2017 12:05 am
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.4

Post by Mobius1 »

ryder1977 wrote:Hi Ryn and I are playing a map together. What Ryn wanted to say is this:

We read the content of the logistic network from a roboport. Then we know how much iron ore is on the whole network. Lets say it is 100k for the moment and falling. We want to start a logistic train to fetch - lets say 10k more ore if the global iron ore reading from the roboport falls below 50k. How do we have to wire and what is to do with LTN? Thanks so far.
The LTN train stop has a light entity and a yellow combinator entity. The Yellow combinator produces output signals that are provided by the train stopped on that station, it'll show the ammount of locomotives, the ammount of cargo wagons and the contents of the train. The Light entity is your input signal, you input negative signals to the lamp via green wire or red wire, lets say if you supply a signal of -3000 iron ore, the train stop will check if there is any train waiting on the depot if there is it'll create a work order based on the cargo wagon limit of the train, for this example lets assume you have 1 cargo wagon on your train so it can store only 2000 units of iron ore. That is the ammount of iron ore that will be in the work order, you'll see something like this message showing on chat:

Code: Select all

[LTN] Creating Delivery from Iron Outpost to Base Dropoff with 2000 units of Iron Ore
So the train then will go to the station named Iron Outpost, will wait untill it has 2000 units of ore on its cargo wagon (or when it reachs timeout) then it'll return to the station Base Dropoff to unload.
I recommend reading this post I did a few months ago, it still works as the conditional loading logic is the same: viewtopic.php?f=94&t=36976&hilit=mobius ... 80#p272209
This one also explains a little more the same thing: viewtopic.php?f=94&t=36976&hilit=mobius ... 00#p273248
Only thing different on those posts are the "min delivery size signal" it was replaced by "Request threshold signal".

If you still having issues programming your train stops, feel free to ask.

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

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.4

Post by Optera »

I'm going to insert some corrections/improvements here.
Mobius1 wrote:The Yellow combinator produces output signals that are provided by the train stopped on that station, it'll show the ammount of locomotives, the ammount of cargo wagons and the contents of the train.
Output consists of:
composition as binary signal with lsb at the stop, not the number of locomotives/wagons.
expected content of the train after un-/loading is done. The current inventory of a train is outputted from the stop itself.
I recommend reading this post I did a few months ago, it still works as the conditional loading logic is the same: viewtopic.php?f=94&t=36976&hilit=mobius ... 80#p272209
1- Red wire from yellow combinator to an arithmetic combinator(1) with the signal "Each / <number of chests> | Each"
2- Red wire from the LTN station to another arithmetic combinator(2) with the signal "Each * -1 | Each"
3- Green Wire from the output of combinator (2) to the input of combinator (1)
With logistic loading system:
4- Red wire from the output of combinator (1) to each requester chest with the setting "set requests"
Can be done with only 1 arithmetic combinator, see the blueprints i provided in first post.
With regular chest loading system:
4- Red wire from the output of combinator (1) to each loader inserter with the signal "Anything > 0"
Filter Inserter in "set filter" mode are more secure and will work for multiple items from a single chest.
Use Locked Slots per Wagon to prevent inserters getting stuck holding items the couldn't insert.
This one also explains a little more the same thing: viewtopic.php?f=94&t=36976&hilit=mobius ... 00#p273248
Only thing different on those posts are the "min delivery size signal" it was replaced by "Request threshold signal".
To fine tune delivery sizes you also need to set provide threshold at providers.
Odhrean made a graphic displaying how LTN will react to different thresholds here: viewtopic.php?f=94&t=36976&hilit=mobius ... 40#p285115
Odhrean sent me an 100% correct, up to date diagram to include in the first post.

User avatar
Odhrean
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Mon Sep 15, 2014 7:49 am
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.4

Post by Odhrean »

I postet a Bug at the official forum but Rseding91 said it is a Mod-Bug.
It happend only recently in Version 0.15.28 in two of my saves after I set the Requester Threshold in an algorithgmic Combinator Output....

whitecold
Inserter
Inserter
Posts: 46
Joined: Fri May 19, 2017 6:48 am
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.4

Post by whitecold »

Would it be possible to add train lines?
My idea was that each station can be assigned a line ID, including depots. Trains for IDed depots would only serve runs with the matching ID, or from a no ID stop to one with an ID. It would give the player a bit more control over trains if this is desired.

This would allow to restrict fluid trains to the proper fluids, or keep certain trains always ready for supply runs.

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

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.4

Post by Optera »

Odhrean wrote:I postet a Bug at the official forum but Rseding91 said it is a Mod-Bug.
It happend only recently in Version 0.15.28 in two of my saves after I set the Requester Threshold in an algorithgmic Combinator Output....
Probably you removed Nixie Tubes.
whitecold wrote:Would it be possible to add train lines?
My idea was that each station can be assigned a line ID, including depots. Trains for IDed depots would only serve runs with the matching ID, or from a no ID stop to one with an ID. It would give the player a bit more control over trains if this is desired.

This would allow to restrict fluid trains to the proper fluids, or keep certain trains always ready for supply runs.
That's practically the description of Choumiko's Smarter Trains.

User avatar
Odhrean
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Mon Sep 15, 2014 7:49 am
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.4

Post by Odhrean »

Optera wrote:
Odhrean wrote:I postet a Bug at the official forum but Rseding91 said it is a Mod-Bug.
It happend only recently in Version 0.15.28 in two of my saves after I set the Requester Threshold in an algorithgmic Combinator Output....
Probably you removed Nixie Tubes.
Thats exactly what i did.
Thats the cause for this bug? How can it tappen?

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

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.5

Post by Optera »

Released 1.3.5
- fixed potential nil reference during stop update viewtopic.php?f=94&t=36976&start=820#p293588

- changed provider prioritisation making deliveries merge more reliably (#trains > provider priority > #existing deliveries from provider > amount)
Small change to provider sorting with potential big changes depending on the network. Should fix most of issues like this: viewtopic.php?f=94&t=36976&start=820#p293343

- removed "log level" and "log output" settings
- added "message level" for console messages only (no level 4: debug)
- added "write debug logfile" checkbox for debug log generation into factorio-current.log
I wanted to be able to generate logfiles for debugging while keeping console message at notification level.
Generating debug logs that are useful to me is a now a simple checkbox and won't spam in game console.

bambusa
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Jul 08, 2017 11:02 am
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.5

Post by bambusa »

Hi there,
i really like to rework my train network with this mod :)

But i don't get how to let provider stations load only the requested amount.
I connected the station output directly to the filter inserters and that way the train always gets loaded until it's full.
I guess i need to put a combinator in between but i don't really get how...
Can you give me an example?

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

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.5

Post by Optera »

bambusa wrote:Hi there,
i really like to rework my train network with this mod :)

But i don't get how to let provider stations load only the requested amount.
I connected the station output directly to the filter inserters and that way the train always gets loaded until it's full.
I guess i need to put a combinator in between but i don't really get how...
Can you give me an example?
Please read the manual in the first post. :roll:

bambusa
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Jul 08, 2017 11:02 am
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.5

Post by bambusa »

Optera wrote: Please read the manual in the first post. :roll:
I did, but it is not really explained how to connect the train content with the combinator to the inserters...
I got it now, but it is not that intuitive at first

RynTyrell
Burner Inserter
Burner Inserter
Posts: 10
Joined: Thu Jun 29, 2017 11:54 pm
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.5

Post by RynTyrell »

Hi , thanks for all the tips ... i have my "problem" fixed. But i have to use 2 combinators per ore to be delivered ... one compare combinator and one algorith ... the compre combinator just looks how many is there and if the amount is less then what it should be it sends a signal to algorithm combinator , whis one is at ore *-1 as told ... to create a delivery. Now my problerm is that even when just 100 ore is missing , the mod sets 3 to 5 trains with each 24k of that ore to get the delivered item.... any idea whats wrong ?

User avatar
Odhrean
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Mon Sep 15, 2014 7:49 am
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.5

Post by Odhrean »

RynTyrell wrote:Hi , thanks for all the tips ... i have my "problem" fixed. But i have to use 2 combinators per ore to be delivered ... one compare combinator and one algorith ... the compre combinator just looks how many is there and if the amount is less then what it should be it sends a signal to algorithm combinator , whis one is at ore *-1 as told ... to create a delivery. Now my problerm is that even when just 100 ore is missing , the mod sets 3 to 5 trains with each 24k of that ore to get the delivered item.... any idea whats wrong ?
You say the mod creates uo to 5 Trains with 24k delivery size each. I suppose you set the Request-Item Amount to -120k. The mod creates deliveries until the Request-Amount is fullfilled, trains underway count toward this. It is important to connect the buffer chests to the LTN input to substract whats already IN the Station from the Request-Amount. I think you forgot this and just direct the full Request-Amount to the Station.


I made something similar with my Outpost Stations. I request supplies (Ammo, Repair Kit, Bots etc) and let the Request-Amount to the LTN Input only if an item type is too short. But I only made this with Combinators because I want LTN to ceate merged Deliveries of all Items that are missing, trigger is one items that is under the threshold.
1.png
1.png (529.02 KiB) Viewed 9607 times
In general you don't need combinators if you just want LTN create deliveries if you are too short.
Look at this graphic and play with the Request-Threshold signal.
Only Request Items if your fill-Level is below the Request-Threshold. This is an inbuilt Decider combinator ;)

EDIT: ... thinking more about it I think you want create LTN Stations with multiple Items and have a "Request-Threshold" for each distinct item. Then you must indeed use combinators and let the negative Request-Amount plus all Items already in the Station as Request-Amount to the LTN Input when your Threshold in the Decider Combinator for this Item is reached.

RynTyrell
Burner Inserter
Burner Inserter
Posts: 10
Joined: Thu Jun 29, 2017 11:54 pm
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.5

Post by RynTyrell »

Odhrean wrote:EDIT: ... thinking more about it I think you want create LTN Stations with multiple Items and have a "Request-Threshold" for each distinct item. Then you must indeed use combinators and let the negative Request-Amount plus all Items already in the Station as Request-Amount to the LTN Input when your Threshold in the Decider Combinator for this Item is reached.
I just have one Station for my trains where i want the different ore unloaded. Its set up with active provider chests so that my logistic robos
can unload and put them in my warehouses. Maybe i should make a screenshot of my "creation" ^^
Image

Each row of combinators is for one ore.Decider has as example Iron Ore < 100000 Output Iron Ore with entrycounter . There it goes onto the arithmic with Iron ore counter from decider *-1 output is iron ore. Then it goes onto the constant which is at max length 3 of trains an minimum too and has a minimum requester amount of 6k

User avatar
Odhrean
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Mon Sep 15, 2014 7:49 am
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.5

Post by Odhrean »

RynTyrell wrote:Each row of combinators is for one ore.Decider has as example Iron Ore < 100000 Output Iron Ore with entrycounter . There it goes onto the arithmic with Iron ore counter from decider *-1 output is iron ore. Then it goes onto the constant which is at max length 3 of trains an minimum too and has a minimum requester amount of 6k
As I guessed you don't connect the buffer chests to the input lamp. If you direct the iron signal * -1 to the LTN Input without adding all iron's which are already in the Station you always request the whole amount, which is 100000 in your example. (Request-Amount -100000 Iron Ore). Connect the Buffer Chests (your Warehouse Storage from the mod) and add the Iron ore Count to this signal.
I advise you look into the tutorial save game in the OP.

EDIT: Your Problem will be solved if you connect all Warehouse-Chests from the Station together with "Read Content" and connect this to the LTN Input directly (not via any combinator). To prevent the Station from providing the items to the LTN Network when there is no negative Request-Signal add a "Provider-Threshold: 1M" (or higher if you have more then 1M Items.... ;) ) Signal via Constant Combinator to the LTN Input.

TheTom
Fast Inserter
Fast Inserter
Posts: 185
Joined: Tue Feb 09, 2016 8:33 am
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.4.0

Post by TheTom »

Very good - this "fill one item up" was really bothering me, as was not dispatching multiple traing in one run ;) Grats - I personalyl think this mod is so precious it should be folded into the main game. Backbone of my base ;)

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.4.1

Post by ssilk »

I created on request of Optera a new subboard. This is definitely one of the bigger mods. Moved this thread into that board.

Optera: If there are problems with the rights, just PM.

Have fun.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Locked

Return to “Logistic Train Network”