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: 2917
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [Mod 0.14] Logistic Train Network 0.9.7

Post by Optera »

0.9.7 - Fix for 0.9.6
I messed up copy & paste making Ignore Minimum Delivery Size always true. Sorry for that.
While at it I also sorted signal order so they are grouped by station type: Depot, Requester & Provider, Requester, Provider
Nilaus wrote: I am still loving the mod, but I now have a problem with it that kind of breaks it for me. I mentioned it earlier, but didn't get a reply.
It seems that once you have more than X (10?) things being requested that cannot be delivered then it goes into an infinite spamming loop of error messages which makes the game unplayable with the mod.
Now I have to remove requests from the network, which will drastically limit the usefulness of the mod. Can you please take a look at this, since it seems like a pretty straight forward bug?
Not a bug: Your message_filter_size in config.lua simply is too small. By default only the last 10 duplicate messages are suppressed. Raise it to 20 or more when using Angels/Bobs.

nuhll
Filter Inserter
Filter Inserter
Posts: 923
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: [Mod 0.14] Logistic Train Network 0.9.7

Post by nuhll »

Hm.

Works better, thanks for update.

Now another problem, today my first try with filter inserters... i did a green cable from pole which is connectet to the lamp to all filter inserters, on one station it works (iron ore) on the other (copper ore) its not working (he dont set the filter) Its set to the same (i even copied the iron ore settings, and he remove iron ore, but wont add copper ore...)?


I dont see any difference besides on the one station its iron ore and the other is copper ore.

Also, why does he load copper and iron ore, if he only want to get 4000 iron ore e.g.? (he says get 4000 copper ore to a station which has copper and iron ore and then set filter to iron AND copper ore... wtf?) Will he send the wrong loaded ore to the correct station? Why even use filter inserters when he use the filters wrong? :D
What else i can do?

Edit: okay after i did all the cables from scratch it worked. DOnt know why. It seems to ONLY work WHEN NOT CONNECTET to the lamp...??

Still he sends trains to get e.g. IRON ORE from a station which has IRON ORE and COPPER ORE and load BOTH via FILTER inside only to UNLOAD ONLY one resource...???

Edit2: Now copper unloading is working, iron is not working even i didnt changed anything (just changed 12k deliver to 60k to test if its working)
Attachments
test.jpg
test.jpg (2.6 MiB) Viewed 7588 times

Hallonen
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Jul 21, 2016 7:27 pm
Contact:

Re: [Mod 0.14] Logistic Train Network 0.9.7

Post by Hallonen »

I just installed this mod on a server, but the joy was short lived as I got the following error before the server seized up.

Code: Select all

Error Main.cpp:509: Couldn't load the game for MP: Error while running the on_load: Unknown item name: signal-green
stack traceback:
	__LogisticTrainNetwork__/control.lua:1208: in function 'UpdateStopOutput'
	__LogisticTrainNetwork__/control.lua:27: in function <__LogisticTrainNetwork__/control.lua:23>
Now I am unable to start the server again with this mod active on the save.
I tried loading in singleplayer as well, but I get the same error and the game quits.

nuhll
Filter Inserter
Filter Inserter
Posts: 923
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: [Mod 0.14] Logistic Train Network 0.9.7

Post by nuhll »

I found the bug (??).

If i set -12000 on iron ore = filter disapears, if i set it to e.g. -1600 it works. How? Why? Oo WTF?!

On iron i cant use -12000 which i had before, or filter disapears, on copper i can set it to -12000.... what the hell? :D

torne
Filter Inserter
Filter Inserter
Posts: 341
Joined: Sun Jan 01, 2017 11:54 am
Contact:

Re: [Mod 0.14] Logistic Train Network 0.9.7

Post by torne »

nuhll wrote:I found the bug (??).

If i set -12000 on iron ore = filter disapears, if i set it to e.g. -1600 it works. How? Why? Oo WTF?!

On iron i cant use -12000 which i had before, or filter disapears, on copper i can set it to -12000.... what the hell? :D
I think you might be mixing up the input and the output on the LTN station. The lamp is an *input* to the station - you are supposed to connect a signal to the lamp telling the system what resources are currently available or currently requested. The combinator is the output - the combinator tells you what to load or unload from the current train.

The filter inserters aren't supposed to be connected to the lamp, they're supposed to be connected (via a counter or some other combinator logic) to the station's output combinator. When a train arrives, the output combinator will have a signal on it telling you how many of which resources are expected to be loaded/unloaded from this train, which is what you can use to configure the filter inserters. However, you need to count how many items you are loading onto the train, because the numbers provided by the station don't update as you load the train - you need to do the counting yourself so you dont' load too much.

nuhll
Filter Inserter
Filter Inserter
Posts: 923
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: [Mod 0.14] Logistic Train Network 0.9.7

Post by nuhll »

So.

Connect lamp to chests and inserters to constant combinator and constant combinator to lamp? (dont seem to change anything)

Still, if i set -6000 the filter inserters will work, if i set to -12000 they wont - why?

Also, i dont want to count anything. I want that a train that want to load 4000 iron ore only get iron ore. Why mod sets filters also to copper ore?

Edit: Okay, the ore mixing seems to be fixed by redoin the cables, thanks. Only problem: sometimes high "-" values dont work. Dont know why. Sometimes it works then if you do like this -6000, -7000,-8000,-9000,-10000 (until your desired number) weird.

On Coal i cant set it higher than -2500 ... annoying bug.

Hallonen
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Jul 21, 2016 7:27 pm
Contact:

Re: [Mod 0.14] Logistic Train Network 0.9.7

Post by Hallonen »

Hallonen wrote:I just installed this mod on a server, but the joy was short lived as I got the following error before the server seized up.

Code: Select all

Error Main.cpp:509: Couldn't load the game for MP: Error while running the on_load: Unknown item name: signal-green
stack traceback:
	__LogisticTrainNetwork__/control.lua:1208: in function 'UpdateStopOutput'
	__LogisticTrainNetwork__/control.lua:27: in function <__LogisticTrainNetwork__/control.lua:23>
Now I am unable to start the server again with this mod active on the save.
I tried loading in singleplayer as well, but I get the same error and the game quits.
It seems that the error happens when a train with a green signal in the circuit condition for when it should leave the station, set when we still had smart trains installed, enters a logistic station.

nuhll
Filter Inserter
Filter Inserter
Posts: 923
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: [Mod 0.14] Logistic Train Network 0.9.7

Post by nuhll »

Dont get it, the filters for the unloading get removed as sson as my signal is + instead of - ...? What i am doin wrong... isnt it intendet to use filter inserters on unloading? I dont want wrong materials on my lanes...!? If i dont use filter inserters it works perfect, besides i have all shit on my lanes now... :o

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

Re: [Mod 0.14] Logistic Train Network 0.9.7

Post by Optera »

nuhll wrote:Now another problem, today my first try with filter inserters... i did a green cable from pole which is connectet to the lamp to all filter inserters, on one station it works (iron ore) on the other (copper ore) its not working (he dont set the filter) Its set to the same (i even copied the iron ore settings, and he remove iron ore, but wont add copper ore...)?
You connected filter inserters to the input instead of the output.
Please read the OP and check the demo map.
Hallonen wrote:
Hallonen wrote:I just installed this mod on a server, but the joy was short lived as I got the following error before the server seized up.

Code: Select all

Error Main.cpp:509: Couldn't load the game for MP: Error while running the on_load: Unknown item name: signal-green
stack traceback:
	__LogisticTrainNetwork__/control.lua:1208: in function 'UpdateStopOutput'
	__LogisticTrainNetwork__/control.lua:27: in function <__LogisticTrainNetwork__/control.lua:23>
Now I am unable to start the server again with this mod active on the save.
I tried loading in singleplayer as well, but I get the same error and the game quits.
It seems that the error happens when a train with a green signal in the circuit condition for when it should leave the station, set when we still had smart trains installed, enters a logistic station.
Exactly, LTN keeps track of which items should be un-loaded at each station through the automatic generated schedules. Virtual signal names are unknown in item name context resulting in this error.

Edit: circuit conditions shouldn't be a problem in 0.9.8 anymore

Anson
Fast Inserter
Fast Inserter
Posts: 249
Joined: Sun May 22, 2016 4:41 pm
Contact:

Re: [Mod 0.14] Logistic Train Network 0.9.3

Post by Anson »

two weeks of being busy and/or looking at some other games and corresponding "let's play"s (ONI, ProdLine, LogicBots), and this thread has grown by 5+ pages :-)

sorry to make a post consisting mostly of long quotes, but this might be a bit difficult to find in folded parts of other long discussions on pages 10 and 11 of this thread ...
Optera wrote:
steinio wrote:Suggestion: Delete schedule after delivery and asign a new train if neccessary.
Using stackers seems oddly popular.
Once trains arrive back at the depot deliveries and schedule are reset in one go. I guess there's no harm in deleting deliveries once they depart the requester apart from loosing a potential warning of trains getting stuck on their way from requester to depot.
this somehow reminds me of my old suggestion to add a refuel station at the end of a route:
Anson wrote:SUGGESTION - REFUELING STATIONS AND STACKERS IN FRONT OF DEPOTS
a useful addition might be to have refueling stations. they wouldn't have to be as variable as those from SmartTrains, but i would like to have them separate from the depot to avoid the need to build one depot signal and all the refueling logistics at each waiting space in big depot stackers. trains simply could start at a depot, get their orders (pickup at provider and drop at requester), and then finish their route at a refueling station (if available; could be marked with a logic signal, similar to depots). after refueling they would return to the depot station. this also could allow to have only a single refueling station (or one for each train length), then a giant stacker (without any train signals, etc), and finally only one depot (maybe with a few lanes to allow faster leaving after getting orders). if trains start at the depot and end their route at the refueling station, there would be no problem with orders timing out while slowly returning home, or waiting in a stacker in front of a depot.
if there are no refueling stations, everything would be handled like now, discarding deliveries at the depot. if there are refueling stations, trains would go there after finishing the delivery and orders (besides a last single "goto depot") would be discarded there.

for clarification: "refueler station" is just a name for a waypoint between requester and depot. it should in no way behave like the smart train's refueler stations, but only give the opportunity to do something with the trains after the delivery and before the depot, eg refueling and/or emptying wrong cargo from wagons (at one or very few of such parallel "refueling stations") and/or simply waiting in a stacker (with lots of parallel or even "sequential" waiting spaces between refueling stations and depot stations) without causing a timeout, before trains are waiting for new orders at very few depot stations.

There might be a problem of pairing those waypoints/refuelers with depots, if there are several groups of depots (eg one group of depots with one name for long trains, and another group of depots with one other name for short trains). A solution to this might be as easy as "hardwiring" the pairing, eg by sending all trains from a depot named "short" to a waypoint/refueler named "WP-short", and all trains from a depot named "long" to a waypoint/refueler named "WP-long", etc.
maybe those orders even could always(!) be added to train schedules as third destination (1 goto pickup xxx, 2 goto drop yyy, 3 goto waypoint wp-zzz, 4 goto depot zzz) no matter whether those stations wp-zzz exist (automatically showing them in red and skipping them if they don't exist). train orders and the delivery jobs would be cleared (and replaced by "goto depot zzz") at those waypoints/refuelers as well as at depots, and thus trains would get no more timeouts after passing such waypoints/refuelers.

the above old suggestion was declined by Optera:
Optera wrote:By outputing the encoded train composition LTN already allows for a more versatile and complex refueling system than smart trains.
I can see how a single refueling station would be less effort than having one at every depot.
My reasoning against dedicated refueling is this. Most networks need to remove left over items from trains somewhere. Best place to do that is the depot as all trains will go there. That means you end up with a unloading mechanism at every depot so it's just a matter of adding some more inserters and chests to add a refueling system.

Having dedicated refueling station(s) begs a lot of questions:
Is this even a feature that will be used by a majority of players?
Is it really less effort to ensure all possible stations and depots are reachable from the refueling station than stamping down some chests and inserters in existing depots?
How would LTN ever know which refueling station to use?
Are we back to using backer names and allow only one specific naming scheme for for refueling across all possible forces?

Why build a stacker in front of the depot? Just plant a LTN-stop at every stacker rail. :roll:
one possible setup which would avoid most of these questions and problems would be to have a split from the main network and its mainline, some parallel "refueling / wagon cleaning" stations (maybe one each for different train lengths etc), followed by large stackers (maybe one stacker behind each refueler), then depots (also one or two per type of train), and finally a merge back onto the mainline of the network.
This should be similarly simple (concerning "reachability") as the current setups with a split from the mainline, dozens of parallel depot stations and a merge of all the depots back to the mainline, but enable additional variants by optionally separating refueling, cleaning, stacking, and waiting instead of doing everything at one single depot station and thus needing to setup everything at every depot rail.

Anson
Fast Inserter
Fast Inserter
Posts: 249
Joined: Sun May 22, 2016 4:41 pm
Contact:

Re: [Mod 0.14] Logistic Train Network 0.9.3

Post by Anson »

my thoughts about several other posts :
+ pairing of stations
- having a GUI and getting rid of min+max train length
- active provider stations
+ general hint - limits of slow and stack filter inserters
+ accidentally making a requester station into a provider station

Malryn
Inserter
Inserter
Posts: 33
Joined: Fri Apr 22, 2016 7:33 pm
Contact:

Re: [Mod 0.14] Logistic Train Network 0.9.8

Post by Malryn »

This mod is the best thing since sliced bread. I was very disheartened when I kept failing trying to get SiggyBoy's contaminator creation for smart trains but your mod gave me hope :).

I am at 200 trains working and things are moving amazingly well with only 30 fps. The only thing that has been irking me not being able to split up the network. With so many trains moving around it is so easy for them to get boxed up and cause a traffic jam If the network gets too many requests come in a particular area of the factory. I would like to dedicate particular depos to only work in certain stations or only stations that are connected via rail to the depo. Perhaps a combinator solution?

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

Re: [Mod 0.14] Logistic Train Network 0.9.8

Post by Optera »

@Anson
welcome back to the forum time to celebrate with a wall of text :P

Sorry, making stackers in front of depots useful is not a step towards adding a conditional refueling stop. You can however get away with trains waiting in front of a few depots now so you don't have to stamp down depots that often.
Malryn wrote:This mod is the best thing since sliced bread. I was very disheartened when I kept failing trying to get SiggyBoy's contaminator creation for smart trains but your mod gave me hope :).

I am at 200 trains working and things are moving amazingly well with only 30 fps. The only thing that has been irking me not being able to split up the network. With so many trains moving around it is so easy for them to get boxed up and cause a traffic jam If the network gets too many requests come in a particular area of the factory. I would like to dedicate particular depos to only work in certain stations or only stations that are connected via rail to the depo. Perhaps a combinator solution?
I'd be interested to know how many LTN stops your network has and how much UPS LTN by itself takes.
Trains will always return to the depot (name) they are initially sent to and you can dedicate certain stations to specific train lengths.
e.g. "Supply Train Depot" having only L-CC-L trains and stops dedicated only for those with min train length = 4 = max train length

nuhll
Filter Inserter
Filter Inserter
Posts: 923
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: [Mod 0.14] Logistic Train Network 0.9.8

Post by nuhll »

Instead of just helping me.

I read your "well written" guide.

I did now all cabeling from scratch.

I connectet via green cable constant combinator to the lamp.

Then i connectet the lamp with green cable all chests.

Then i connectet with red wire all filter inserters with the combinator. Not working. (i set filter inserters on "set filter")

WHAT im doin wrong. I dont get it. Its only working when the number is positive, i dont understand it.

And no, on your screenshot you cant see anything. It would be much easier if you just write "Connect X with X with X" and "X with X with X"....
Attachments
asd.jpg
asd.jpg (2.94 MiB) Viewed 7520 times

nuhll
Filter Inserter
Filter Inserter
Posts: 923
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: [Mod 0.14] Logistic Train Network 0.9.8

Post by nuhll »

Okay, i watched a video tutorial. I did as in the video, its not working, it wont set filters, please tell me whats wrong.
Attachments
aqsd1.jpg
aqsd1.jpg (3 MiB) Viewed 7517 times

torne
Filter Inserter
Filter Inserter
Posts: 341
Joined: Sun Jan 01, 2017 11:54 am
Contact:

Re: [Mod 0.14] Logistic Train Network 0.9.3

Post by torne »

Anson wrote: the suggestion sounds interesting at first, but since you would need a requester station that asks for very small amounts (single items) (to simulate storage chests), and that would then cause all trains to go and try to deliver those single items, i don't see how that could be achieved in a useful way without disturbing the whole network.
I also don't see why transports of such trash (with a huge volume) would require different treatment than transports of other resources like ore.
I wasn't proposing any kind of storage, just a way to make sure a no-longer-wanted provider won't stop being used once it has less than a minimum delivery. i.e. the resources would still just be delivered to requesters as usual, and if no station was requesting that resource it would just sit there. For my purposes (closing down old parts of the factory) that would work fine because basically every resource will eventually be requested somewhere, and anything that does end up left over will just get picked up when i deconstruct the station.

I might have made this sound more complicated than i meant by describing it as being like an active provider; I really did just mean for it to make that specific station behave as if best effort was enabled and nothing else.

downriver_bob
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sun Mar 12, 2017 4:20 am
Contact:

Re: [Mod 0.14] Logistic Train Network 0.9.8

Post by downriver_bob »

Does anyone know of a way to block requests from being filled from a particular stop? My usage case:

Stop A has newly crafted steel barrels.
Stop B requests empty barrels to be belted back into stop A to be provided to the system again for refilling
Stop C has barrels that have been used and emptied.

Is there a way to prevent Stop B requesting barrels from Stop A to avoid trains running back and forth to stops right next to each other endlessly?

EDIT: Also, has anyone got the "Ignore Minimum Delivery Size" condition input working? I have mine set on the provider, as the first post indicates, but a train is never dispatched to the provider, unless I increase the request to above the "Minimum Delivery Size" condition

Screenshot attached, Stop A at the bottom, Stop B at the top, Stop C is multiple places around the factory emptying barrels.
Screenshot (17).png
Screenshot (17).png (2.57 MiB) Viewed 7511 times

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

Re: [Mod 0.14] Logistic Train Network 0.9.8

Post by Optera »

nuhll wrote:Instead of just helping me.

I read your "well written" guide.

I did now all cabeling from scratch.

I connectet via green cable constant combinator to the lamp.

Then i connectet the lamp with green cable all chests.

Then i connectet with red wire all filter inserters with the combinator. Not working. (i set filter inserters on "set filter")

WHAT im doin wrong. I dont get it. Its only working when the number is positive, i dont understand it.

And no, on your screenshot you cant see anything. It would be much easier if you just write "Connect X with X with X" and "X with X with X"....
This kind of reminds me of a Haiku.

At unloading it should be obvious you have to flip signs. "each * -1 = each"

You complain about screenshots not telling you anything and what do you do? Post screenshots. :roll:
downriver_bob wrote:Does anyone know of a way to block requests from being filled from a particular stop? My usage case:

Stop A has newly crafted steel barrels.
Stop B requests empty barrels to be belted back into stop A to be provided to the system again for refilling
Stop C has barrels that have been used and emptied.

Is there a way to prevent Stop B requesting barrels from Stop A to avoid trains running back and forth to stops right next to each other endlessly?

Screenshot attached, Stop A at the bottom, Stop B at the top, Stop C is multiple places around the factory emptying barrels.
Stop B:
min Delivery Size = 10 * 40 * #wagons
total requested size = min Delivery Size * 3

Stop A:
provider Priority: 0
ignore min Delivery Size :0

Stop(s) C:
provider Priority: 1
ignore min Delivery Size :0 (1 would result in trains pointlessly rushing to C to ship as little as 1 barrel to B)
EDIT: Also, has anyone got the "Ignore Minimum Delivery Size" condition input working? I have mine set on the provider, as the first post indicates, but a train is never dispatched to the provider, unless I increase the request to above the "Minimum Delivery Size" condition
Deliveries are only generated when requesters fall below min Delivery Size threshold.
Best Effort and Ignore min Delivery Size change which providers are eligible.

downriver_bob
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sun Mar 12, 2017 4:20 am
Contact:

Re: [Mod 0.14] Logistic Train Network 0.9.8

Post by downriver_bob »

Optera wrote:
downriver_bob wrote:Does anyone know of a way to block requests from being filled from a particular stop? My usage case:

Stop A has newly crafted steel barrels.
Stop B requests empty barrels to be belted back into stop A to be provided to the system again for refilling
Stop C has barrels that have been used and emptied.

Is there a way to prevent Stop B requesting barrels from Stop A to avoid trains running back and forth to stops right next to each other endlessly?

Screenshot attached, Stop A at the bottom, Stop B at the top, Stop C is multiple places around the factory emptying barrels.
Stop B:
min Delivery Size = 10 * 40 * #wagons
total requested size = min Delivery Size * 3

Stop A:
provider Priority: 0
ignore min Delivery Size :0

Stop(s) C:
provider Priority: 1
ignore min Delivery Size :0 (1 would result in trains pointlessly rushing to C to ship as little as 1 barrel to B)
I'm using Bobs mods, so barrels stack to 20. So instead of min delivery size = 10 * 40 * #wagons I used 20 * 40 * #wagons, is this right? Because it didn't work, it just sent the trains back into an infinite loop taking barrels from Stop A to Stop B, they get belted back into Stop A and then the trains take them right back to Stop B again for another round.

I'm intending to use this as an "active provider" type functionality to remove byproducts and empty barrels etc. from the system and hopefully avoid it clogging, then I can store/reprocess the byproducts at another location. All of my stops are either requester only or provider only, so generally there is 1 provider and 1 requester stop per manufacturing area and the majority of them provide and request multiple items.
Optera wrote:
downriver_bob wrote:
EDIT: Also, has anyone got the "Ignore Minimum Delivery Size" condition input working? I have mine set on the provider, as the first post indicates, but a train is never dispatched to the provider, unless I increase the request to above the "Minimum Delivery Size" condition
Deliveries are only generated when requesters fall below min Delivery Size threshold.
Best Effort and Ignore min Delivery Size change which providers are eligible.
So in using "Ignore Minimum Delivery Size" at a Provider station it should send a delivery when the requester falls below the requested amount? Eg. Requesting 5000 x, when it goes to 4999 x, a delivery is generated containing 1x?

I haven't been able to make this work, is there something I'm missing?

Anson
Fast Inserter
Fast Inserter
Posts: 249
Joined: Sun May 22, 2016 4:41 pm
Contact:

Re: [Mod 0.14] Logistic Train Network 0.9.8

Post by Anson »

Optera wrote:Sorry, making stackers in front of depots useful is not a step towards adding a conditional refueling stop.
I do NOT want conditional refueling. I explicitly said that.
I only want a train stop after delivering all items and before trains wait at a depot so that they are cleaned up and refueled as early as possible : unloading "bad cargo" or refueling trains can only be done at a train stop. thus if there are no waypoints (or however you will call them), trains have to wait unrefueled and (sometimes) with "bad cargo" in front of a depot, until they finally can advance to the depot and then be handled there. if not all trains are always needed, some trains might wait for days or forever until they are cleaned at a depot.
Optera wrote:You can however get away with trains waiting in front of a few depots now so you don't have to stamp down depots that often.
nice. this at least allows to have only a few rails with all the inserters and logistics to unload "bad cargo", refuel, etc instead of needing one such beast for every single train (of dozens or even hundreds of trains in the network).
although i would prefer to do that before the trains wait for an uncertain amount of time in front of a depot.

Locked

Return to “Logistic Train Network”