old LTN discussion thread

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Locked
Zanostra
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Mon Apr 03, 2017 8:03 pm
Contact:

Re: [Mod 0.14] Logistic Train Network 0.9.12

Post by Zanostra » Mon Apr 03, 2017 8:27 pm

I really like this mod, it has become one of my standard mods pretty fast.
But I came across a jamming too.
I've build a train system in a beginning factory, big enough for some major growing without the need to create more trains along the way, resulting in 40 trains inactively waiting ( intended ).
I wanted my metal station to ask for a hell of a lot of ore, so I made it ready for use.
Then I changed an ore station in an LTN station and it immediately asked for 6 trains to make the deliveries.
its a small ore station so I didn't mean it to fill up quickly, so the 6 trains got jammed in the system, without deadlock.
I thought, my fault, they will go away eventually.
But when the first train departed, the other 5 were assumed 'lost' and the system asked for 6 new deliveries.
and again.
and because of the jamming, other stations asked for another set of trains too, this way the jamming will not stop.
now I thought that I could remove a lot of the trains and when my metal is filled up enough, place them back, but then I would have to do that every time it happens.
But I think it would also be possible to give them more time to unjam by lengthen the time before the system assumes the train to be lost.
but how do I do that?
( if I understand correctly, this is possible )

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2275
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: [Mod 0.14] Logistic Train Network 0.9.12

Post by steinio » Mon Apr 03, 2017 10:41 pm

Zanostra wrote:I really like this mod, it has become one of my standard mods pretty fast.
But I came across a jamming too.
I've build a train system in a beginning factory, big enough for some major growing without the need to create more trains along the way, resulting in 40 trains inactively waiting ( intended ).
I wanted my metal station to ask for a hell of a lot of ore, so I made it ready for use.
Then I changed an ore station in an LTN station and it immediately asked for 6 trains to make the deliveries.
its a small ore station so I didn't mean it to fill up quickly, so the 6 trains got jammed in the system, without deadlock.
I thought, my fault, they will go away eventually.
But when the first train departed, the other 5 were assumed 'lost' and the system asked for 6 new deliveries.
and again.
and because of the jamming, other stations asked for another set of trains too, this way the jamming will not stop.
now I thought that I could remove a lot of the trains and when my metal is filled up enough, place them back, but then I would have to do that every time it happens.
But I think it would also be possible to give them more time to unjam by lengthen the time before the system assumes the train to be lost.
but how do I do that?
( if I understand correctly, this is possible )
You should set an a minimum delivery size.

Greetings steinio
Image
Transport Belt Repair Man
My little mods: Link | My favourite mods: Bob's Mods | Angel's Mods | Yuoki Railway Core | EvoGUI | Logistic Train Network
Factorio Cheat Sheet by Denis Zholob

View unread Posts

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

Re: [Mod 0.14] Logistic Train Network 0.10.0

Post by Optera » Tue Apr 04, 2017 7:36 am

Per popular request I've added limit Trains signal.
It will limit the number of trains/Deliveries for requester/provider stations.

Zanostra
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Mon Apr 03, 2017 8:03 pm
Contact:

Re: [Mod 0.14] Logistic Train Network 0.10.0

Post by Zanostra » Tue Apr 04, 2017 2:52 pm

Steinio, thats what I did, so it asked for 6 full trains to deliver without the seventh filled up half :)
But I think the limit to the train numbers will have the same effect for me, I'm testing that now, just updated.

gexxo
Inserter
Inserter
Posts: 35
Joined: Thu Feb 23, 2017 6:44 pm
Contact:

Re: [Mod 0.14] Logistic Train Network 0.10.2

Post by gexxo » Mon Apr 10, 2017 7:50 pm

I have an issue with stations that provide multiple items:

Let's say a station provides items Coal and Iron Ore. I created a station and used stack filter inserters with the red wire to only hand out the items that are requested. However, after a delivery for lets say coal is done, some of the inserters keep some coal in their claws and when the next delivery arrives (e.g., for Iron Ore) they will dump their claw contents into the train, thus adding a small amount of the wrong item to the delivery, which is bad, of course. How can I prevent this?

XOffshore
Inserter
Inserter
Posts: 27
Joined: Tue Jul 19, 2016 9:38 pm
Contact:

Re: [Mod 0.14] Logistic Train Network 0.10.2

Post by XOffshore » Mon Apr 10, 2017 8:48 pm

gexxo wrote:I have an issue with stations that provide multiple items:

Let's say a station provides items Coal and Iron Ore. I created a station and used stack filter inserters with the red wire to only hand out the items that are requested. However, after a delivery for lets say coal is done, some of the inserters keep some coal in their claws and when the next delivery arrives (e.g., for Iron Ore) they will dump their claw contents into the train, thus adding a small amount of the wrong item to the delivery, which is bad, of course. How can I prevent this?
For now I see four solutions:
1. Unloader from wagon with filter set to everything that is not requested to load;
2. Just unloaders to active provider at depots;
3. Complex belt-based count-perfect solutions, too complex/bloated to be suitable for high-throughput designs...
4. Wait for 0.15 :)

DrJones
Inserter
Inserter
Posts: 36
Joined: Thu Sep 08, 2016 11:13 pm
Contact:

Re: [Mod 0.14] Logistic Train Network 0.10.2

Post by DrJones » Thu Apr 13, 2017 10:19 am

XOffshore wrote:
gexxo wrote:I have an issue with stations that provide multiple items:

Let's say a station provides items Coal and Iron Ore. I created a station and used stack filter inserters with the red wire to only hand out the items that are requested. However, after a delivery for lets say coal is done, some of the inserters keep some coal in their claws and when the next delivery arrives (e.g., for Iron Ore) they will dump their claw contents into the train, thus adding a small amount of the wrong item to the delivery, which is bad, of course. How can I prevent this?
For now I see four solutions:
1. Unloader from wagon with filter set to everything that is not requested to load;
2. Just unloaders to active provider at depots;
3. Complex belt-based count-perfect solutions, too complex/bloated to be suitable for high-throughput designs...
4. Wait for 0.15 :)
I've also been wondering what to do about this pollution issue caused by mixed provider stations. One solution could be to not have mixed provider stations, but that can be inconvenient/costly sometimes (looking at you, HardCrafting).

As you say, stack filter inserters at requester stations prevent pollution on that end.

Generated delivery schedules for trains have a two second inactivity condition when arriving back at the depot, so I've got inserters there emptying the train of whatever's left in it. However, now I have chests of mixed stuff sitting in my depot far afield. Do I use HardCrafting's convenient incinerators to get rid of them? Try to set up some sort of sorting with a provider station with ignore-minimum-delivery-size? Making that provider station a mixed provider station seems like it would be, um, problematic. So then we're suddenly looking at a lot of provider stations attached to my depot.

There must be a better way, and the only better way I've found so far is to not use mixed provider stations which isn't a very satisfying solution.

Out of curiosity, which feature in 0.15 are you expecting to make this better?

XOffshore
Inserter
Inserter
Posts: 27
Joined: Tue Jul 19, 2016 9:38 pm
Contact:

Re: [Mod 0.14] Logistic Train Network 0.10.2

Post by XOffshore » Thu Apr 13, 2017 12:07 pm

DrJones wrote:Out of curiosity, which feature in 0.15 are you expecting to make this better?
viewtopic.php?p=251323#p251323:
Optera wrote:Multi item providers also need a way to unload incorrectly loaded items (until 0.15 allows count perfect loading)

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

Re: [Mod 0.14] Logistic Train Network 0.10.2

Post by Optera » Thu Apr 13, 2017 12:33 pm

DrJones wrote:I've also been wondering what to do about this pollution issue caused by mixed provider stations. One solution could be to not have mixed provider stations, but that can be inconvenient/costly sometimes (looking at you, HardCrafting).

As you say, stack filter inserters at requester stations prevent pollution on that end.

Generated delivery schedules for trains have a two second inactivity condition when arriving back at the depot, so I've got inserters there emptying the train of whatever's left in it. However, now I have chests of mixed stuff sitting in my depot far afield. Do I use HardCrafting's convenient incinerators to get rid of them? Try to set up some sort of sorting with a provider station with ignore-minimum-delivery-size? Making that provider station a mixed provider station seems like it would be, um, problematic. So then we're suddenly looking at a lot of provider stations attached to my depot.

There must be a better way, and the only better way I've found so far is to not use mixed provider stations which isn't a very satisfying solution.
I'm using unload inserters to remove incorrectly loaded items from wagons at multi providers and clean out all wagons at depots.
The fuel requester at depots also double as providers for any items above 2 stacks, have higher priority than normal providers and ignore min delivery size.
Out of curiosity, which feature in 0.15 are you expecting to make this better?
With 0.15 building count perfect will become a lot simpler in general. Still 12 inserters will still pick up 12*signal (if they are all free at that tick), compensating for that could prove tricky.

0.15 also will add some more events like on_entity_renamed and allow me to check what's on the same circuit network which will reduce overhead in on_tick and possibly make it feasible to support grouping stops into a logical unit. No promises though, I have to see the api first.

On another note, I'm currently working on 1.0.0.
Trains will be picked by linear distance between depot and provider.
Messages and item/fluid names will use localization. I'm only going to provide English and maybe German myself.

smileynator
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Apr 13, 2017 7:10 pm
Contact:

Re: [Mod 0.14] Logistic Train Network 0.10.2

Post by smileynator » Thu Apr 13, 2017 7:18 pm

Hey Optera,

I have not been able to find a solution to have a STORAGE area of some sort, without completely splitting it in 2 train networks or using different train length to make it obey the rules.

I want to have a setup up like this:
Image
The top should be delivery from the miners, and the bottom should be delivery to the factory. It simply asks for 50K of each of the seen ores.
The issue is obviously, trains start going to the OUT station to bring more to the IN station.

Solution would be some way to tell the system that OUT has a max delivery size (this makes it that i can set, request MIN 5k deliveries, but only ever allow 4.9K to leave that bottom station at once, making the request non-valid to stop the loop.
Or i could think of color coding or some signal that tells it it is not allowed to make connections between the same colored stations (or only to the same colored stations) which would allow managing chunks of sorts. Simply never allowing the train to interact with OUT at all.

Did i miss more obvious ways out of this? Is there currently any way to make this work without the mentioned workarounds?

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

Re: [Mod 0.14] Logistic Train Network 0.10.2

Post by Optera » Fri Apr 14, 2017 5:50 am

Sorting or distribution stations only waste of train capacity. It's more efficient to build multi-providers or one/item right at mines and ship everything right from mine into the factory.
Seeing how you load from belt to wagon without buffer chests, let alone don't fully utilize filter inserter for unloading, you should check this the forum for proper train station designs. Look for anything made by Siggboy, Xknight or MadZuri. My Demo also has basic designs or proper stations.

Nilaus
Long Handed Inserter
Long Handed Inserter
Posts: 72
Joined: Sat Aug 13, 2016 11:26 am
Contact:

Re: [Mod 0.14] Logistic Train Network 0.10.2

Post by Nilaus » Sat Apr 15, 2017 6:20 am

Hi Optera

Is there a way to prevent the BIP! when you have Log level 2 enabled?
I'd like to see the messages in game, but I'd also like to avoid the excessive BIP! every couple of seconds.
I've looked through the config files, but cannot seem to find any reference to sounds.

Thanks

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

[Mod 0.14] Logistic Train Network 1.0.0

Post by Optera » Sat Apr 15, 2017 7:01 am

After running LTN on several maps for 100+ hours without major incidents I think it's time to move it to a release version with some features you asked for.
  • Dispatcher uses linear distance between depot and provider when choosing between equally valid trains
    Having multiple depots spread throughout the map is now feasible. LTN will pick the closest train to a provider.
  • localized Messages
    Console messages including the item names are localized to help discern items if mods use unimaginative names like ore1, ore2, asf
  • added signal "Locked Slots per Wagon"
    A simple way to reduce capacity of all wagons for specific providers. Allows overloading wagons so inserters wont get stuck so easily.
Nilaus wrote:Is there a way to prevent the BIP! when you have Log level 2 enabled?
I'd like to see the messages in game, but I'd also like to avoid the excessive BIP! every couple of seconds.
I've looked through the config files, but cannot seem to find any reference to sounds.
I don't know of way to turn off console message beeping.

ZEUS1629
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Aug 14, 2016 4:01 am
Contact:

Re: [Mod 0.14] Logistic Train Network 1.0.0

Post by ZEUS1629 » Sun Apr 16, 2017 3:45 pm

Id hate to ask here but i just cant figure out a problem and havent been able to find anything thus far. Ive begun a bobsangels game and i hit a snag where it seems schedules are not being made at all for saphirite stations if they have a max train size, not even a "not available" message. As soon as i delete this restriction, a schedule is made immediately with a larger train than the station is meant for. Currently their are 2 stops accepting 1+4 trains from outpost and 2 1+2 around the bases. Both of the stations with the 1+2 have the limitation of max train size of 3. If on either station, the limitation is removed or increased to fit 1+4's, it will immediately send a schedule for a 1+4 to come and AND a 1+2 to go to the other station that still has the limitation.

i apologize if this has come up already but im just getting frustrated at this point.

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

Re: [Mod 0.14] Logistic Train Network 1.0.0

Post by Optera » Mon Apr 17, 2017 6:47 pm

ZEUS1629 wrote:Id hate to ask here but i just cant figure out a problem and havent been able to find anything thus far. Ive begun a bobsangels game and i hit a snag where it seems schedules are not being made at all for saphirite stations if they have a max train size, not even a "not available" message. As soon as i delete this restriction, a schedule is made immediately with a larger train than the station is meant for. Currently their are 2 stops accepting 1+4 trains from outpost and 2 1+2 around the bases. Both of the stations with the 1+2 have the limitation of max train size of 3. If on either station, the limitation is removed or increased to fit 1+4's, it will immediately send a schedule for a 1+4 to come and AND a 1+2 to go to the other station that still has the limitation.

i apologize if this has come up already but im just getting frustrated at this point.
Looks like somehow min size and max size are set to values excluding every available train.
Only help i can offer you is check your signals and remember LTN sums up red and green wires.

judos
Filter Inserter
Filter Inserter
Posts: 261
Joined: Mon Dec 08, 2014 11:17 am
Contact:

Re: [Mod 0.14] Logistic Train Network 1.0.1

Post by judos » Mon Apr 17, 2017 10:10 pm

Hi Optera,

Awesome mod! Thanks a lot for your work!

Some questions:

Depots: Do they not care for the signal min-/max-length ? That would be great. Because I build a depot for 10 waggons trains which is now partly occupied by 2 waggon trains which seems like a waist :)

Binary encoding: This is also only considered for the provider/requester, not for Depots right?

Thanks& Cheers

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

Re: [Mod 0.14] Logistic Train Network 1.0.1

Post by Optera » Tue Apr 18, 2017 7:09 am

judos wrote:Hi Optera,

Awesome mod! Thanks a lot for your work!

Some questions:

Depots: Do they not care for the signal min-/max-length ? That would be great. Because I build a depot for 10 waggons trains which is now partly occupied by 2 waggon trains which seems like a waist :)

Binary encoding: This is also only considered for the provider/requester, not for Depots right?

Thanks& Cheers
Please read the manual....all your questions are answered in the Long description.

Lamp - Input specifies which signals are considered for each stop type.
Depots ignore all other control signals. Trains always return to their initial depot. e.g. name designated depots "Depot L-2C" and "Depot 2L-10C"
There also is no way to change this with the current API.

Constant Combinator - output
Binary Encoding is provided for every stop.

phi1010
Inserter
Inserter
Posts: 46
Joined: Sat Aug 20, 2016 3:31 pm
Contact:

Re: [Mod 0.14] Logistic Train Network 1.0.1

Post by phi1010 » Sat Apr 22, 2017 2:23 am

This plugin solves so many problem over using pulse counters when loading trains, thank you. Still, I have two minor issues where I currently can not see how they can be solved best:

I'd like to transport trains and wagons to a station near the depot -- which is a bit difficult since I assume the output mixes the train/wagon items with the actual train in the station. Might you consider adding a separate signal type for the train in the station? I see, they already are -- just use the same icon.

Is it planned to allow duplicate station names? I'd think of it as a way to link two stations, to make the addon deliver e.g. 4000 Iron to either of these, but not to both. There might be other variants, but everything I come up with seems to have some drawback or miss some functionality:
* send half the number of requested items (negated) to two independent stations => doubles the number of trains, reduces the efficiency.
* remove the number of items on the way from the requested number => I can not get the predicted contents of scheduled deliveries, can I?
* send the items request to only one of the stations
** "Round Robin", pseudo-randomly select the station => might cause a station with a long queue, while the other one has already finished all deliveries.
** Station with the lower number of pending deliveries => I can't know how many deliveries are already scheduled a station? Also, we can only know which station is unused while delivery (evaluated by the pathfinder), predicting whether a station will be free or not is hard.

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

Re: [Mod 0.14] Logistic Train Network 1.0.1

Post by Optera » Sat Apr 22, 2017 6:02 am

phi1010 wrote:This plugin solves so many problem over using pulse counters when loading trains, thank you.
Not sure what you try to say. Using pulse counters is the best way to load trains with LTN.
Is it planned to allow duplicate station names?
As I said several times before.
I will add stop clustering IF the API in 0.15 allows running all necessary checks event driven instead of time consuming in on_tick.

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

Re: [Mod 0.14] Logistic Train Network 1.1.0

Post by Optera » Sat Apr 22, 2017 9:04 am

I got really annoyed by trains leaving stations before my smart loaders had a chance to properly reset so I added a 2s inactivity condition to every station. If you want the old behavior you can set finish_loading to false in the config.

stop_timeout remains unchanged by it.

This probably will be the last feature update before 0.15.

Edit: Updated the Demo Map to showcase how new signals and proper pulse counting work.

Locked

Return to “Logistic Train Network”

Who is online

Users browsing this forum: No registered users