old LTN discussion thread

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

tuttifrectte
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Apr 24, 2017 5:13 pm
Contact:

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

Post by tuttifrectte »

Has anyone work out a circuit that can fill a train to the brim, but not leave any items held by the inserters?

I want to create a station that can provide several items. I can't have inserters holding item because they insert it into the next train. I know I can do it by "locked slot per wagon", but I feel bad for the trains not getting as many items as it can get.
Last edited by tuttifrectte on Sat May 13, 2017 9:26 am, edited 1 time in total.
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.2.3

Post by steinio »

Hello,

can we please get a global setting for limit trains?
0 = no limit.

Greetings, steinio.
Image

Transport Belt Repair Man

View unread Posts
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.2.3

Post by Mobius1 »

nuhll wrote:Nice idea what you told about min delivery, but its not true. It gets ore from supply stations and send it to my requester in base, working perfectly. I set min delivery on the requesting station, that is, as far as i know, correct.
Yes, that shouldn't give you any troubles
nuhll wrote:In base requester i set - 20000 iron ore, min delivery 7 (tried also 8) 000, it just creates 4k orders.. :) FIXED, vanilla (2) can only carry 4k instead of 8... ;) Just in case, if i use not vanilla trains, will LTN know i can carry more? (MK2 Version e.g. from bobs)
Min delivery is the minimum quantity of a item that you have missing in storage before the LTN requests them with trains. Which means that if you request 20k iron ore, with a minimum delivery of 7k you will only start requesting iron ore again when your storage hits 13.000 or less.
4k is indeed the max cargo capacity of 2 cargo wagons, if you have in your depot a train with, say, 8 cargo wagons that train will be able to carry 16k iron ore. The work order is created based on the train size you have on your depots.
nuhll wrote:But how should i stop the requester stations from getting provider? Oo(!!!)
That is easy, just follow these steps:
With Logistic Robots
Without Logistic Robots
Essentially what this does is: you have a -20k signal on the constant combinator, your storage have 14k iron ore, the decider combinator will read both wires comming into it and will sum them up, so it'll count -6k signal and it'll output -6k signal to the LTN station.
If you have 21k iron ore in your storage, the signal the combinator will read will be +1k and will not output that signal to the station since its set to only output negative signals (each < 0). So you're basically turning that station into an Unload station, without Loading capability.
ichVII
Fast Inserter
Fast Inserter
Posts: 103
Joined: Mon Feb 27, 2017 10:16 pm
Contact:

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

Post by ichVII »

To come back to my Problem, i have a solution Suggestion, that may not be "to proon to user error":
You could include 4 new Parameters, namely "min-fluid-wagon-Count", "max-fluid-wagon-Count", "min-Cargo-wagon-Count", "max-cargo-wagon-Count". They should then work just like "min-Train-length" and "max-train-length" and should, as there is no binary Encoding Operation needed, not be to proon to user error.

As I am planning to publicly release a safe of what i want to do with this mod, It seems like a personal modification is not allowed.
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.2.4

Post by Optera »

Update for 1.2.4

By request I've added a toggle to output expected train inventories after laoding/unloading is done.
Default is disabled so it won't break existing stations. Provider should be fine mostly but Requester will break.
When enabled it allows for very sleek station designs considerably reducing the number of required combinators.

Here's my universal provider & requester for this mode. It uses 11 instead of 22 combinators now.
2017-05-13-12-16-07-8539489.jpg
2017-05-13-12-16-07-8539489.jpg (101.42 KiB) Viewed 7344 times
blueprint
setting descriptions where refomated to hopefully be more readable

added chinese translation from 745275633

fixed a bug where adding wagons to a train parked in provider/requester would throw an error

You could include 4 new Parameters, namely "min-fluid-wagon-Count", "max-fluid-wagon-Count", "min-Cargo-wagon-Count", "max-cargo-wagon-Count". They should then work just like "min-Train-length" and "max-train-length" and should, as there is no binary Encoding Operation needed, not be to proon to user error.
Feels redundant as ltn will use the best matching train regardless.
e.g. a request between 7501 -15k fluid will likely pick a train with 2 fluid wagons.

Thinking a bit about limiting trains to an encoded train composition entails I noticed it's ambiguous.
e.g. a terminus setup only will have each train turned around after a round trip
a train L-C-F-L will be L-F-C-L
There's no clean way to resolve this. So no, this will never happen.
tuttifrectte
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Apr 24, 2017 5:13 pm
Contact:

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

Post by tuttifrectte »

Optera wrote:Update for 1.2.4

By request I've added a toggle to output expected train inventories after laoding/unloading is done.
Default is disabled so it won't break existing stations. Provider should be fine mostly but Requester will break.
When enabled it allows for very sleek station designs considerably reducing the number of required combinators.
Damn this is nice, now I can calculate (expected inventories in train - current inventories in train) to get a number which positive means the train needs to be filled and negative means the train needs to be emptied. This is great for stations which are both providers and requesters.

Thank you for your great work :D
nuhll
Filter Inserter
Filter Inserter
Posts: 946
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

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

Post by nuhll »

tuttifrectte wrote:
Optera wrote:Update for 1.2.4

By request I've added a toggle to output expected train inventories after laoding/unloading is done.
Default is disabled so it won't break existing stations. Provider should be fine mostly but Requester will break.
When enabled it allows for very sleek station designs considerably reducing the number of required combinators.
Damn this is nice, now I can calculate (expected inventories in train - current inventories in train) to get a number which positive means the train needs to be filled and negative means the train needs to be emptied. This is great for stations which are both providers and requesters.

Thank you for your great work :D
Nice to see hes adding things for the 1% of users :P

btw, did anyone notice if you flip your blueprint with LTN stations in it... it gets deleted and just the lamp and the output is printed... (ALT + R)
tuttifrectte
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Apr 24, 2017 5:13 pm
Contact:

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

Post by tuttifrectte »

If a provider station supplies items A and B, and a requester station is requesting 100 of A and 100 of B, is it intended that there is no delivery if minimum delivery size is set to 200?
nuhll wrote:
Nice to see hes adding things for the 1% of users :P

btw, did anyone notice if you flip your blueprint with LTN stations in it... it gets deleted and just the lamp and the output is printed... (ALT + R)
It is because the train station cannot be mirrored, so the game just does not place it. The game considers the lamp and output as different structures. It is interesting that the flipped train station still shows on the blueprint.
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.2.4

Post by Optera »

nuhll wrote: Nice to see hes adding things for the 1% of users :P
That's because I happened to be in that 1% myself :P
btw, did anyone notice if you flip your blueprint with LTN stations in it... it gets deleted and just the lamp and the output is printed... (ALT + R)
You would have to talk to the author of whatever mod you use to mirror blueprints and ask them to add a special case for ltn stops.
If a provider station supplies items A and B, and a requester station is requesting 100 of A and 100 of B, is it intended that there is no delivery if minimum delivery size is set to 200?
I'm torn on this.
Summing up all items to get past min_delivery size makes sense.
However it would require a different strategy finding suitable providers as min delivery size no longer applies to each item but the whole request which can be served by multiple providers.
Min delivery size would become a pure threshold for requesters with no effect on providers. Similar to activating best effort.

I could add request threshold and provide threshold and change how providers are deemed eligible.
If I do that min delivery size, ignore min delivery size and best effort will become obsolete and removed.
tuttifrectte
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Apr 24, 2017 5:13 pm
Contact:

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

Post by tuttifrectte »

Optera wrote:
nuhll wrote: Nice to see hes adding things for the 1% of users :P
That's because I happened to be in that 1% myself :P
btw, did anyone notice if you flip your blueprint with LTN stations in it... it gets deleted and just the lamp and the output is printed... (ALT + R)
You would have to talk to the author of whatever mod you use to mirror blueprints and ask them to add a special case for ltn stops.
If a provider station supplies items A and B, and a requester station is requesting 100 of A and 100 of B, is it intended that there is no delivery if minimum delivery size is set to 200?
I'm torn on this.
Summing up all items to get past min_delivery size makes sense.
However it would require a different strategy finding suitable providers as min delivery size no longer applies to each item but the whole request which can be served by multiple providers.
Min delivery size would become a pure threshold for requesters with no effect on providers. Similar to activating best effort.


I could add request threshold and provide threshold and change how providers are deemed eligible.
If I do that min delivery size, ignore min delivery size and best effort will become obsolete and removed.
I don't understand the bolded sentence. How does min delivery size currently has an effect on providers?

Another request, can be get two more signal outputs: "# trains queued for pickup" and "# trains queued for delivery"? It has the following benifits:
- More fine grain control of stations who are both requesters and providers (e.g. I can limit # of pickup trains but allow infinite # of delivery trains by a circuit)
- With programmable speakers, this means we can have alerts on map.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

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

Post by ssilk »

Simple question: Is there a way to convert 0.14 games to 0.15, so that I don't loose the train stops? Currently the train-stops are removed when I try to load a 0.14 game.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
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.2.4

Post by nagapito »

ssilk wrote:Simple question: Is there a way to convert 0.14 games to 0.15, so that I don't loose the train stops? Currently the train-stops are removed when I try to load a 0.14 game.
Maybe something changed on last version that made the upgrade impossible....
Try the 1.2.3 version to upgrade the map to 0.15 and after upgrading, update the mod.

My map updated without a problem to 0.15 with the previous version
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.2.4

Post by Optera »

ssilk wrote:Simple question: Is there a way to convert 0.14 games to 0.15, so that I don't loose the train stops? Currently the train-stops are removed when I try to load a 0.14 game.
I can directly load saves from 0.14.x to 0.15.10 with LTN 1.2.4 without anything from LTN breaking.
Migrations working so far:
0.14.22 with LTN 0.8.1
0.14.23 with LTN 1.1.1

All blueprints have that weird signal offset bug though....
User avatar
ZlovreD
Fast Inserter
Fast Inserter
Posts: 129
Joined: Thu Apr 06, 2017 1:07 pm
Contact:

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

Post by ZlovreD »

Strange bug with station which supplying angels-ore4
screen
upd: Seems problem with priorities. If setup few stations with prior=100, some with 10 and some without - then those, with prior=0 ignored at all.
But maybe a valuable note, those stations what with =100 is empty and all stations supplying different resources.
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.2.4

Post by Optera »

ZlovreD wrote:Strange bug with station which supplying angels-ore4
screen
upd: Seems problem with priorities. If setup few stations with prior=100, some with 10 and some without - then those, with prior=0 ignored at all.
But maybe a valuable note, those stations what with =100 is empty and all stations supplying different resources.
Seems like an configuration error to me.
Without best effort/ignore min delivery size active providers have to have at least min_delivery_size of the requested item in stock to be valid.
Valid providers are sorted by least deliveries - highest provider priority - highest item count.
The first provider after that is picked.
User avatar
ZlovreD
Fast Inserter
Fast Inserter
Posts: 129
Joined: Thu Apr 06, 2017 1:07 pm
Contact:

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

Post by ZlovreD »

Optera wrote:Seems like an configuration error to me.
Without best effort/ignore min delivery size active providers have to have at least min_delivery_size of the requested item in stock to be valid.
Valid providers are sorted by least deliveries - highest provider priority - highest item count.
The first provider after that is picked.
I'm realise a core behaviour of LTN.
Maybe there some "blacklist" mechanics? Because as seen in screenshot "UpdateStop" step return actual amount of resources which provided by the station, and then LTN says what there is no stations with a4 ore.
Station have only train count and lenght limitations signals.

And when i was re-build station - it start supplying ore. As i has sayed - strange bug.
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.2.4

Post by Optera »

ZlovreD wrote:
Optera wrote:Seems like an configuration error to me.
Without best effort/ignore min delivery size active providers have to have at least min_delivery_size of the requested item in stock to be valid.
Valid providers are sorted by least deliveries - highest provider priority - highest item count.
The first provider after that is picked.
I'm realise a core behaviour of LTN.
Maybe there some "blacklist" mechanics? Because as seen in screenshot "UpdateStop" step return actual amount of resources which provided by the station, and then LTN says what there is no stations with a4 ore.
Station have only train count and lenght limitations signals.

And when i was re-build station - it start supplying ore. As i has sayed - strange bug.
There is no blacklist.
However deliveries are reserved the moment a train is sent to pick them up so multiple trains don't try and load the same item.
nuhll
Filter Inserter
Filter Inserter
Posts: 946
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

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

Post by nuhll »

Sometimes LTN is mysterios..... why he want to make a train with cooper 3357, 286 plastic and green cricuit 3400? (into a train with 2 vanilla wagons? max 4000) Min delivery is 3900 or 4000

Edit, found another example see screenshot

Only thing i changed was limit train 2, because sometimes waiting trains were blocking my main line, now he seems to nearly everytime create such silly orders, whats wrong? After some time its back to normal and he creates only deliverys with 3900 or 4000 (now i changed to 3950 and he created 3960) which is fine. Sometimes it happens when he say "merged delivers blabla 80 stacks" (is it possible to disable this? Atleast per station?
Attachments
fact2.jpg
fact2.jpg (2.32 MiB) Viewed 7248 times
fact.jpg
fact.jpg (2.53 MiB) Viewed 7248 times
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.2.4

Post by Mobius1 »

Hey optera, is it possible to make a map setting or map option to change the default 180s inactivity on load orders? I found a very annoying loop on work orders that changing that 180s to 5s would fix it.

The issue is with robots, more precisely, fast robots with high cargo capacity with the new 0.15 logistic system. When a robot goes to pickup the item, its cargo capacity is added to the system instead of the ammount of item being picked up, so, I have this situation happening:
1- A station requests 10 barrels of waste.
2- The producer (provider) has 7 barrels, the robot goes to pick it up (cargo 6).
3- The robot, while flying, changes the available item on the logistic network to 13 items (7+6 = 13).
4- A work order is issued to that location requesting 13 barrels (when there's only 8).
5- Another robot goes and picks up another waste barrel, the logistic shows 14 (8 + 6).
6- Another work order is issued to that location requesting 14 barrels when there's only 9 of them.

So the trains goes into the station and stand there waiting to get that ammount of barrels, but the work order load is 27 barrels when in the station there's only 9, so the trains will be standing there, waiting to be loaded past 20 seconds of inactivity. With a simple adjustement on the queue to 5s they would leave the station with 9 barrels and allow another train to pick up another work order.
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.2.4

Post by nagapito »

Mobius1 wrote:Hey optera, is it possible to make a map setting or map option to change the default 180s inactivity on load orders? I found a very annoying loop on work orders that changing that 180s to 5s would fix it.

The issue is with robots, more precisely, fast robots with high cargo capacity with the new 0.15 logistic system. When a robot goes to pickup the item, its cargo capacity is added to the system instead of the ammount of item being picked up, so, I have this situation happening:
1- A station requests 10 barrels of waste.
2- The producer (provider) has 7 barrels, the robot goes to pick it up (cargo 6).
3- The robot, while flying, changes the available item on the logistic network to 13 items (7+6 = 13).
4- A work order is issued to that location requesting 13 barrels (when there's only 8).
5- Another robot goes and picks up another waste barrel, the logistic shows 14 (8 + 6).
6- Another work order is issued to that location requesting 14 barrels when there's only 9 of them.

So the trains goes into the station and stand there waiting to get that ammount of barrels, but the work order load is 27 barrels when in the station there's only 9, so the trains will be standing there, waiting to be loaded past 20 seconds of inactivity. With a simple adjustement on the queue to 5s they would leave the station with 9 barrels and allow another train to pick up another work order.
Wait, what?
You must have some mod that is messing up the logistic network!

My logistics network doesnt do that, it actually does the opposite. While the robot has the item, the logistic network doesnt count it, so when the robot pick the 6, the logistic reports only 1, the one in the chest and ignores the 6 in the robot.

Even if it considered the 6 in the robot, it should only consider 1 in the chest, so it should never be 13!

Oh, and my logistic does this moving from active providers to storage chests, which are all chests that count for network content, if it was to requester chests would made sense of it ignoring the amount since request chest are ignored for network content.
Locked

Return to “Logistic Train Network”