Generic circuit limiter for loading stations

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Post Reply
leeux
Inserter
Inserter
Posts: 31
Joined: Sat Oct 02, 2021 2:56 am
Contact:

Generic circuit limiter for loading stations

Post by leeux »

Hello!

I'm struggling with something that I feel should be pretty common for LTN users to solve, but yet I haven't found any solution that satisfies me.

I have an incipient LTN network already working for some resources that are being used fairly frequently, and I have the issue that whenever LTN makes a request to fill up a station, it tries to deliver a partially loaded train up to the missing amount of resources in the requesting station, which is fine and I like. But the issue is that without a limiting circuit on the loading stations, the train is filled to max anyways which leads to overfilling of resources on the requesting stations.

Now, none of those are big issues... i.e. the requesting stations have more space than needed for extra resources, or the fact that partial requests are made.

I know I could solve the partial request issue by increasing the request threshold on the requesting stations to match the train max capacity, but I wouldn't want to do that, I like partial requests. Also, even if the fact that they get overloaded doesn't cause issues since the storage is plenty, still there are some mats that are expensive to make that I'd like to transfer in small chunks, instead of full loads every time!

So, just for the sake of solving this and having a base that works as best as it can, I'd like to try my hand at solving the partial load issue by limiting the loading stations when the trains come to them, to only load what's being requested for that particular train. So, I'd want to have a limiter circuit that I can paste over newly created provider stations.

And I'd want that circuit to be generic in the sense that I don't want to have to edit multiple combinators signals once is pasted (or at the very least that I'd only have to touch ONE single combinator,) and it should work for multiple resources if the station is requesting multiple things at the same time (i.e. maybe mixed trains with one resource per wagon,) by making use of Each, Everything and Anything as much as possible to avoid referring to the actual resources being transferred (and thus avoid hardcoding them.)

I know that the output combinator in each station outputs the current request that's being served and that you compare that with the actual resources loaded on the train via what's being reported by the station, but the problem is that the station's output combinator also outputs a lot of extraneous signals too (at least w.r.t. solving this issue) that pollute the operations and prevent the circuit from working generically, without filtering them first.

I kinda already solved this by using a generic signal filter I found elsewhere on here that works very well, and with that I'd need to edit just a single constant combinator every time I paste a LTN station, but the thing is, the signal filter is kinda awkward to work with and difficult to follow in case one needs to diagnose problems, and also that'd mean that each LTN station would require +4 extra combinators for the sole reason of filtering the useful signals, non counting the actual useful combinators for making the comparisons etc.


So, I thought I'd ask:

1. have anyone found an elegant solution to this with the minimum possible number of combinators per station?
2. would it be possible for LTN to offer a configuration panel for its output station combinator where we can choose which signals we want output there?
3. I feel that something like this is very very generic, and that there should already be a standard "request fullfilled" signal outputed by the station whenever a train is stopped there and the train already contains the number of resources as requested, that would solve this issue in a very simple way!


Thanks for any response!

Loving the mod,
~Leeux.

DaleStan
Filter Inserter
Filter Inserter
Posts: 368
Joined: Mon Jul 09, 2018 2:40 am
Contact:

Re: Generic circuit limiter for loading stations

Post by DaleStan »

I don't think I've ever bothered to filter the signals from the output combinator. What goes wrong when you let the non-item signals into your filter inserters (or whatever else you're using)?

leeux
Inserter
Inserter
Posts: 31
Joined: Sat Oct 02, 2021 2:56 am
Contact:

Re: Generic circuit limiter for loading stations

Post by leeux »

Hey DaleStan! Thanks for the reply!

The actual issue is that when it comes to make the final comparison between the train contents vs the requested, which is normally either * < 0 or * > 0, there are other signals in the set that also make that comparison pass, not only the actual resources I'm interested in comparing.

I'm trying a new solution using filter inserters which I was trying to avoid, because something tell me that they are a bit more UPS heavy than normal inserters with just enable conditions, but that just my raw gut feeling without knowing for sure or having made any tests. EDIT: I should say, the circuit processing part of enabling/disabling the inserters *could* be more UPS intensive, I mean.

I.e. keep in mind that whatever I find works, I'll be probably be using throughout the base ad infinitum in every future stations I create, so I'd like to avoid UPS heavy things... even if they are small in comparison, since by just the sheer number of stations in any final end game base, they turn up not to be so small by the end.

EDIT2: Also, for reasons of simplicity of logistics... having to have bulk loads of stack filter inserters to make loading stations feels wrong to me! I'd prefer not to have to use mass quantities of filter inserters, but if that what works... then perhaps I'd only make these type of stations where the mats are expensive to make and not everywhere.

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

Re: Generic circuit limiter for loading stations

Post by Optera »

So if I understand that right you want to control filter inserters to stop loading once the scheduled load is reached.

My station designs do that with a single combinator.
The other combinators are for only working with cargo wagons.
viewtopic.php?p=297643#p297643

leeux
Inserter
Inserter
Posts: 31
Joined: Sat Oct 02, 2021 2:56 am
Contact:

Re: Generic circuit limiter for loading stations

Post by leeux »

Thank you Optera,

Yeah I did saw that thread and read it almost in full some time ago!

I was stubborn in that I didn't want to use filter inserters in all loading stations, but I think it's the best option by far...

So I'll go with that solution, but I'll only apply it in the stations where I care about not having fully loaded trains serve partial requests... i.e. if something is expensive to produce, or consumes too much power while producing, etc.

For normal cheap/bulk stuff like ores, etc I'll only request full loaded trains and be done with it!

Thanks again for the replies, and sorry for the noise!

Best wishes.

Post Reply

Return to “Logistic Train Network”