old LTN discussion thread

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Locked
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.2.4

Post by Optera »

nuhll wrote: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?
Can't do anything without seeing the math LTN does when this happens.

nagapito wrote:
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.
My logistic network also subtracts items in transit. Sometimes even going into negative values when picking up items from active provider to storage.
You should attach these findings to the bug report about incorrect count of items in logistic network.

MannimMond
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon May 01, 2017 3:02 pm
Contact:

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

Post by MannimMond »

I'm lerning to love your mod, its just great! I'm at the point were i have +20 2-4-2 trains and a few smaller and now i want to split up the depot.
How can i say to one depot that there are only small trains allowed (1-2-1) and the other depot that are only 2-4-2 train alowed? I saw the description on the first page but i dont understand it yet ;D

nagapito
Filter Inserter
Filter Inserter
Posts: 361
Joined: Fri Jul 29, 2016 12:18 am
Contact:

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

Post by nagapito »

MannimMond wrote:I'm lerning to love your mod, its just great! I'm at the point were i have +20 2-4-2 trains and a few smaller and now i want to split up the depot.
How can i say to one depot that there are only small trains allowed (1-2-1) and the other depot that are only 2-4-2 train alowed? I saw the description on the first page but i dont understand it yet ;D
You dont need to do nothing fancy with combinators.

I created a depot with like 20 stations and called all of them Depot and gave it each station a depot signal.
Then, created a second depot for fluid wagons, with like 20 stations all called liquid depot and also the depot signal.
And then, I send the respective trains for each one, on their orders only the respective depot station and an inactivity 2 sec condition.

The thing is, trains dont forget the homee station, so, from now on, any train at the liquid depot, will do is order and always return to the liquid depot. Same for the normal depot trains.
If you want to have ALL stations with same name... then you will have to use circuits to restrict the trains it accepts, I think

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 »

MannimMond wrote:I'm lerning to love your mod, its just great! I'm at the point were i have +20 2-4-2 trains and a few smaller and now i want to split up the depot.
How can i say to one depot that there are only small trains allowed (1-2-1) and the other depot that are only 2-4-2 train alowed? I saw the description on the first page but i dont understand it yet ;D
Put a signal on the depot of minimum train lenght 8 (2+4+2) and only 8 and above will stand there. "Put a signal" means attach a constant combinator to the light on the train depot, same way you set it to be a depot, just add another signal with the train lenght and done!
Optera wrote:My logistic network also subtracts items in transit. Sometimes even going into negative values when picking up items from active provider to storage.
You should attach these findings to the bug report about incorrect count of items in logistic network.
Yeah I'm stress-testing it to make sure its a vanilla thing to report it.

QuirkyCat
Burner Inserter
Burner Inserter
Posts: 15
Joined: Wed May 17, 2017 11:11 am
Contact:

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

Post by QuirkyCat »

Been playing with this mod for over 70 hours on this map with no errors, then suddenly:

2997.863 Error MainLoop.cpp:850: Exception at tick 16044571:
Error while running event LogisticTrainNetwork::on_train_changed_state (ID 23)
__LogisticTrainNetwork__/control.lua:1507: attempt to perform arithmetic on field '?' (a nil value)

Loaded the last autosave and got same error.

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.2.5

Post by Optera »

QuirkyCat wrote:Been playing with this mod for over 70 hours on this map with no errors, then suddenly:

2997.863 Error MainLoop.cpp:850: Exception at tick 16044571:
Error while running event LogisticTrainNetwork::on_train_changed_state (ID 23)
__LogisticTrainNetwork__/control.lua:1507: attempt to perform arithmetic on field '?' (a nil value)

Loaded the last autosave and got same error.
Looks like the schedule is expecting an item in a trains inventory that isn't there.
Did you remove a mod while trains where shipping items added by it?

Fixed in next version.

QuirkyCat
Burner Inserter
Burner Inserter
Posts: 15
Joined: Wed May 17, 2017 11:11 am
Contact:

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

Post by QuirkyCat »

Optera wrote:
QuirkyCat wrote:Been playing with this mod for over 70 hours on this map with no errors, then suddenly:

2997.863 Error MainLoop.cpp:850: Exception at tick 16044571:
Error while running event LogisticTrainNetwork::on_train_changed_state (ID 23)
__LogisticTrainNetwork__/control.lua:1507: attempt to perform arithmetic on field '?' (a nil value)

Loaded the last autosave and got same error.
Looks like the schedule is expecting an item in a trains inventory that isn't there.
Did you remove a mod while trains where shipping items added by it?

Fixed in next version.
The only things I am shipping are coal, stone, iron ore and copper ore.
I did notice I ran out of trains at the depot.
The only other thing I can think of: I am replacing my power; could lack of power to stations have caused it?

Fantastic mod BTW.

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.2.5

Post by Optera »

QuirkyCat wrote:
Optera wrote:
QuirkyCat wrote:Been playing with this mod for over 70 hours on this map with no errors, then suddenly:

2997.863 Error MainLoop.cpp:850: Exception at tick 16044571:
Error while running event LogisticTrainNetwork::on_train_changed_state (ID 23)
__LogisticTrainNetwork__/control.lua:1507: attempt to perform arithmetic on field '?' (a nil value)

Loaded the last autosave and got same error.
Looks like the schedule is expecting an item in a trains inventory that isn't there.
Did you remove a mod while trains where shipping items added by it?

Fixed in next version.
The only things I am shipping are coal, stone, iron ore and copper ore.
I did notice I ran out of trains at the depot.
The only other thing I can think of: I am replacing my power; could lack of power to stations have caused it?

Fantastic mod BTW.
I can't replicate your bug. Let me know it 1.2.6 fixed it for you.

QuirkyCat
Burner Inserter
Burner Inserter
Posts: 15
Joined: Wed May 17, 2017 11:11 am
Contact:

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

Post by QuirkyCat »

QuirkyCat wrote:
The only things I am shipping are coal, stone, iron ore and copper ore.
I did notice I ran out of trains at the depot.
The only other thing I can think of: I am replacing my power; could lack of power to stations have caused it?

Fantastic mod BTW.
Went back to the previous auto save, before I binned the power.
Everything ran OK.
As soon as I binned the power again, trains full of ore started turning up at the depot.
LTN is sending them out on more work orders.
Then I get the error again.

QuirkyCat
Burner Inserter
Burner Inserter
Posts: 15
Joined: Wed May 17, 2017 11:11 am
Contact:

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

Post by QuirkyCat »

Looks like it was the lack of power.
Stations could not unload, so trains went back to depot still full.
Workaround: remove exit rail from depot, wait for all trains to enter, then ditch the power.

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.1.2

Post by ZlovreD »

Optera wrote:Making only specific compositions allowed at certain stations could be a new feature.
Still no ETA for this feature? =)

Btw, it is possible to add three "unified" signals for loco, cargo and fluid wagons in additional to based on entities prototypes? It could be useful in case when trains composited with different tiers/types of loco/wagons.

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.1.2

Post by Optera »

QuirkyCat wrote:Looks like it was the lack of power.
Stations could not unload, so trains went back to depot still full.
Workaround: remove exit rail from depot, wait for all trains to enter, then ditch the power.
The error still happened with 1.2.6?
Edit: still can't reproduce it.
ZlovreD wrote:
Optera wrote:Making only specific compositions allowed at certain stations could be a new feature.
Still no ETA for this feature? =)

Btw, it is possible to add three "unified" signals for loco, cargo and fluid wagons in additional to based on entities prototypes? It could be useful in case when trains composited with different tiers/types of loco/wagons.
Optera wrote:Thinking a bit about limiting trains to an encoded train composition I noticed it's ambiguous.
e.g. a terminus only setups 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.
Added to rejected requests.
Last edited by Optera on Wed May 17, 2017 4:48 pm, edited 1 time in total.

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.1.2

Post by ZlovreD »

Optera wrote:
ZlovreD wrote:
Optera wrote:Making only specific compositions allowed at certain stations could be a new feature.
Still no ETA for this feature? =)

Btw, it is possible to add three "unified" signals for loco, cargo and fluid wagons in additional to based on entities prototypes? It could be useful in case when trains composited with different tiers/types of loco/wagons.
Optera wrote:Thinking a bit about limiting trains to an encoded train composition I noticed it's ambiguous.
e.g. a terminus only setups 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.
Added to rejected requests.
So sad, cuz it's true only for L-[*]-L setups and work for L-[*].

And about "unified" signals?

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.1.2

Post by Optera »

ZlovreD wrote:So sad, cuz it's true only for L-[*]-L setups and work for L-[*].
Features have to work for any possible configuration.
And about "unified" signals?
I will not add redundant signals. You can easily map entity specific signals into one entity.

Unfug
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Jan 09, 2017 7:12 pm
Contact:

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

Post by Unfug »

Since the "2 sec inactivity" is on " and " mode, they wont leave my Stations until Full or inactive.... making the " get 2.5k xyz " useless....

do i have to set the " provider" thingi? it was working on my old game without that ... :)

nagapito
Filter Inserter
Filter Inserter
Posts: 361
Joined: Fri Jul 29, 2016 12:18 am
Contact:

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

Post by nagapito »

Maybe you should make a FAQ and put a link directly to it with some very big and colourful text so players can not miss it on the first page and the mods page! :P

QuirkyCat
Burner Inserter
Burner Inserter
Posts: 15
Joined: Wed May 17, 2017 11:11 am
Contact:

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

Post by QuirkyCat »

Optera wrote:
QuirkyCat wrote:Looks like it was the lack of power.
Stations could not unload, so trains went back to depot still full.
Workaround: remove exit rail from depot, wait for all trains to enter, then ditch the power.
The error still happened with 1.2.6?
Edit: still can't reproduce it.

Seems to be fixed now.
Thanks for the swift responses and fix.

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.2.6

Post by Optera »

nagapito wrote:Maybe you should make a FAQ and put a link directly to it with some very big and colourful text so players can not miss it on the first page and the mods page! :P
I'll update the "setting up a station" section of the opening post and will continue to ignore anything that has been answered multiple times already.

nagapito
Filter Inserter
Filter Inserter
Posts: 361
Joined: Fri Jul 29, 2016 12:18 am
Contact:

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

Post by nagapito »

I know its a request for one more signal, yadda yadda, but... you know one signal that could really really be useful?

Ignore provider signal!

No matter how much is on that station, its never a provider. I there might be more scenarios where this might be useful but to me, is when I screw up. One wrong cable and wasnt measuring correctly the inventory (or this case wrong signal, was reading carbon recipe intead of carbon). When I fixed the signal, I had extra 70k carbon at a station that will use it very slowly and I dont want this station to receive request orders since its not fitted for loading. I have to disable the station signals and hope I remember one day to re-add it again...
The signal would just solve problems like this

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.6

Post by Mobius1 »

nagapito wrote:I know its a request for one more signal, yadda yadda, but... you know one signal that could really really be useful?

Ignore provider signal!

No matter how much is on that station, its never a provider. I there might be more scenarios where this might be useful but to me, is when I screw up. One wrong cable and wasnt measuring correctly the inventory (or this case wrong signal, was reading carbon recipe intead of carbon). When I fixed the signal, I had extra 70k carbon at a station that will use it very slowly and I dont want this station to receive request orders since its not fitted for loading. I have to disable the station signals and hope I remember one day to re-add it again...
The signal would just solve problems like this
If that station is requesting carbon from the network, it'll have a negative carbon signal, just input your logistic signal in the lamp that the station will never request carbon unless it drops below the threshold of your min-delivery size.
For example:
Image
As you can see on the image, the combinators requesting stuff outputs negative signals, the combinator just below the logistic interface is to filter positive signals only, so robot carrying items around won't be sent to the station avoid accidentally creating a request.

Locked

Return to “Logistic Train Network”