old LTN discussion thread

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

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

Post by nagapito »

No timeouts.
And its was easily to replicate, so no shady bug that happens sometimes by who knows why :P

I attached the log.
You will be looking for the train station Mineral Catalyst 3, the requester, Thermal Water 2, the first provider and Thermal water 1, the station used on the second request.
This happens around second 867


Edit: Just a quick thought looking at the log and a quick look at the code. On the log, when it makes the request, it should actually be a message updating the requested value with the scheduled delivery. And this only happens the moment the train leaves the provider station. Are you 'loosing' fluid deliveries when they leave a provider station?
Attachments
factorio-current.zip
(622.17 KiB) Downloaded 105 times

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

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

Post by Optera »

Fixed in 1.2.2
Seems like I missed one piece where fluids need special treatment now that they are actual fluids instead of RailTanker's fake items.
While looking for that bug I also found one with overloading trains. Excess loaded items would be counted as being available at the provider.

I've also added regular updates to delivery shipping list with train inventory during overloading so the dispatcher doesn't try and assign already loaded items to another delivery.

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

Post by nagapito »

Optera wrote:Fixed in 1.2.2
Seems like I missed one piece where fluids need special treatment now that they are actual fluids instead of RailTanker's fake items.
While looking for that bug I also found one with overloading trains. Excess loaded items would be counted as being available at the provider.

I've also added regular updates to delivery shipping list with train inventory during overloading so the dispatcher doesn't try and assign already loaded items to another delivery.
You are... one of the best! (sorry... but you are competing with Nexela, Bob, Angel... :))

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

Post by nagapito »

I have a question...

I want to make a mega iron smelting outpost. So... concerned with train throughput I was thinking in having two of the multiple stations requesting iron ore. But I wanted them to read the same inventory, which is a logistics network. As I see it, will not work correctly, because if I am missing enough iron ore to make a request, both stations will think they can make a request and I will make two requests instead of one. I could live with this and accommodate storage capacity to have spare space for the extra request but then, the station will start sending positive signals and LTN will mistake it with a provider, causing all other sort of issues.

I think I could fix the surplus issue with a bit of signalling but... I would rather have a way of preventing the double request.

Any ideas? Does duplicating the station name solves it? Since they have the same name, the 'share' the requests and the inventory, not over requesting and allowing for two trains to unload at same time.
Or duplicated station names just throw the duplicate signal error and they refuse to work since they are in error?

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

Post by tuttifrectte »

nagapito wrote:I have a question...

I want to make a mega iron smelting outpost. So... concerned with train throughput I was thinking in having two of the multiple stations requesting iron ore. But I wanted them to read the same inventory, which is a logistics network. As I see it, will not work correctly, because if I am missing enough iron ore to make a request, both stations will think they can make a request and I will make two requests instead of one. I could live with this and accommodate storage capacity to have spare space for the extra request but then, the station will start sending positive signals and LTN will mistake it with a provider, causing all other sort of issues.

I think I could fix the surplus issue with a bit of signalling but... I would rather have a way of preventing the double request.

Any ideas? Does duplicating the station name solves it? Since they have the same name, the 'share' the requests and the inventory, not over requesting and allowing for two trains to unload at same time.
Or duplicated station names just throw the duplicate signal error and they refuse to work since they are in error?
I have requested the same thing earlier, and I think it was what lead to "merge stops to one logical unit" in the TODO. For now you need to keep every station with a different name and they all act independently. The only downside is you need more stackers before the unloading stations.

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

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

Post by Optera »

My Megabase ore unloading works just fine without aggregating stops.
2017-05-07-22-36-06-1054707.jpg
2017-05-07-22-36-06-1054707.jpg (713.96 KiB) Viewed 6487 times
4 separate stops, each with their own buffer belted straight into the furnace.
There's no need to manually balance the stations. if Iron unload 1 needs more trains than Iron Unload 2 that's something LTN will handle.

PS: I know using wide chests and loaders like that is cheesy. My laptop just needs all the help it can get to stay above 30ups when running this.

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

Post by nagapito »

Optera wrote:My Megabase ore unloading works just fine without aggregating stops.
2017-05-07-22-36-06-1054707.jpg
4 separate stops, each with their own buffer belted straight into the furnace.
There's no need to manually balance the stations. if Iron unload 1 needs more trains than Iron Unload 2 that's something LTN will handle.

PS: I know using wide chests and loaders like that is cheesy. My laptop just needs all the help it can get to stay above 30ups when running this.
Want to increase UPS? Remove all that belt and replace with bots!
But then, for better throughput of the station unloading and to avoid clogging, you will want to unload to active provider chests and let the robots move all to storage chests. By doing that, you ten have to use same buffer for both stations and end up with my issue :)

If you dont use active providers and unload to passive provider, bots will have a preference for a specific chest and you might end with one wagon chests being almost empty while the other wagon chests are full and the train cant unload that wagon. So, you use active, to guarantee that the unloading chests are always empty and ready to receive a load of materials. That is, if you configure the station to request when buffer is low and not when buffer is empty.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

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

Post by orzelek »

PS.
I'm not sure if that was fixed or not but that big chests should have small capacity or they might contriute to your low UPS.
Devs would need to confirm but entities with big invenotry were causing some heavy processing lag due to amount of slots in them.

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

Post by nagapito »

orzelek wrote:PS.
I'm not sure if that was fixed or not but that big chests should have small capacity or they might contriute to your low UPS.
Devs would need to confirm but entities with big invenotry were causing some heavy processing lag due to amount of slots in them.
That might have been fixed since my storage warehouses (2000 slots) do not even flinch now when I check their contents. On 0.14, just hovering an item would cause hangs on the game.

I think they even mentioned on the 0.15 change log about some optimization for big storages.

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

Post by tuttifrectte »

Optera wrote:My Megabase ore unloading works just fine without aggregating stops.

4 separate stops, each with their own buffer belted straight into the furnace.
There's no need to manually balance the stations. if Iron unload 1 needs more trains than Iron Unload 2 that's something LTN will handle.

PS: I know using wide chests and loaders like that is cheesy. My laptop just needs all the help it can get to stay above 30ups when running this.
This is a nice design. What are the comparators near the depots for? Also, the benefit of aggregating stops is so that they can share the same stacker (the waiting area before going into the station). It isn't a great benefit but it does make certain designs more compact.

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

Post by nagapito »

I just end up sharing the robot logistic network(RLN)) for both stations and made a band aid for the small overflow of the requested item since both stations would try to fill the inventory.
A combinator receiving the filtered information from the RLN and from the constant combinator with the request and it would output any value that is negative. So when I have a overflow, the station receives no signal and doesnt become a provider.
I also needed a second constant combinator connected directly to the station to pass the rest of the control signals (number of trains, min delivery size...) since this values are positive and would be filtered out by the decider combinator
Untitled.png
Untitled.png (589.3 KiB) Viewed 6452 times
Last edited by nagapito on Mon May 08, 2017 9:19 am, edited 1 time in total.

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

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

Post by Optera »

tuttifrectte wrote:This is a nice design. What are the comparators near the depots for?
Cleaning and refueling trains of any size or composition. Check this thread or demo map for details.
Also, the benefit of aggregating stops is so that they can share the same stacker (the waiting area before going into the station). It isn't a great benefit but it does make certain designs more compact.
Who needs stackers? These stations are designed for high throughput and can empty a full train in under 10s including entering and exiting the station.

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

Post by nagapito »

Optera wrote:
tuttifrectte wrote:This is a nice design. What are the comparators near the depots for?
Cleaning and refueling trains of any size or composition. Check this thread or demo map for details.
Also, the benefit of aggregating stops is so that they can share the same stacker (the waiting area before going into the station). It isn't a great benefit but it does make certain designs more compact.
Who needs stackers? These stations are designed for high throughput and can empty a full train in under 10s including entering and exiting the station.
It all depends on the rail system design. Even with high throughput, if you have your requester putting up 5 requests from 5 different delivers and all arrive at the same time to the requester, you will have some issues on your train line unless those trains wait on a stacker.

And, if you want to have a very high throughput station then... you actually want to have queued trains to unload. The best throughput you can achieve is always being unloading a train and if you have that, then any downtime without a train is wasted time, so the reason to have queued trains in a stacker.

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

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

Post by Optera »

nagapito wrote:
Optera wrote:
tuttifrectte wrote:This is a nice design. What are the comparators near the depots for?
Cleaning and refueling trains of any size or composition. Check this thread or demo map for details.
Also, the benefit of aggregating stops is so that they can share the same stacker (the waiting area before going into the station). It isn't a great benefit but it does make certain designs more compact.
Who needs stackers? These stations are designed for high throughput and can empty a full train in under 10s including entering and exiting the station.
It all depends on the rail system design. Even with high throughput, if you have your requester putting up 5 requests from 5 different delivers and all arrive at the same time to the requester, you will have some issues on your train line unless those trains wait on a stacker.

And, if you want to have a very high throughput station then... you actually want to have queued trains to unload. The best throughput you can achieve is always being unloading a train and if you have that, then any downtime without a train is wasted time, so the reason to have queued trains in a stacker.
To me a train waiting in a stacker is a train not being unloaded when it could be.

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

Post by tuttifrectte »

Optera wrote:
nagapito wrote:
Optera wrote:
tuttifrectte wrote:This is a nice design. What are the comparators near the depots for?
Cleaning and refueling trains of any size or composition. Check this thread or demo map for details.
Also, the benefit of aggregating stops is so that they can share the same stacker (the waiting area before going into the station). It isn't a great benefit but it does make certain designs more compact.
Who needs stackers? These stations are designed for high throughput and can empty a full train in under 10s including entering and exiting the station.
It all depends on the rail system design. Even with high throughput, if you have your requester putting up 5 requests from 5 different delivers and all arrive at the same time to the requester, you will have some issues on your train line unless those trains wait on a stacker.

And, if you want to have a very high throughput station then... you actually want to have queued trains to unload. The best throughput you can achieve is always being unloading a train and if you have that, then any downtime without a train is wasted time, so the reason to have queued trains in a stacker.
To me a train waiting in a stacker is a train not being unloaded when it could be.
I guess your approach is have a lot of stations, and limit the train queue size to 1 (or maybe 2) for each of them. The advantage of your design is you don't need a stacker, but if you are using belt you need to merge/remix all the input/output of the train stations. I like the adaptive depot design, but I always keep trains with different composition in different depots anyway :D

User avatar
Smarty
Global Moderator
Global Moderator
Posts: 816
Joined: Sat Oct 04, 2014 5:00 pm
Contact:

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

Post by Smarty »

I had a desync related to your mod
viewtopic.php?f=23&t=46873

I hope you can fix it. Rseding91 explained why it happened.
It doesnt happen often but still would be great if it wouldnt desync for whatever reason

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

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

Post by Optera »

Smarty wrote:I had a desync related to your mod
viewtopic.php?f=23&t=46873

I hope you can fix it. Rseding91 explained why it happened.
It doesnt happen often but still would be great if it wouldnt desync for whatever reason
Desync how I loathe thee....

What puzzles me is how it doesn't seem to happen more often. From Rseding91's explaination it sounds like that'd be something that has to happen nearly every time.

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

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

Post by SootStack »

Train stations with mixed length min/max trains providing the same item doesn't work as expected

In depot: LL-CCCC-LL and L-C-L

Provider 1 : coal 57k items - min train 3 / max train 3 , priority : 0
Provider 2 : coal 57k items - min trains 8 / max trains 8, priority: 0

Requester: -2k coal - min train 3 / max train 3

When the LTN tries to assign a train to the order it cant find a train that has a min length of 8 and a max length of 3 so the order fails.

Expected behavior, dispatch the L-C-L to fill the order from Provider 1 and deliver to Requester.

Edit: After a quick peak at the code.

It looks like you start to fill a request but when you GetProviders to find a provider station you just take the first one by some sorted order. Afterwards you compute the min/max train size and search for a train to satisfy it.
If the station you pick is not compatible with the requester station then the request will fail to find a suitable train.
Last edited by SootStack on Tue May 09, 2017 4:02 am, edited 3 times in total.

teenkertoy
Inserter
Inserter
Posts: 37
Joined: Fri Nov 11, 2016 5:03 am
Contact:

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

Post by teenkertoy »

Image


I finally made a count-perfect loader for single items and multiple items into a cargo wagon.

3 combinators for the counter.
1 extra combinator for each unique item being loaded by a single insterer.
4 extra combinators for each unique item being loaded by multiple inserters.

I cannot make the system overload a wagon, and I cannot make the inserters stay hovering over the tracks holding items that didn't fit in the previous wagon. I think this is bug-free, as of the LTN version 1.2.2 and Factorio version 15.9.

This is not as clean as I would like it to be, but it seems to work great. The full blueprint is below.
full blueprint here
There are extra wires and combinators not related to the LTN project. They are to ensure the coal is loaded and unloaded evenly through all the chests. The entire setup might be daunting at first, but if you just focus on the unloading portion it might be easier to see.
blueprint for unloading portion only
And once again, thank you for working on this LTN mod. I love it.

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

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

Post by Optera »

SootStack wrote:Train stations with mixed length min/max trains providing the same item doesn't work as expected

In depot: LL-CCCC-LL and L-C-L

Provider 1 : coal 57k items - min train 3 / max train 3 , priority : 0
Provider 2 : coal 57k items - min trains 8 / max trains 8, priority: 0

Requester: -2k coal - min train 3 / max train 3

When the LTN tries to assign a train to the order it cant find a train that has a min length of 8 and a max length of 3 so the order fails.

Expected behavior, dispatch the L-C-L to fill the order from Provider 1 and deliver to Requester.
min/max trains? do you mean length or are you talking about number of trains?

Set loglevel to debug, let it run through while this happens and attach the logfile.
teenkertoy wrote:Image


I finally made a count-perfect loader for single items and multiple items into a cargo wagon.
LTN does not know about special stations being able to load only some items to some wagons like in your screenshot.
For example LTN will use this L-CC train for a 4k coal delivery, expecting this provider able to load both wagons.

Locked

Return to “Logistic Train Network”