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

This subforum contains all the issues which we already resolved.
User avatar
Yodo
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Sat Dec 30, 2023 4:27 pm
Contact:

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

Post 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.
Attachments
image of issue
image of issue
20241228001802_1.jpg (669.29 KiB) Viewed 533 times
Have you considered using flow routers instead of balancers?
Roboport + Land mines > Behemoth Worm > (Legendary) Flamethrower turret
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 753
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

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

Post by Hares »

What will happen if you put one extra plate there?
User avatar
Yodo
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Sat Dec 30, 2023 4:27 pm
Contact:

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

Post 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.
Have you considered using flow routers instead of balancers?
Roboport + Land mines > Behemoth Worm > (Legendary) Flamethrower turret
Rseding91
Factorio Staff
Factorio Staff
Posts: 15279
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 »

Thanks for the report. I've unified everywhere that uses the multiplier to use the same form.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”