Page 1 of 1

[Rseding91] [2.0.28] Inconsistent rounding with fractional logistic group multiplier

Posted: Fri Dec 27, 2024 11:32 pm
by Yodo
Steps to reproduce:
1. Setup a logistic request for 840 iron plates
2. Set the logistic group multiplier to 0.65 -> It will display as 0.6, see 653467
3. Fill the entity with 545 iron plates

What happens:
The indicator light will show all requests fulfilled, but the tool-tip for iron plates in the request shows the satisfaction as 545/546, and the slot is colored red. Logistic bots will also not come to supply the last iron plate, even if it is available in the logistic network. If one more plate is removed, the request becomes "unsatisfied" and bots will supply items.

What I expected to happen:
For the bots to deliver the last iron plate, or at least, for the led indicator and the slot highlight&tooltip to agree with each other (I wouldn't have noticed the rounding if it was consistent).

Extra info:
- 840*0.65 = 546 exactly
- the rounding error also occurs with other items, and probably also with other values
- Note that if the bots are allowed to insert the iron plates, the final amount will vary, depending on their storage capacity and how many plates are needed to "satisfy" the request.

Does it always happen:
It is always happens if the right number of items are in the chest.

Re: [2.0.28] Inconsistent rounding with fractional logistic group multiplier

Posted: Sat Dec 28, 2024 1:00 pm
by Hares
What will happen if you put one extra plate there?

Re: [2.0.28] Inconsistent rounding with fractional logistic group multiplier

Posted: Sat Dec 28, 2024 5:17 pm
by Yodo
In the above case, with no upper limit set, the slot is not red anymore, and the tool-tip says 546/546 satisfaction.

If the upper limit is set to 840*0.65 then the same happens (iron plate is fine), but if a 547th iron plate is added, it goes into the trash slot.

Re: [Rseding91] [2.0.28] Inconsistent rounding with fractional logistic group multiplier

Posted: Thu Apr 03, 2025 7:22 pm
by Rseding91
Thanks for the report. I've unified everywhere that uses the multiplier to use the same form.