old LTN discussion thread

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

GATOCHOCOLATE
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Mar 28, 2017 3:35 pm
Contact:

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

Post by GATOCHOCOLATE »

hi i love these mod and my base is based on it.

the problem in my base started when the stuff recuested stops to show on the station output. whit items i have no problems because they are counts in exact values. But the problem begins working whit licuids. the game rounds values like in the picture when the train contents "0.4" of water the game rounds it to "0" and the pumps stops and they left inside some water in the wagon.

My question is: could you change the round of the station to rounds up always?

Sorry for my english. Thanks to make these awesome mod.
Attachments
station round.png
station round.png (2.4 MiB) Viewed 10073 times
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

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

Post by Optera »

thedoh wrote:I've upgraded to version 1.3.2 and seem to have a problem with unloading stations: I have a train with some iron ore which ought to be unloaded and the station output does not have the iron ore in its list of outputs. The only thing output, in fact, is the encoded train/locomotive positions. The delivery order existed before the upgrade. Did a setting or behaviour change that I missed?
Optera wrote:I removed the toggle to the old loading list output entirely.
Station logic using expected inventory after loading is always simpler than using loading list.
loading and unloading should make use of reading train inventory from stop. See example builds in opening post.
GATOCHOCOLATE wrote:hi i love these mod and my base is based on it.

the problem in my base started when the stuff recuested stops to show on the station output. whit items i have no problems because they are counts in exact values. But the problem begins working whit licuids. the game rounds values like in the picture when the train contents "0.4" of water the game rounds it to "0" and the pumps stops and they left inside some water in the wagon.

My question is: could you change the round of the station to rounds up always?

Sorry for my english. Thanks to make these awesome mod.
Only the devs can change the stop output.
You can join the proposal for changing it here: viewtopic.php?f=6&t=49274
Kormer
Inserter
Inserter
Posts: 30
Joined: Wed Nov 30, 2016 1:34 am
Contact:

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

Post by Kormer »

I made something mildly interesting that is likely to cause more problems than it's worth. What you do is chain all the outputs from your depot stations together and feed it into the red wire on the left. The circuitry is checking for the existence of a cargo wagon, and if one exists, it counts backwards from a starting point. The starting points in my example are the arithmetic and constant combinator that output D as 16k, and A 16k respectively. This 16k number should be set to whatever the total cargo capacity of your trains is.

I'm then taking the output on the right and sending it via wireless signal to each of my stations to be used as the minimum request/provide signal. This way if a bunch of trains end up jammed at the station, we will start sending out partially loaded trains starting from the input/output combination with the highest stockpile. If no trains are waiting, the circuitry resets to the starting point to begin counting backwards again. Blueprint in the code below.

Code: Select all

0eNrFWE2PmzAQ/S9zrEyFSSAJ2lZKu8eqp96qVURgkrUEBhmTNor477Uhu80XYKdpcolksMdv3rw32NnBMq2wEIxLCHfA4pyXEP7cQcnWPEr1M7ktEEJgEjMgwKNMjxKMWYLCifNsyXgkcwE1AcYT/A0hrclggEgw+ZqhZPHlGF79QgC5ZJJhi6gZbBe8ypYo1CYDoQgUealW51xjUBHdjz6BLYSOp3ZJmMC4fekRUFlLkaeLJb5GG6YWqxV/oy7U66SJVOoXKyZKuThLb8OErNSTd1jtDOeLTkrTKiPNMQ1c1yWQFyiidn/4oNbklSwqi6jPUNdtXN7m0UCj+kdgcsgXU6ORmslEXDHZDBW3aq3XMTk4nkzV5FoX9IR/7x1ShgmrMgdThUSoIhR5iuf0O5OWfdoBey0Q+QDwLiyjPl2eIwn2SnCNhLAPeaUKvv347sSRWOfOr2itdjkSg6sHWRGJBmgIn69Qwl5fxVYBrLhcrESeLRhXMSBcRWmJtQ3h/dKgp+UgR6/HZ9Uil3fxzco6trW4M3rzOH2kx4MbGPzr/zO4Ifu+nanoHU11SHuJOoYVsSeue7qx66So0KJ247PaEaNm6J24z+/UgJkHj6PNzEQSWInEtbPnTUQyv0YkzzcRyfx2IqGmIgn6RTKzE0nQL5KJmUgmtn38QW18ftzGHfrvbXze3cbNytdfn2kH41PLw1lwxdls0q802qWG2XXfFXrn78rBkf2kFXx6cCtwTc9V1u6+XDDqvmfzRsrAKcyiYCuWShQdd84BNitdHf/g2vlizqLh941Su9zpPVPf3yUH0+9pHUpJzb08PPgfgMBGwWqQB+Ox5wfTmTud1vUfp9WJTg==
User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2638
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

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

Post by steinio »

Optera wrote:
thedoh wrote:I've upgraded to version 1.3.2 and seem to have a problem with unloading stations: I have a train with some iron ore which ought to be unloaded and the station output does not have the iron ore in its list of outputs. The only thing output, in fact, is the encoded train/locomotive positions. The delivery order existed before the upgrade. Did a setting or behaviour change that I missed?
Optera wrote:I removed the toggle to the old loading list output entirely.
Station logic using expected inventory after loading is always simpler than using loading list.
loading and unloading should make use of reading train inventory from stop. See example builds in opening post.
GATOCHOCOLATE wrote:hi i love these mod and my base is based on it.

the problem in my base started when the stuff recuested stops to show on the station output. whit items i have no problems because they are counts in exact values. But the problem begins working whit licuids. the game rounds values like in the picture when the train contents "0.4" of water the game rounds it to "0" and the pumps stops and they left inside some water in the wagon.

My question is: could you change the round of the station to rounds up always?

Sorry for my english. Thanks to make these awesome mod.
Only the devs can change the stop output.
You can join the proposal for changing it here: viewtopic.php?f=6&t=49274
Hey,

i changed my pumps from oil>0 to oil>=0 and had no oil got stuck in tanker wagons so far.

Greetings, steinio.
Image

Transport Belt Repair Man

View unread Posts
Maglay
Inserter
Inserter
Posts: 30
Joined: Tue Dec 06, 2016 7:52 am
Contact:

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

Post by Maglay »

-
Last edited by Maglay on Tue Jun 27, 2017 9:47 pm, edited 2 times in total.
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.0

Post by Odhrean »

Maglay wrote: Now, if I'm understanding the instruction correct, I would replace the ignore_min_deliv_size with the provider_threshold signal and a value of 1 to generate the same behavior.
If you want a Station Providing all at any item-size thats the correct signal: Provider-Threshold = 1

As soon as a Station is asking for items the Provider will Deliver them. Thats the other relevant Signal: Requester-Threshold. If you want a Station asking for items immediately you must set this to 1 on the Requester-Station. But this can lead to very small deliveries (if 1 Iron Plate on the Provider available and Provider-Threshold=1 on Provider-Station and Request-Threshold=1 on the Requester-Station a Delivery of 1 will be made).
I have a Universal-"Trash"-Provider as you describe aswell and set the Provider-Treshold=1 but my Requester Stations to Requester-Threshold=8000. As a Result a Request is made if the Requester is short-handed by 8k and a Delivery of 1 - 8000 is created (depends on how much is available on the Provider when the Request is made).
Be warned: if the Requester-Station is permanently short-handed on items a Delivery of 1 is created as soon as the first Robot drops the Item on the logistic chest if no other Providers are there Providing more items...
Maglay
Inserter
Inserter
Posts: 30
Joined: Tue Dec 06, 2016 7:52 am
Contact:

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

Post by Maglay »

-
Last edited by Maglay on Tue Jun 27, 2017 9:47 pm, edited 1 time in total.
nagapito
Filter Inserter
Filter Inserter
Posts: 362
Joined: Fri Jul 29, 2016 12:18 am
Contact:

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

Post by nagapito »

Optera wrote: Replaced use best effort, minimum delivery size and ignore minimum delivery size with more versatile request threshold and provide threshold.
Requester will only trigger deliveries when amount *-1 is above request threshold, same as with minimum delivery size before. Request threshold no longer affects providers.
Minimum delivery size signal is migrated to requester threshold.
I am kinda lost... I just updated you mod and suddenly I have requests firing left and right below my previous minimum delivery size!
Does this mean that the requester threshold should be a negative value? Shouldnt it just be as simple as provider amount > request threshold?!
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

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

Post by Optera »

nagapito wrote:
Optera wrote: Replaced use best effort, minimum delivery size and ignore minimum delivery size with more versatile request threshold and provide threshold.
Requester will only trigger deliveries when amount *-1 is above request threshold, same as with minimum delivery size before. Request threshold no longer affects providers.
Minimum delivery size signal is migrated to requester threshold.
I am kinda lost... I just updated you mod and suddenly I have requests firing left and right below my previous minimum delivery size!
Does this mean that the requester threshold should be a negative value? Shouldnt it just be as simple as provider amount > request threshold?!
Even though request count has to be negative to indicate a request the threshold is still positive:

Code: Select all

if (item.count *-1) >= request_threshold then request(item, count)
Deliveries firing rapidly after updating probably is due to provide threshold now being the determining factor for delivery size in understocked networks.
Setting provide threshold at least to the capacity of the biggest train serviceable by a station will ensure trains only do full deliveries.
MPeti1
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Tue Apr 12, 2016 5:38 pm
Contact:

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

Post by MPeti1 »

Hi!
Where can i find instructions for version 0.14?
hnougher
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sat Jan 21, 2017 10:41 am
Contact:

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

Post by hnougher »

Hello
I installed this today for my first use in v0.15.

I am having an issue where a requester stop is not saying what to unload.
It is successfully requesting from another stop, the train with the proper amount arrives, yellow combinator is the issue it only shows the engine and wagon locations with nothing else.
Given my stops are mostly do provide and request jobs at the same time, its a bit difficult to unload.
Wexler
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sun Jun 11, 2017 2:25 pm
Contact:

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

Post by Wexler »

I'm having the same issues as mentioned above - the built in "output" combinator doesn't output anything except the locomotive/cargo wagons in requester stations.

Jobs are being created just fine, and in the provider station i see the output corresponding to the amounts in the job, which i use to make the loaders load the correct stuff.
When the train arrives at the requester station, the output combinator changes from outputing nothing, to outputing a locomotive and cargo wagon signal, but nothing else. To be safe, i imported the example blueprint from the top post here (which partially fails because of the change to the minimum signal), but I had the same issue.

Admittedly, it's my first time trying the mod, so I could be doing something wrong - but I'm reasonably sure I've followed instructions.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

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

Post by Optera »

hnougher wrote:Hello
I installed this today for my first use in v0.15.

I am having an issue where a requester stop is not saying what to unload.
It is successfully requesting from another stop, the train with the proper amount arrives, yellow combinator is the issue it only shows the engine and wagon locations with nothing else.
Given my stops are mostly do provide and request jobs at the same time, its a bit difficult to unload.
Wexler wrote:I'm having the same issues as mentioned above - the built in "output" combinator doesn't output anything except the locomotive/cargo wagons in requester stations.

Jobs are being created just fine, and in the provider station i see the output corresponding to the amounts in the job, which i use to make the loaders load the correct stuff.
When the train arrives at the requester station, the output combinator changes from outputing nothing, to outputing a locomotive and cargo wagon signal, but nothing else. To be safe, i imported the example blueprint from the top post here (which partially fails because of the change to the minimum signal), but I had the same issue.

Admittedly, it's my first time trying the mod, so I could be doing something wrong - but I'm reasonably sure I've followed instructions.
The output (yellow combinator) shows the expected inventory after loading/unloading. Showing only train composition means the train has to be unloaded of everything.
hnougher
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sat Jan 21, 2017 10:41 am
Contact:

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

Post by hnougher »

Ah I see. A key difference to v0.14.

If others are using the same station to load and unload, and have the issue where one side load too many and the other side compensate, here is a quick fix.
Make one of the inserters have a stack size of one, then put the rest behind a combinator to restrict their working to > 10 (or so).
You still have quick load till the last few, occasionally overshooting a little, but it doesn't start a massive logistic robot mess moving from the unload to load sides.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

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

Post by Optera »

hnougher wrote:Ah I see. A key difference to v0.14.
You seem to have skipped 1.2 where this behaviour was optional.
Going straight from 1.1 or earlier to 1.3 you will have to rebuild all stops to incorporate train inventory from the stops.
If others are using the same station to load and unload, and have the issue where one side load too many and the other side compensate, here is a quick fix.
Make one of the inserters have a stack size of one, then put the rest behind a combinator to restrict their working to > 10 (or so).
You still have quick load till the last few, occasionally overshooting a little, but it doesn't start a massive logistic robot mess moving from the unload to load sides.
Are you talking about unload inserter unloading the slight overload in an infinite loop?
The solution is simply using each*-2=each for unloading. It took me several overly complicated iterations before coming up with that. viewtopic.php?f=94&t=36976&start=680#p279647
User avatar
Ragnaman
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Sun Apr 10, 2016 10:06 pm
Contact:

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

Post by Ragnaman »

I started recently using it again and here is some feedback.

The guide in the OP is way too complicated for what is needed to start out with the mod.
I spent an hour trying to figure out all those wire connections + filter inserters.
And that combinator that does "Any = Any * -1" results in a negative signal that gets fed to filter inserters (they work only with positive signal from my tests).

Then i just tried to use regular inserters and simply passed signals to lamps.
It would be best to show the simplest example before jumping in complex wire setups, I personally have no idea why I would want to use anything complex. My trains have standard size, small and fast. So I dont need to worry about train<>depot incompatabilities.
I like this mod because it can automate a large fleet of trains.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

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

Post by Optera »

Ragnaman wrote:The guide in the OP is way too complicated for what is needed to start out with the mod.
I spent an hour trying to figure out all those wire connections + filter inserters.
And that combinator that does "Any = Any * -1" results in a negative signal that gets fed to filter inserters (they work only with positive signal from my tests).
Anything, Everything and Each are very different special signals in Factorio. I suggest you read up on combinator 101 to understand what each does.

The logic is a simple as it can be. The each*-1=each combinators are for simple subtraction to load/unload only x of item y.
Requester: x = current Inventory - desired Inventory
Provider: x = desired Inventory - current Inventory

If it outputs negative values you swapped provider and requester or didn't set the stop to read inventory.
I personally have no idea why I would want to use anything complex. My trains have standard size, small and fast. So I dont need to worry about train<>depot incompatabilities.
Try loading 200 iron plates and 400 copper plates into a train and you will know why my examples do basic math and use filter inserters.
User avatar
jodokus31
Smart Inserter
Smart Inserter
Posts: 1622
Joined: Sun Feb 26, 2017 4:13 pm
Contact:

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

Post by jodokus31 »

Great mod!

Today I encountered this error:
ltn_error.png
ltn_error.png (271.04 KiB) Viewed 9779 times
It happens, when my construction train is arriving an LTN Requester station (with no request yet), which I added as stop to automatically travel there.
The train has ShuttleTrain Equipment and is an Angel's Crawler Train, if that does matter.

Everything is latest version.
Mods are Bob's & Angel's, ShuttleTrain Lite, Train Speed Limit, etc. (I dont know, which else would matter)

Maybe it helps...

I can work further, if I avoid this scenario.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

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

Post by Optera »

jodokus31 wrote:Great mod!

Today I encountered this error:
ltn_error.png
It happens, when my construction train is arriving an LTN Requester station (with no request yet), which I added as stop to automatically travel there.
The train has ShuttleTrain Equipment and is an Angel's Crawler Train, if that does matter.

Everything is latest version.
Mods are Bob's & Angel's, ShuttleTrain Lite, Train Speed Limit, etc. (I dont know, which else would matter)

Maybe it helps...

I can work further, if I avoid this scenario.
A fine example of "x will be enough" being proven wrong once again.
When I expanded the normal 18 slots a constant combinator has to 50 I didn't think anyone would pack 50 different items in one train. Turns out I was wrong.

I'll check how to best migrate existing constant combinators to higher item_slot_count.
For now don't pack more than 50 - (train composition signals) different items in a train going to an LTN stop.

PS: How many different items are there in a full angels + bobs setup?
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

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

Post by Optera »

Update 1.3.3:
LTN counts all types that can be put into cargo wagons and all fluids and sets the output slot_size accordingly when loading the game.
Items generated in data-final-fixes by mods loaded after LTN will not be included. If you stumble across a mod doing this let the author know creating items in final-fixes is bad practice.

I've also added a fail safe for such bad mods by removing excess entries and adding an Error message.

The mod portal is still broken, you can find the current build directly on github: https://github.com/Yousei9/Factorio-Log ... tag/v1.3.3
Locked

Return to “Logistic Train Network”