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:

old LTN discussion thread

Post by Optera »

The original thread for this mod before it got its own subforum.
Last edited by Optera on Wed Jul 19, 2017 7:00 am, edited 213 times in total.

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

[Mod 0.14/0.15] Logistic Train Network 1.4.1

Post by ssilk »

I like the idea to distinct request and provision via positive and negative numbers.
Will try it.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

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

Re: [Mod 0.14] Logistic Trains

Post by Optera »

I've updated it to a usable beta version.
Feel free to test and please report bugs here or on github.

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

Re: [Mod 0.14] Logistic Trains

Post by Optera »

Updated to a working mod. It's running for 3h on a real base without problems now. 10 trains 30 station ~0.09 UPS.
Last edited by Optera on Sat Nov 12, 2016 8:14 pm, edited 1 time in total.

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

Re: [Mod 0.14] Logistic Trains

Post by ssilk »

Some kind of issue:
LogisticTrains04.zip
(5.05 MiB) Downloaded 271 times
When you watch the unload-station you see it loads sometimes multiple items, but unloads only one.
The waiting condition is for example
"stone = 0"
but needs to be
"stone = 0" AND "circuits = 0"
Etc.
:) Maybe we need also some kind of "maximum-waiting-time"-condition?


I found also an issue with your save: After 3.5 minutes a train will be loaded at the depot with two single piece of fuel (from a former train load). With that the train cannot be loaded fully at his next loading station and it waits forever.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

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

Re: [Mod 0.14] Logistic Train Network

Post by Optera »

Loading multiple items can happen. The loading stations and refueling in my demo is very very basic to the point where it just works.
I want to give players a tool that's simpler to use than combinator magic, but still needs to be thought through on how to load/unload trains.

Your save was using 0.1.0, which had a lot of problems. Most annoying for me was it kept sending a 30 item orders right after a 1k order.
That has been fixed in 0.2.0, if you set min_delivery_size signal at each request station.

I have renamed the mod to Logistic Train Network to make it more clear what it's about.
Here's the demo with the new mod name. Let me know if the loading problem still exists.
Last edited by Optera on Sat Nov 19, 2016 8:10 am, edited 1 time in total.

User avatar
hitzu
Filter Inserter
Filter Inserter
Posts: 530
Joined: Tue Sep 09, 2014 5:55 pm
Contact:

Re: [Mod 0.14] Logistic Train Network

Post by hitzu »

WOW! Why I didn't see this mod yesterday? I would spend all weekends playing with it. I gonna try this mod as soon as I can.
Does it work with modded locomotives such as electric or atomic trains?

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

Re: [Mod 0.14] Logistic Train Network

Post by Optera »

It does work with any mod added locomotives.
Currently it can't automatically detect the size of modded wagons. Only base cargo wagon and RailTanker are supported.
Will read inventory size from any cargo wagon added by mods. Fluids are limited to RailTanker. As far as I know it's the only one working well with item count schedule rules.

SootStack
Burner Inserter
Burner Inserter
Posts: 8
Joined: Fri Aug 12, 2016 3:46 pm
Contact:

Re: [Mod 0.14] Logistic Train Network

Post by SootStack »

Thank you so much! Vanilla trains left so much to be desired.

Questions:

Can I have multiple depot stations?
Do depots / providers / requester stops need to be wired together?

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

Re: [Mod 0.14] Logistic Train Network

Post by Optera »

SootStack wrote:Questions:

Can I have multiple depot stations?
You can have as many depots as you want by naming them "Depot". Factorio trains have the nice feature of going to their nearest station of the backer name in their schedule.

I planned on changing it to either allow varying names after a whitespace e.g "Depot LL-CCCC-LL" or add a virtual signal to turn stops into depots.
Both options would break automatic search for a near free depot and are on hold until players really want to have that added complexity.
Do depots / providers / requester stops need to be wired together?
No, stops communicate with each other remotely. Wiring between stops would break the whole logic.
All you have to wire up are the (un-)loading chests to the lamp and train-chest inserters to the yellow combinator if you want them controlled by signals from parked trains.

Make sure the combinator and lamp are not connected and you don't send color signals to the lamp.
It has it's own controller and will go into error state if it detects any color signals.

jeffstan123
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Nov 18, 2016 12:39 am
Contact:

Re: [Mod 0.14] Logistic Train Network

Post by jeffstan123 »

Is it possible you can go more in depth with the instructions for setting the stations up please.

Thanks

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

Re: [Mod 0.14] Logistic Train Network

Post by ssilk »

I recommend to have a deep look into the demo-save above.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

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

Re: [Mod 0.14] Logistic Train Network

Post by Anson »

ssilk wrote:I recommend to have a deep look into the demo-save above.
I tried that since instructions like "make sure output and station are connected" (which output? which part of the station? etc) were of no use to me. but when i loaded the demo map, it didn't take long until the mod crashed even though i did nothing besides running around ...

here is what happened :
- loaded the demo map
- after a few moments, copper was transported
- after some more moments, i got the message
[LTN] Delivery: 5000 fluid,crude-oil from Oil 1 to Oil Unload running for 18060 ticks deleted after time out
- immediately followed by the crash message

Code: Select all

Notice
Error while running event on_tick (ID 0)
__LogisticTrainNetwork__/control.lua:469:
attempt to index field 'Deliveries' (a nil value)
Since Factorio should be deterministic, shouldn't the map crash for everybody who loads it and tries to watch it for a few minutes (including ssilk) ?

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

Re: [Mod 0.14] Logistic Train Network

Post by Optera »

Thanks for the error report, it's fixed in 0.3.11.
If ssilk made continuous version updates it may result in different results than jumping from 0.3.0 to 0.3.10.
Migrating from the old demo save to 0.3.11 works for me.
I tried that since instructions like "make sure output and station are connected" (which output? which part of the station? etc) were of no use to me
Stops consist of 3 entities, the stop itself and the automatic placed lamp(input) and constant combinator(output).

I'll upload 0.3.11 when i feel better and can think straight again.

SeVenT71
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Nov 18, 2016 10:57 pm
Contact:

Re: [Mod 0.14] Logistic Train Network

Post by SeVenT71 »

Hello, I would like to use your mod to facilitate the work of the trains, but I do not manage, is there the possibility of having a tutorial in french?

I do not speak english, sorry.

zebediah49
Fast Inserter
Fast Inserter
Posts: 119
Joined: Fri Jun 17, 2016 8:17 pm
Contact:

Re: [Mod 0.14] Logistic Train Network

Post by zebediah49 »

My attempts to use this resulted in the error --

Code: Select all

Error while running event on_built_entity (ID 6)
__LogisticTrainNetwork__/control.lua:137: attempt to index field 'LogisticTrainStops' (a nil value)
I wanted to test it, so used Creative Mode to grant me all techs, free stuff -- then built a track and put a logistics train stop on it.

Looking over the code, it looks like the only time `global.LogisticTrainStops` is defined is in the `on_configuration_changed` -- so if you add the mod to an existing map you're fine, but it doesn't appear to work on a fresh map. Methinks you probably want quite a bit of the new-game payload that's in `on_configuration_changed` to be duplicated (or function'd out) in `on_init` as well.

E: After intentionally cycling mods on/off, I got it working... additional crashes happened when
  • A train is modified while delivering a route (ex. removing a car when in a stations).
  • A train with a non-standard car (ex. a Battle Trains wagon) attempts to service a route
Also, if there are no available items, having the mod throw a console message about it every couple seconds gets old pretty fast.

Still, a really cool mod. I very well might try to use it in a real game, even with the "tiptoe around it or the game crashes" issues.

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

Re: [Mod 0.14] Logistic Train Network

Post by Optera »

As promised here's 0.3.11 hopefully fixing your reported errors and a new demo map.
A train is modified while delivering a route (ex. removing a car when in a stations).
Trains destroyed, mined while delivering will gracefully be removed from active delivery.
There's a small bug with the lamp at stations involved in the delivery showing wrong status.
A train with a non-standard car (ex. a Battle Trains wagon) attempts to service a route
Battle Trains works fine for me.
Last edited by Optera on Sun Nov 20, 2016 9:13 am, edited 2 times in total.

jsalomon
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sat Nov 19, 2016 8:00 am
Contact:

Re: [Mod 0.14] Logistic Train Network

Post by jsalomon »

Fantastic mod :D - I'm quite enjoying my experimentation with it.

Two quality-of-life issues (that is to say, not deal-breakers at all, but still might be nice to fix if time exists):

1) As zebediah mentioned, constant console messages aren't all that great. My first thought would be to report it once, and then not say anything until the item exists again, though I have no idea how this is tracked under-the-hood so that may be nontrivial (also in the case of constant flipping between available and unavailable it would still end up with the same effect).
zebediah49 wrote:Also, if there are no available items, having the mod throw a console message about it every couple seconds gets old pretty fast.
2) I tried out an extreme case of delivery, where I put 12 steel chests worth of unload at a requester stop, and then placed a large enough request to fill all of those. This sent an absurd number of trains over to the station, which immediately backed up a queue into the main line and pretty much deadlocked the entire system while waiting for the unloads to slowly happen. To some extent this is solved by just making bigger stations with more waiting room, but one feature that would be really nice would be a per-station signal for "maximum number of trains which are allowed to simultaneously include this station in their route" (either with some kind of reasonable default, like 1-3 ish, or default to infinite as currently appears to be the case). The downside is that this could sometimes cause the station to be underfilled (since a train which has left this station but not yet reached the depot would still likely count against this total), but I think it could still be worth it.

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

Re: [Mod 0.14] Logistic Train Network

Post by Optera »

jsalomon wrote:Fantastic mod :D - I'm quite enjoying my experimentation with it.

Two quality-of-life issues (that is to say, not deal-breakers at all, but still might be nice to fix if time exists):

1) As zebediah mentioned, constant console messages aren't all that great. My first thought would be to report it once, and then not say anything until the item exists again, though I have no idea how this is tracked under-the-hood so that may be nontrivial (also in the case of constant flipping between available and unavailable it would still end up with the same effect).
You can use /c remote.call('LTN','log_level', 2) to change how mach it spams mid game. See also long description in initial post.
2) I tried out an extreme case of delivery, where I put 12 steel chests worth of unload at a requester stop, and then placed a large enough request to fill all of those. This sent an absurd number of trains over to the station, which immediately backed up a queue into the main line and pretty much deadlocked the entire system while waiting for the unloads to slowly happen. To some extent this is solved by just making bigger stations with more waiting room, but one feature that would be really nice would be a per-station signal for "maximum number of trains which are allowed to simultaneously include this station in their route" (either with some kind of reasonable default, like 1-3 ish, or default to infinite as currently appears to be the case). The downside is that this could sometimes cause the station to be underfilled (since a train which has left this station but not yet reached the depot would still likely count against this total), but I think it could still be worth it.
That's intended. Logistic bots will do exactly the same if you set a requester to 1M items.
It's up to players to limit request size or build stations capable of handling the requests.

jsalomon
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sat Nov 19, 2016 8:00 am
Contact:

Re: [Mod 0.14] Logistic Train Network

Post by jsalomon »

Optera wrote:
2) I tried out an extreme case of delivery, where I put 12 steel chests worth of unload at a requester stop, and then placed a large enough request to fill all of those. This sent an absurd number of trains over to the station, which immediately backed up a queue into the main line and pretty much deadlocked the entire system while waiting for the unloads to slowly happen. To some extent this is solved by just making bigger stations with more waiting room, but one feature that would be really nice would be a per-station signal for "maximum number of trains which are allowed to simultaneously include this station in their route" (either with some kind of reasonable default, like 1-3 ish, or default to infinite as currently appears to be the case). The downside is that this could sometimes cause the station to be underfilled (since a train which has left this station but not yet reached the depot would still likely count against this total), but I think it could still be worth it.
That's intended. Logistic bots will do exactly the same if you set a requester to 1M items.
It's up to players to limit request size or build stations capable of handling the requests.
Fair point, though I'd still maintain that it's a slightly different situation, since hundreds of robots flooding a single destination won't prevent other robots from flying past them in the same direction (though I guess an argument could be made about how the expected monopolization of all nearby roboport charging stations would have a very similar result). That being said, it's still an extreme case, so I'll just go ahead and implement smaller requests and bigger stations :p

Locked

Return to “Logistic Train Network”