old LTN discussion thread

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Locked
User avatar
Zerogoki1983
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sun Dec 28, 2014 5:19 pm
Contact:

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

Post by Zerogoki1983 »

SphynxLoL wrote:Playing around with the new "Read Train Contents" feature. I have come up with this design/formula.

(Requested amount*-1) + Train Contents = Yellow
(Each *-1) = Green ------ (Each*1) = Red
Green + Red = Yellow
Inserters only active when yellow < 0

Here is the issue I have ran into. Since the inserters are now on "Enable/Disable" mode. Is it even possible to get them to also run on "Set Filter" mode. At the moment this setup will only work with single items. The only work-around I could see is being able to set cargo filters when the schedule is created.

Anyways, here is the setup, pictured below. Works like a charm for single item deliveries.
0.15 Exact Delivery Setup
You need filter inserters. Also connect the chests to the input lamp with green wrire and the inserters to the output comulator with red wire. on Requesting stations you need invert (multiply by -1) the output signal the filters will than automaticly be set to the requsted items.

User avatar
SphynxLoL
Inserter
Inserter
Posts: 21
Joined: Tue Apr 25, 2017 3:32 am
Contact:

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

Post by SphynxLoL »

Zerogoki1983 wrote:
SphynxLoL wrote:Playing around with the new "Read Train Contents" feature. I have come up with this design/formula.

(Requested amount*-1) + Train Contents = Yellow
(Each *-1) = Green ------ (Each*1) = Red
Green + Red = Yellow
Inserters only active when yellow < 0

Here is the issue I have ran into. Since the inserters are now on "Enable/Disable" mode. Is it even possible to get them to also run on "Set Filter" mode. At the moment this setup will only work with single items. The only work-around I could see is being able to set cargo filters when the schedule is created.

Anyways, here is the setup, pictured below. Works like a charm for single item deliveries.
0.15 Exact Delivery Setup
You need filter inserters.

The picture is just an example of the setup. Your comment is quite... obvious. The issue is what you don't understand. A filter inserter cannot have both "Set Filter" and "Enable/Disable" active at the same time. "Enable/Disable" to control the exact delivery amount and "Set Filter" to decide what the inserters should be putting into the cargo wagon. The only method I can think of is not using the "set filter" feature which would limit the amount of items provided at a stop to 6 (6 inserters per wagon).

User avatar
Zerogoki1983
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sun Dec 28, 2014 5:19 pm
Contact:

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

Post by Zerogoki1983 »

SphynxLoL wrote:
Zerogoki1983 wrote:
SphynxLoL wrote:Playing around with the new "Read Train Contents" feature. I have come up with this design/formula.

(Requested amount*-1) + Train Contents = Yellow
(Each *-1) = Green ------ (Each*1) = Red
Green + Red = Yellow
Inserters only active when yellow < 0

Here is the issue I have ran into. Since the inserters are now on "Enable/Disable" mode. Is it even possible to get them to also run on "Set Filter" mode. At the moment this setup will only work with single items. The only work-around I could see is being able to set cargo filters when the schedule is created.

Anyways, here is the setup, pictured below. Works like a charm for single item deliveries.
0.15 Exact Delivery Setup
You need filter inserters.

The picture is just an example of the setup. Your comment is quite... obvious. The issue is what you don't understand. A filter inserter cannot have both "Set Filter" and "Enable/Disable" active at the same time. "Enable/Disable" to control the exact delivery amount and "Set Filter" to decide what the inserters should be putting into the cargo wagon. The only method I can think of is not using the "set filter" feature which would limit the amount of items provided at a stop to 6 (6 inserters per wagon).
Having no filters disables the filter inserters anyways. If I understand what you are trying right, you are trying to do what the logistic train stop already does.

Also I am getting an error message whenever a train with the new fluid wagons reaches a LTN Station.

Error while running event LogisticTrainNetwork::on_train_changed_state (ID 23)
Unknown virtual signal name: LTN-fluid-wagon
stack traceback:
__LogisticTrainNetwork__/control.lua:1375: in function 'UpdateStopOutput'
__LogisticTrainNetwork__/control.lua:990: in function 'UpdateStopParkedTrain'
__LogisticTrainNetwork__/control.lua:289: in function <__LogisticTrainNetwork__/control.lua:288>
Last edited by Zerogoki1983 on Wed Apr 26, 2017 9:06 pm, edited 1 time in total.

User avatar
SphynxLoL
Inserter
Inserter
Posts: 21
Joined: Tue Apr 25, 2017 3:32 am
Contact:

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

Post by SphynxLoL »

Welp, here it is. A near exact (+-10), filtered, AND inserter-resetting design that is also very compact.

Image

Left Arithmetic Combinator takes the trains contents (Red Wire from Station set to Read Train Contents) and outputs a red signal (Green wire going into right arithmetic).
Input: Each*1
Output: Red Signal


Right Arithmetic Combinator takes the trains request (Red Wire from Station Output) and subtracts the Trains Contents (Green wire from left arithmetic)
Input: Each - Red Signal
Output: Each


This will output whatever the train is requesting minus the trains contents allowing us to use this signal to "Set Filter" on our inserters. This works because when the trains contents are >/= the requested amount, our value for the requested item is =/<0 in our circuit. The filters get cleared and the inserters reset.

TLDR: Set Filter = Train Request - Train Contents. This will control near exact delivery counts, while also being able to use all inserters with the filter function (and no jams).

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

Post by nagapito »

Hi, first, love your mod, thanks a lot for all the hard work!

Now, two questions:

- What exactly does "Locked Slots per Wagon" signal? When applied on a provider, the trains that arrive get the wagons slots locked and become unlocked again when return to depot? Or is it informing that incoming trains will have this amount of slots virtually locked so max request possible takes in account the number of locked slots when calculating the wagon max capacity and so, allowing the couple extra items inserters add to the wagon to not jam the wagon when using multiple items?

- Not so related to the mod but, is there an easy way to filter only some items from a circuit signal? That is, if I connect my robot logistic network to the train station so I know how much stuff I have at the station, I want it to only send to the station the signals of a couple items and not all or the station becomes a provider for the rest of the items at the same time is a requester for a couple. I am filtering the items with an arithmetic combinator multiplying by 1 the item I want but... maybe there is a better system then using one combinator for each item.... Found the solution

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

Post by Optera »

SphynxLoL wrote:Welp, here it is. A near exact (+-10), filtered, AND inserter-resetting design that is also very compact.

Image

Left Arithmetic Combinator takes the trains contents (Red Wire from Station set to Read Train Contents) and outputs a red signal (Green wire going into right arithmetic).
Input: Each*1
Output: Red Signal


Right Arithmetic Combinator takes the trains request (Red Wire from Station Output) and subtracts the Trains Contents (Green wire from left arithmetic)
Input: Each - Red Signal
Output: Each


This will output whatever the train is requesting minus the trains contents allowing us to use this signal to "Set Filter" on our inserters. This works because when the trains contents are >/= the requested amount, our value for the requested item is =/<0 in our circuit. The filters get cleared and the inserters reset.

TLDR: Set Filter = Train Request - Train Contents. This will control near exact delivery counts, while also being able to use all inserters with the filter function (and no jams).
Your setup will fail for multi item provider. If you use a single each*-1=each combinator to subtract inventory from request size it will work with any number of items.
2017-04-27-08-03-05-0514944.jpg
2017-04-27-08-03-05-0514944.jpg (69.53 KiB) Viewed 7870 times
nagapito wrote:Hi, first, love your mod, thanks a lot for all the hard work!

Now, two questions:

- What exactly does "Locked Slots per Wagon" signal? When applied on a provider, the trains that arrive get the wagons slots locked and become unlocked again when return to depot? Or is it informing that incoming trains will have this amount of slots virtually locked so max request possible takes in account the number of locked slots when calculating the wagon max capacity and so, allowing the couple extra items inserters add to the wagon to not jam the wagon when using multiple items?
The later.

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

Post by Optera »

Quick notice: Fluid delivery is currently broken in 0.15.
The changed pumps wont connect with RailTanker.
Fluid-wagons can't be used as they are not properly exposed through the api.
viewtopic.php?f=28&t=45208
viewtopic.php?f=28&t=45206

You will have to use barrels for the time being.

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

Post by nagapito »

Optera wrote:Quick notice: Fluid delivery is currently broken in 0.15.
The changed pumps wont connect with RailTanker.
Fluid-wagons can't be used as they are not properly exposed through the api.
viewtopic.php?f=28&t=45208
viewtopic.php?f=28&t=45206

You will have to use barrels for the time being.
Unplayable then!!!!
Bobs and Angels not being fully updated yet and forcing me to stay at .14 I can live with (or not) but this.... this is just too much! I give up...
I only wanted to play my world in .15.... :sniff:

</sarcasm>

BlooSkies
Burner Inserter
Burner Inserter
Posts: 15
Joined: Thu Mar 16, 2017 3:14 am
Contact:

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

Post by BlooSkies »

SphynxLoL wrote:Welp, here it is. A near exact (+-10), filtered, AND inserter-resetting design that is also very compact.
Is filtered control not innately inserter-resetting, provided you leave a buffer of a handful (literally; the inserters' hands) of items in the request vs the total capacity of the wagon, or am I missing something?

maxtim
Burner Inserter
Burner Inserter
Posts: 12
Joined: Mon Apr 24, 2017 5:41 pm
Contact:

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

Post by maxtim »

Optera wrote:Quick notice: Fluid delivery is currently broken in 0.15.
The changed pumps wont connect with RailTanker.
Fluid-wagons can't be used as they are not properly exposed through the api.
viewtopic.php?f=28&t=45208
viewtopic.php?f=28&t=45206

You will have to use barrels for the time being.
Saw this right after I got this error:
LTN Error

maxtim
Burner Inserter
Burner Inserter
Posts: 12
Joined: Mon Apr 24, 2017 5:41 pm
Contact:

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

Post by maxtim »

Is there a way to set the notification sounds to differentiate assignments vs time outs and regular game messages?

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

Post by Optera »

maxtim wrote:Saw this right after I got this error:
LTN Error
Fluid-wagons already work fine in my development version. I want to get some more 0.15 adaptions done before releasing it.
maxtim wrote:Is there a way to set the notification sounds to differentiate assignments vs time outs and regular game messages?
Not that I know of. If you find a way let me know.

kleopi
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sun Apr 23, 2017 9:01 pm
Contact:

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

Post by kleopi »

Hello there, first of all thank you for fixing the latest bug of indestructible train stations.

I just experimented a bit around with my friend and we happen to get several desync situations.
We found out that this desync happens whenever you try to blueprint a LTN Station.
This happens every time and is therefore easily reproduceable.
Is this fixable?

Thanks in Advance!

~kleopi
Creator of the [TKN] Mods.
Check out our Discord for further information:
http://discord.gg/G9QwJWA

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

Post by Optera »

Fully adopting changes in 0.15 is making progress. You can get current test version ready for SP alpha testing on GitHub.
MP will cause the host to crash when changing settings. Basically the only thing keeping me from releasing it.
If you find any other bugs with this version let me know.
kleopi wrote:Hello there, first of all thank you for fixing the latest bug of indestructible train stations.

I just experimented a bit around with my friend and we happen to get several desync situations.
We found out that this desync happens whenever you try to blueprint a LTN Station.
This happens every time and is therefore easily reproduceable.
Is this fixable?

Thanks in Advance!

~kleopi
I couldn't reproduce it at all with either using blueprint nor shif-click blueprinting.
What version of Factorio and LTN? Did you use instant blueprint?

User avatar
oniakki
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Jun 29, 2016 11:24 pm
Contact:

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

Post by oniakki »

I haven't switched over to the 0.15 builds yet, but i noticed something odd when i added a station that requests a larger amount of items (~8 wagons worth) in my 0.14.23 world. Instead of using one of the idling 8 wagon trains, it instead assigned a pair of dual wagon trains and a quad wagon train (in that order, smallest ones first, then the larger), leaving two 8 wagons trains sitting in their depots. Not sure if this is known/expected behavior, but seemed weird to me to use so many smaller trains instead of one of the larger ones. My current work around is setting the one station to have a minimum train length so the smaller trains can't access 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.1.2

Post by Optera »

oniakki wrote:I haven't switched over to the 0.15 builds yet, but i noticed something odd when i added a station that requests a larger amount of items (~8 wagons worth) in my 0.14.23 world. Instead of using one of the idling 8 wagon trains, it instead assigned a pair of dual wagon trains and a quad wagon train (in that order, smallest ones first, then the larger), leaving two 8 wagons trains sitting in their depots. Not sure if this is known/expected behavior, but seemed weird to me to use so many smaller trains instead of one of the larger ones. My current work around is setting the one station to have a minimum train length so the smaller trains can't access it.
Are all deliveries coming from the same provider?
LTN attempts to pick the smallest train able to fit the whole delivery, if no such train can be found it picks the biggest available smaller than delivery.

Liquid5n0w
Inserter
Inserter
Posts: 40
Joined: Thu Feb 05, 2015 4:10 pm
Contact:

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

Post by Liquid5n0w »

I'm getting this error when loading my server, any of the cause? Started since I updated to 0.15.3

18.423 Error ServerMultiplayerManager.cpp:93: MultiplayerManager failed: "Error while running the on_load: Unknown virtual signal name: LTN-fluid-wagon
stack traceback:
__LogisticTrainNetwork__/control.lua:1375: in function 'UpdateStopOutput'
__LogisticTrainNetwork__/control.lua:52: in function <__LogisticTrainNetwork__/control.lua:48>"
18.423 Info ServerMultiplayerManager.cpp:663: mapTick(-1) changing state from(CreatingGame) to(InitializationFailed)

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

Post by Optera »

Liquid5n0w wrote:I'm getting this error when loading my server, any of the cause? Started since I updated to 0.15.3

18.423 Error ServerMultiplayerManager.cpp:93: MultiplayerManager failed: "Error while running the on_load: Unknown virtual signal name: LTN-fluid-wagon
stack traceback:
__LogisticTrainNetwork__/control.lua:1375: in function 'UpdateStopOutput'
__LogisticTrainNetwork__/control.lua:52: in function <__LogisticTrainNetwork__/control.lua:48>"
18.423 Info ServerMultiplayerManager.cpp:663: mapTick(-1) changing state from(CreatingGame) to(InitializationFailed)
Know issue of 1.1.2.
Use the alpha build.

maxtim
Burner Inserter
Burner Inserter
Posts: 12
Joined: Mon Apr 24, 2017 5:41 pm
Contact:

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

Post by maxtim »

Is there any way to restart the dispatch? I have stations set up, requests and suppliers as well as depots. The chests are full at the suppliers, yet there are no trains dispatched. Even stations that have worked before no longer get dispatched to. It seems only fluid trains are being dispatched. (Playing the alpha and factorio 0.15.3)

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

Post by Optera »

maxtim wrote:Is there any way to restart the dispatch? I have stations set up, requests and suppliers as well as depots. The chests are full at the suppliers, yet there are no trains dispatched. Even stations that have worked before no longer get dispatched to. It seems only fluid trains are being dispatched. (Playing the alpha and factorio 0.15.3)
As long as there are LTN stops the dispatcher never stops monitoring requesters and providers and generates deliveries when possible.
Check if your setup prevents deliveries from being created. short circuited stops, duplicate stop names, lack of depots, setting min length > max length.
Add a log-level 4 logfile if the problem persists.

Locked

Return to “Logistic Train Network”