Applied Energistics 2

Applied Energistics 2

156M Downloads

Special behavior of ME Pattern provider doesn't work like described combined with me interface + storage

dev-cyprium opened this issue ยท 12 comments

commented

Describe the bug

Simply put, the describer behavior doesn't work:

In the mod documentation this is stated:

  • Multiple provider with identical patterns are supported and work in parallel
  • Pattern providers will attempt to round-robin their batches to all of their faces, thus using all attached machines in parallel
  • Pattern providers have a special interaction with interfaces on subnets: if the interface is unconfigured the provider will skip the interface entirely and push directly to that subnet's, skipping the interface and not filling it with recipe batches, and more importantly, not inserting the next batch until there's space in storage.

I was able to make a setup in my creative testing world that disproves all of these claims.

Relevant website documentation: https://guide.appliedenergistics.org/1.20.4/items-blocks-machines/interface

Here is the part of the documentation for reference:
image

How to reproduce the bug

  1. Make a simple ME setup with autocrafting, coprocessing units, me terminal
  2. Make an example recipe that will go in the pattern terminal
  3. Make the subnetwork as shown in the documentation to test
  4. Request the item

Here is the network setup:
image
image
image

Expected behavior

The behavior that is currently happening in the mod is the follows, if the ME Pattern provider is in blocking mode, it won't respect that the first chest is full, thus, pushing it's crafting ingredients over multiple invetories:

image
image

This disproves the first claim:

skipping the interface and not filling it with recipe batches, and more importantly, not inserting the next batch until there's space in storage.

There was obviously not space in storage, and yet, it pushed the ingredients through, over multiple "machines"

The round robin claim is disproven as well:
image
image

Several issues with this:

  • The items aren't "round-robin" style put in all of the "machines" but rather shoved into one that there is space
  • The claim that it won't push into a single machine unless there is space is also wrong, as you can see on the screenshot, one redstone got pushed into the second "machine" while the other parts got pushed into the first "machine"
  • with blocking mode it's not working in "pararell" and not respecting that it has 2 free machines

It's a rather complex bug to explain, but hopefully above makes sense, I've included tons of screenshots and explanations for the issue, so something from the documentation is either confusing, or this behavior is not implemented as it's described.

I actually expected this to be correct, as I wanted to use AE2 to process on several slow machines in pararell in my main world, but I had this issue where the above things happens. Even though in my example "machines" are barrels, in my actual playthrough, this was the same bahaviour with machines as well, but for the sake of simplicity, I've demonstrated this bug in a creative controlled setting.

Additional details

No response

Which minecraft version are you using?

1.20

On which mod loaders does it happen?

Forge

Crash log

commented

I can't believe such a "simple" scenario such as doing a few things in parallel makes such a complicated scenario, I think a "simple" fix would be to just have a special mode on the pattern provider that allows such a scenario, since it seems common enough?
Although, that's out of scope of this "bug report" ticket, but I just want to point out that I'd love to see

commented

There is a solution floating around. But it is not main ae2. You can see about it at the end of this
#7897

commented

I think you misunderstood some parts:

  1. Multiple provider with identical patterns are supported and work in parallel -> Your setup only contains one PP and thus this claim can't be demonstrated in your setup.
  2. Pattern providers will attempt to round-robin their batches to all of their faces, thus using all attached machines in parallel -> Your setup has a PP of which only one face is actually used (i.e. the one with the Interface on it). Therefore no round-robin can be attempted in your test setup. You'd have to install a second Interface on another side of the PP (and make the PP non-directional) for this to work.
  3. Pattern providers have a special interaction with interfaces on subnets: if the interface is unconfigured the provider will skip the interface entirely and push directly to that subnet's, skipping the interface and not filling it with recipe batches, and more importantly, not inserting the next batch until there's space in storage. -> Storage of the subnet consists of all possible storages, in your case the three storage busses with their barrels. Since the three barrels (as a combined total) are not full, batches can be pushed to the subnet and are stored in the storage busses. Not inserting the next batch would only apply if there was no free storage available at all.
commented

The items aren't "round-robin" style put in all of the "machines" but rather shoved into one that there is space

the subnet counts as one singular machine.
it will round-robin between multiple pattern providers, but your setup only has one

The claim that it won't push into a single machine unless there is space is also wrong, as you can see on the screenshot, one redstone got pushed into the second "machine" while the other parts got pushed into the first "machine"

the subnet counts as one machine. there are multiple empty slots in this subnet, so it pushes into it

with blocking mode it's not working in "pararell" and not respecting that it has 2 free machines

again, the subnet counts as one machine. since the subnet contains at least one item which is an input in a pattern, the pattern provider blocks

commented

Ok, I've got it! I did missinterpret those parts, thank you for the explanation. However, one thing remains puzzling for me if that's the case. In your "full network" example shown here:
image

It's shown that there are a lot of furnaces to demonstrate paralelism. This is from https://guide.appliedenergistics.org/1.20.4/example-setups/main-network

Does that mean that the furnaces will actually fill up one after the other? And to achieve "true" paralelism, you would have to either

  1. Have multiple interfaces per PP face?
  2. Have multiple PPs
    Is that correct?

So naturally does that mean that your example (shown in the image above) isn't actually "pararell" in a sense that jobs will be dispatched round-robbin style, but rather, the furnaces will fill up in sequence? (that is where all this confusion originally came from with me, from the example setup you provide on the site itself with "pararell" furnaces)

commented

Does that mean that the furnaces will actually fill up one after the other? And to achieve "true" paralelism, you would have to either

1. Have multiple interfaces per PP face?

2. Have multiple PPs
   Is that correct?

you need multiple PPs

So naturally does that mean that your example (shown in the image above) isn't actually "pararell" in a sense that jobs will be dispatched round-robbin style, but rather, the furnaces will fill up in sequence? (that is where all this confusion originally came from with me, from the example setup you provide on the site itself with "pararell" furnaces)

they will fill up in sequence.
you can also set up the pattern in a way that allows you to fill all of them at once, then the order doesn't matter

commented

Alright, I think I got it, I would assume the pattern for smelting iron in parallel would look something like:

64 x 3 raw iron ore
64 x 3 coal
yields
64 x 3 iron bars

Only in this scenario all of the 3 furnaces will be fully utilized if I understood you? ( if we're talking about a 3-furnace setup for example )

( Unless I specify a different stack size on the storage buses itself )

Right?

commented

Yeah - I've played around with it a bit more, and of course, it makes sense, I just miss interpreted some of the documentation. Thank you for filling me in! Closing this bug, as it's not a bug.

On a side note, I would really appreciate if you guys added a section / feature on:

  • Achieving pararellism
  • Achieving round-robin style without external mods

As it would be tons of help on expert-style modpacks, as I tend to like solving all my logistical problems just with AE2 as I like how it looks, and like staying within the same modspace for convenience.

commented

Alright, I think I got it, I would assume the pattern for smelting iron in parallel would look something like:

64 x 3 raw iron ore
64 x 3 coal
yields
64 x 3 iron bars

this would work, yes

Only in this scenario all of the 3 furnaces will be fully utilized if I understood you? ( if we're talking about a 3-furnace setup for example )

if you use less, e.g. one stack, it will also fully use them (assuming you don't use blocking mode), but it will take some time until all are used
tho for some fast machines that time could be slower than the time it takes to finish a task

commented

Actually I think it would not work, as you provide the fuel in the recipe without accounting for the actual buring time of coal (8 ores per coal). Since you can't guarantee where the coal is put you can also not guarantee that all furnaces will be able to smelt all items without having unused coal in them which would prevent a new batch from succeeding as not all coal could be pushed to the subnet.

I'd suggest you save yourself some trouble and just provide the ore via the PP and stock fuel indepedently, e.g. with export busses.

commented

ah, right I forgot about the fuel
it would work with fuel that smelts exactly one item tho

commented

If you really need single side parallelization you can use blocking pattern provider with the next setup (took from the discord)
image

It allows for single side parallelization if you really need it. It is useful for super smelters. It shuts down the connection if there are items inside the connected part of the machine (level emitter set to emit if items are above 1 without specifying). Although it requires some more setup and items. So it is up to you if you want to deal with that