Chem plant not running recipe #2

Production & Recipes
DeletedAccount20950 · 1 year ago

When the machine uses TryGetNewWork method, it evaluates them in the order they were selected. When the machine uses the canStartRecipe method, it calculates a weight based on the minimum ratio of available input quantities to required quantities for the machine. This is sort of a measure of how much of the recipe can be utilized at any given time.

eryk500 [discord] · 1 year ago

I've looked at the code itself & it seems that a new recipe won't get started,
if one is waiting to output it's resources. This means that in this case the first recipe,
is waiting to output the stuff from the previous iteration & it won't start a next recipe
untill it has room to output the stuff that's backed-up internally (from that previous iteration).

DeletedAccount20950 · 1 year ago

It also checks the output buffer when it calculates the weighting and it will limit the weighting to a certain amount based on the available output buffer, but it will not prevent the recipe from activating. Even though the weighting is constrained by the output capacity, if the input weighting is sufficient, the total weighting can still be higher than the second recipe weighting or alternatively, high enough for the recipe to be considered valid, and it has priority.

kayser_ [discord] · 1 year ago

Could it have something to do with the fact that the Fertilizer recipes only have 1 output, whereas the Ethanol/Fuel Gas recipes have two?

DeletedAccount20950 · 1 year ago

eryk500 [discord] wrote:

I've looked at the code itself & it seems that a new recipe won't get started,

This is also true, in this specific situation, the top recipe has to release all 15 of its Fertilizer I before the second recipe will be considered.

  • by the time it does, there's enough room again for the top recipe.

Because the recipe has finished while there was not enough room in the buffer for the recipe to output to.

kayser_ [discord] · 1 year ago

eryk500 [discord] wrote:

I've looked at the code itself & it seems that a new recipe won't get started,

But this is not true for the Ethanol/Fuel Gas case?

DeletedAccount20950 · 1 year ago

It makes sense because all have the same utilization in regard to inputs, but not in outputs.

In the video, the Fuel Gas recipe completes, it empties its contents to the internal buffer (that has space), and so the recipe is considered complete.

When it goes to find another recipe, it sees the co2 -> graphite can use 100% of the input buffer and 100% of its output buffer.

DeletedAccount20950 · 1 year ago

The graphite is a moot point really it doesn't matter, it's just a step in between.

The buffer for that machine with all logistics turned off is 6 water.

DeletedAccount20950 · 1 year ago

There needs to be 3 space in the output buffer for the top recipe to be considered better.

Because the bottom recipe uses only 1 water of the 6 output buffer, it is favored until the output buffer has 3/6 at which point the first recipe can use the entire buffer.

kayser_ [discord] · 1 year ago

The OP one still doesn't make sense to me

All the others do

kayser_ [discord] · 1 year ago

I never had any issue with the Ethanol/Fuel Gas combo. In fact I designed it to work in exacty this way, and I was expecting it to work in the same way for the Fertilizer, and I was surprised that it doesn't execute the 2nd recipe when there is room for it

jemsterr [discord] · 1 year ago

It's like it's there to force the organic recipe instead of the raw ingredient recipe.

kayser_ [discord] · 1 year ago

This is what happens if I add a third (irrelevant) recipe: The green bar goes away, but it still doesn't execute the 2nd recipe, even though it could.

DeletedAccount20950 · 1 year ago

Which recipe the machine decides to use does seem to be correct, but that "random" green bar seems to me like either a UI bug or a conflict with the two lists that the machine uses to pick a recipe.

7 Showing 41–60 of 78