-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Locked slots per wagon" breaks down with merged delivery requests #291
Comments
Building stations overloading several stacks in one tick is fairly simple. Especially with items with a stack size below or close to inserter stack size. Even knowing how many inserters and what stack size they are set to a station has wouldn't be enough. On top of all that, merged deliveries are rare. |
Indeed. For the core of the factory I agree. There are three ancillary uses with which I run into the problem, and in each case the number of trains are below the number to serve maximum throughput. The first two are commonplace for me; the last is a niche use.
|
Wait Is it possible to schedule a single delivery with multiple types of items? Aside from a hacky way of loading a train with unrequested types of items? |
Yes, @KaidenP. This is easily supported. In fact, LTN is implemented to actively support this use case. |
@doktorstick So you just create a requester that requests say iron plates and copper, and a provider providing both of the same, and it'll create a single delivery with both copper and iron, both in the same train? If you set the request/provide stack threshold to be exactly your wagon(s) size(s), does it still work this way? I've never considered trying this deliberately. |
If request threshold for both items is surpassed in the same cycle.
Thresholds work best when set to multiples of total train capacity. |
Yes, what @Yousei9 said. This is getting afield from the enhancement request, but I tend to set my request thresholds in a ratio that is used in the production block. When it needs one resource, it needs the other. Sometimes (and this isn't the normal case; I won't pretend it is), I'll setup a multi-provider on purpose (and sometimes by happenstance) that serves those same items. Unless another provider snipes one of the items, or the multi-provider isn't keeping up for some reason, it does a pretty decent job at maintaining one train for two or more items delivered. And if a single provider does snipe, it eventually gets back to steady state since the requests are ratio-based. The cases I outlined earlier are my more "normal" cases of merged deliveries; I usually don't have multiple items being produced at one station. |
Until this has a more elegant solution, could a setting be added to just disable the creation of merged deliveries? I have a working local implementation, but the license does not allow me to create a public PR without prior permission, as that would constitute a modified distribution. |
Don't provide and request multiple items.
PR are allowed unless they are are made with the intent of distributing modified versions. |
Automatic scaling of locked slots has a circular dependency:
If you have a robust and fast algorithm that can do this please open a PR. |
Would you consider a PR that adds a provider-station control signal that limits the maximum number of merged deliveries that will be attempted from that station? Then you can, at least, limit the number of required locked slots for stations that provide many item types. |
I don't plan on adding such a signal. |
Sorry, I worded that poorly. What I meant was: I'll probably implement that signal for my own use. Should I clean up my changes and submit a PR, or is this approach not something you'd want to merge? |
@0ptera Does the "locked slots per wagon" setting still exist? I don't see it in the LTN settings. |
It's a control signal. |
This is a toss-up between working as designed (and so becomes a suggestion) or an unintentional behavior problem. Feel free to mark it as you see fit.
The main (only?) purpose of locked slots per wagon is to prevent inserters from holding on to items (n.b. https://forums.factorio.com/viewtopic.php?p=306857#p306857). Unfortunately, with stations that can supply many items, the stated goal of locked slots breaks down as each item type will possibly overflow into the "next" slot leaving the stations with two possible outcomes--1) inserters are left holding items; or 2) the pickup order fails because it cannot add all the item quantities due to previous items' overflow.
If the number of items is fixed, then it's simple enough for the user to manually increase the locked slots count to match the maximum number of items that can be in a wagon (e.g., supply coal, iron, and copper, designate three locked slots). Although, this does "waste" slots if all three items aren't in the merged request.
On the other hand, when the number of items in is the double digits, it becomes infeasible. And with stack sizes ranging from 1 to mod-dependent, it can't be mitigated with request thresholds unless they are high enough to guarantee only a few items can be in a wagon.
What I'd like to see fixed is when a merged delivery request is created, the number of locked slots scales with the number of items requested in the order. I'd be satisfied if this was an LTN setting.
As an aside, I don't know of other use-cases of locked slots. If my proposed fix was the default behavior, would you even need to specify the number of locked slots anymore, or would it just become a boolean signal?
The text was updated successfully, but these errors were encountered: