[0.15.23] inserter waits too long

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

mrvn
Smart Inserter
Smart Inserter
Posts: 5682
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [0.15.23] inserter waits too long

Post by mrvn »

Twinsen wrote:I didn't read through all this, but I changed how the maximum number of ingredients is calculated. Most of the cases of stack inserters waiting seemingly for no reason should be fixed since machines will accept more ingredients now.

For anyone interested here is the exact formula I used:

Code: Select all

  //1.166 is a magic number representing the maximum number of seconds it takes for a base game inserter to do one cycle.
  //the calculated overload multiplier is the number of crafts we can complete during one inserter full swing + 1
  return Math::clamp(uint32_t(std::ceil(1.166 / (recipeCraftingTime / craftingMachineCraftingSpeed))) + 1,
                     2,
                     100);
This will be in 0.16 unless some major flaws are found.
The lower limit of 2 makes sense. But how do you arrive at the upper limit of 100?

Twinsen
Factorio Staff
Factorio Staff
Posts: 1329
Joined: Tue Sep 23, 2014 7:10 am
Contact:

Re: [0.15.23] inserter waits too long

Post by Twinsen »

Just something to avoid ridiculous numbers for very short recipes and/or very fast assembling machines.

User avatar
featherwinglove
Filter Inserter
Filter Inserter
Posts: 579
Joined: Sat Jun 25, 2016 6:14 am
Contact:

Re: [0.15.23] inserter waits too long

Post by featherwinglove »

Twinsen wrote:Just something to avoid ridiculous numbers for very short recipes and/or very fast assembling machines.
...but that'll reintroduce the bug!

JohnyDL
Filter Inserter
Filter Inserter
Posts: 533
Joined: Fri May 16, 2014 3:44 pm
Contact:

Re: [0.15.23] inserter waits too long

Post by JohnyDL »

If you're doing more than 100 recipes a second you'd need to be using a very fast assembler and 2.5 blue belts of items input and output, you would be using more than one inserted for each

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: [0.15.23] inserter waits too long

Post by Zavian »

I'm pretty sure the devs have said that any assembler is limited to only complete one recipe per game update (so 60 per second). To even get close to that you probably need either a heavily modded game, or a mod that adds ridiculously short recipes. For the both situations you can use something like https://mods.factorio.com/mods/darkfrei/5xProduction. For the second case you can also get the recipes fixed to not be ridiculously fast and/or just live with it. (After all if the recipe is ridiculously fast, you really don't need lots of speed module beacons as well).

User avatar
Deadly-Bagel
Smart Inserter
Smart Inserter
Posts: 1498
Joined: Wed Jul 13, 2016 10:12 am
Contact:

Re: [0.15.23] inserter waits too long

Post by Deadly-Bagel »

An unforseen consequence may be found where very high-cost items have strangely low build-times. Take a Locomotive for example, 20 Engines and 30 Steel is quite a lot of resource but 0.5s is barely any time to put it all together. If installed in an Assembly Machine 2 it will request 4x the recipe, a whopping EIGHTY Electric Engines and 120 Steel, and I assume it will insist on filling all of one before proceeding to the next as it currently does? Even 40 engines is quite a hefty cost just to start assembly, but 80?

With this change should come a review of the build time of similar expensive recipes.
Money might be the root of all evil, but ignorance is the heart.

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

Re: [0.15.23] inserter waits too long

Post by Optera »

Deadly-Bagel wrote:With this change should come a review of the build time of similar expensive recipes.
I hope those 0.5 recipes are placeholders. A locomotive should take a while to assemble.
Even the recipes where 0.5 makes sense, like iron sticks or copper cable, should have time and counts multiplied by 5 to give reasonable response times and possible also slightly reduce ups. ;)

Cribbit
Fast Inserter
Fast Inserter
Posts: 199
Joined: Mon Oct 09, 2017 9:35 pm
Contact:

Re: [0.15.23] inserter waits too long

Post by Cribbit »

Yay fixes!

Now my other pet peeve with inserters, deadlock...
mrvn wrote:
Notxarb wrote:See, what the devs should do is make it so that inserters pick up a full hand of items first, bring it over to the machine, and then decide whether to deposit the items or not. That way, the items are immediately available once the machine goes below <2x the amount of items required, and while it uses those the inserter can go and get another hand ready.
And then the inserter picks up 12 iron ore to insert into the furnace and the furnace runs out of fuel. Now the inserter is stuck trying to deposit the iron ore and can't pick up some more coal or wood and you have a deadlock.

This deadlock already exists for targeting chests. If an inserter is targeting a full chest it will still try to pick up items from a belt, then hold them over the chest until a spot opens up. This also applies to railcars. The issue on railcars is you can lock slots in them. If you have several types of items going into the car the inserters can deadlock on one type of item and then get completely stuck.

User avatar
Deadly-Bagel
Smart Inserter
Smart Inserter
Posts: 1498
Joined: Wed Jul 13, 2016 10:12 am
Contact:

Re: [0.15.23] inserter waits too long

Post by Deadly-Bagel »

Where you need exact quantities of items in a chest you can now use the circuit network, with trains too to some degree (only becomes an issue when carriage counts conflict with each other).
Money might be the root of all evil, but ignorance is the heart.

Kyralessa
Filter Inserter
Filter Inserter
Posts: 442
Joined: Thu Sep 29, 2016 5:58 pm
Contact:

Re: [0.15.23] inserter waits too long

Post by Kyralessa »

Kyralessa wrote:
Mon Sep 11, 2017 7:43 pm
Speaking as a programmer, I know some of us find the word bug too whimsical and use the word defect instead, as it has a more uncompromising sound to it.

So is this a defect in the game?

No, it isn't.

The developers intended for things to go at certain speeds. If something in your factory isn't keeping up, it's not a defect in the game. It's a defect in your factory design. You need to find a different design that can keep up.

An assembly machine of any variety has no less than 12 entry/exit points. Why would you think you're only allowed to use one per ingredient?
Actually, upon reflection, if you use long-handed inserters, then an assembly machine has no less than 24 entry/exit points, because each edge where you can insert or remove something can be serviced by two long-handed inserters.

mrvn
Smart Inserter
Smart Inserter
Posts: 5682
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [0.15.23] inserter waits too long

Post by mrvn »

Cribbit wrote:
Tue Oct 17, 2017 6:03 pm
Yay fixes!

Now my other pet peeve with inserters, deadlock...
mrvn wrote:
Notxarb wrote:See, what the devs should do is make it so that inserters pick up a full hand of items first, bring it over to the machine, and then decide whether to deposit the items or not. That way, the items are immediately available once the machine goes below <2x the amount of items required, and while it uses those the inserter can go and get another hand ready.
And then the inserter picks up 12 iron ore to insert into the furnace and the furnace runs out of fuel. Now the inserter is stuck trying to deposit the iron ore and can't pick up some more coal or wood and you have a deadlock.

This deadlock already exists for targeting chests. If an inserter is targeting a full chest it will still try to pick up items from a belt, then hold them over the chest until a spot opens up. This also applies to railcars. The issue on railcars is you can lock slots in them. If you have several types of items going into the car the inserters can deadlock on one type of item and then get completely stuck.
As I recently experienced that deadlock already happens in assemblers. In Industrial Revolution a refinery needs a lot of ingredeiences. More than a stacks worth. That causes the assembler to only accept exactly 2x the recipe in items. That leaves the inserter picking up items because the assembler is below 2x the recipe but unable to insert them all because the hand contents exceed 2x the recipe.

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: [0.15.23] inserter waits too long

Post by Zavian »

mrvn wrote:
Thu Nov 07, 2019 1:25 pm
Cribbit wrote:
Tue Oct 17, 2017 6:03 pm
Yay fixes!

Now my other pet peeve with inserters, deadlock...
mrvn wrote:
Notxarb wrote:See, what the devs should do is make it so that inserters pick up a full hand of items first, bring it over to the machine, and then decide whether to deposit the items or not. That way, the items are immediately available once the machine goes below <2x the amount of items required, and while it uses those the inserter can go and get another hand ready.
And then the inserter picks up 12 iron ore to insert into the furnace and the furnace runs out of fuel. Now the inserter is stuck trying to deposit the iron ore and can't pick up some more coal or wood and you have a deadlock.

This deadlock already exists for targeting chests. If an inserter is targeting a full chest it will still try to pick up items from a belt, then hold them over the chest until a spot opens up. This also applies to railcars. The issue on railcars is you can lock slots in them. If you have several types of items going into the car the inserters can deadlock on one type of item and then get completely stuck.
As I recently experienced that deadlock already happens in assemblers. In Industrial Revolution a refinery needs a lot of ingredeiences. More than a stacks worth. That causes the assembler to only accept exactly 2x the recipe in items. That leaves the inserter picking up items because the assembler is below 2x the recipe but unable to insert them all because the hand contents exceed 2x the recipe.
That shouldn't cause any actual problems if you limit each inserter to only loading one ingredient.

mrvn
Smart Inserter
Smart Inserter
Posts: 5682
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [0.15.23] inserter waits too long

Post by mrvn »

Zavian wrote:
Tue Nov 12, 2019 9:59 am
mrvn wrote:
Thu Nov 07, 2019 1:25 pm
As I recently experienced that deadlock already happens in assemblers. In Industrial Revolution a refinery needs a lot of ingredeiences. More than a stacks worth. That causes the assembler to only accept exactly 2x the recipe in items. That leaves the inserter picking up items because the assembler is below 2x the recipe but unable to insert them all because the hand contents exceed 2x the recipe.
That shouldn't cause any actual problems if you limit each inserter to only loading one ingredient.
Unless you have a requester chest requesting all items needed with one inserter feeding the assembler. Why shjould you need more?

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: [0.15.23] inserter waits too long

Post by Zavian »

mrvn wrote:
Thu Nov 14, 2019 10:08 am
Zavian wrote:
Tue Nov 12, 2019 9:59 am
mrvn wrote:
Thu Nov 07, 2019 1:25 pm
As I recently experienced that deadlock already happens in assemblers. In Industrial Revolution a refinery needs a lot of ingredeiences. More than a stacks worth. That causes the assembler to only accept exactly 2x the recipe in items. That leaves the inserter picking up items because the assembler is below 2x the recipe but unable to insert them all because the hand contents exceed 2x the recipe.
That shouldn't cause any actual problems if you limit each inserter to only loading one ingredient.
Unless you have a requester chest requesting all items needed with one inserter feeding the assembler. Why shjould you need more?
Phrased another way. If you don't want your factory to be able to deadlock in that situation then design your factory to avoid the deadlock. The same thing can happen with train loading as well. All the same solutions should work. (The other common alternative is to limit inserter stack size to 1).

mrvn
Smart Inserter
Smart Inserter
Posts: 5682
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [0.15.23] inserter waits too long

Post by mrvn »

Zavian wrote:
Thu Nov 14, 2019 11:01 am
mrvn wrote:
Thu Nov 14, 2019 10:08 am
Zavian wrote:
Tue Nov 12, 2019 9:59 am
mrvn wrote:
Thu Nov 07, 2019 1:25 pm
As I recently experienced that deadlock already happens in assemblers. In Industrial Revolution a refinery needs a lot of ingredeiences. More than a stacks worth. That causes the assembler to only accept exactly 2x the recipe in items. That leaves the inserter picking up items because the assembler is below 2x the recipe but unable to insert them all because the hand contents exceed 2x the recipe.
That shouldn't cause any actual problems if you limit each inserter to only loading one ingredient.
Unless you have a requester chest requesting all items needed with one inserter feeding the assembler. Why shjould you need more?
Phrased another way. If you don't want your factory to be able to deadlock in that situation then design your factory to avoid the deadlock. The same thing can happen with train loading as well. All the same solutions should work. (The other common alternative is to limit inserter stack size to 1).
Oh yeah, won't that be fun for something needing 400 concrete. 12 times as long to load.

I would rather see the devs fix the formula for how much items an assembler will accept to be N*reciep + inserter bonus.

Post Reply

Return to “Ideas and Suggestions”