Skip to content
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

Inefficient parallelism and the new ME Input Bus mode #126

Open
TheTzdDark opened this issue Oct 12, 2024 · 0 comments
Open

Inefficient parallelism and the new ME Input Bus mode #126

TheTzdDark opened this issue Oct 12, 2024 · 0 comments
Labels
Features New feature or request

Comments

@TheTzdDark
Copy link

TheTzdDark commented Oct 12, 2024

This is a rather specific problem, but I will try to describe it:

Let's say we have a mechanism for processing ore that has a 512 parallelism capability.
The time of the ore processing recipe is 40 ticks.

We also have miners who mine tin, copper, and iron every 20 ticks.

The problem is how the mechanism chooses the recipe for the next creation and thereby gets stuck with low parallelism.

What does the problem look like based on my example:

  1. All ore gets into the mechanism
  2. Tin begins to be processed, while copper and iron remain in the input bus.
  3. As soon as the recipe is half completed, the ore enters the bus again, now there is 1x tin, 2x iron, 2х copper in the bus.
  4. The mechanism finished processing tin and saw that it could process tin again with parallelism 1.
    The result after N iterations: the mechanism processed all the tin, but N copper and N iron accumulated in the bus. That is, the mechanism constantly processed tin alone due to its constant supply in the tire, and thereby ignoring other possible recipes.

I understand that the internal logic of MM is about, that the mechanism looks for the first recipe among the available items in the bus and launches it. However, in this case, this is ineffective because if you make a delay in the supply of resources (for example, wait until a stack of each ore accumulates, and only then feed it into the mechanism at once), the mechanism will be able to cope with processing such a flow of ore.

To be honest, I understand that this is unlikely to be solved by changing the internal logic of recipe processing, however, I would like to propose a new functionality for the ME Input Bus as a solution to the problem.

How about adding a button to set the minimum percentage of items to be served from the limit number that we specify. In my example, let's say we specified that 1000 tin, iron, and copper ores should be supplied to the ME Input Bus. In normal mode, the tire would get even one ore from the ME system, but in the minimum amount mode, for example, 25%, it would only get if 250 or more ores were available in the ME system. In fact, this is just a convenient mode for accumulating items and further feeding them into the mechanism.

@TheTzdDark TheTzdDark changed the title Inefficient parallelism Inefficient parallelism and the new ME Input Bus mode Oct 12, 2024
@KasumiNova KasumiNova added question Further information is requested Features New feature or request and removed question Further information is requested labels Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Features New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants