[Rseding91] [0.13.9] [Reopened] Rounding errors with GUI vs. game logic
[Rseding91] [0.13.9] [Reopened] Rounding errors with GUI vs. game logic
Pretty minor but confusing bug, which I assume is a floating point rounding issue, see below screenshot. This is the last in a chain of chemical plants making plastic, where only the first plant is actually producing anything. The one I've selected is the one at the very end, which says there is 3 petroleum, but is saying that is insufficient. I assume it's just the GUI rounding up and there's actually 2.9999 petroleum in the machine or something like that, but I've not seen it before in the 0.12.x line.
Sorry, no save as I took the screenshot and then fixed the problem before thinking about getting a save file
Sorry, no save as I took the screenshot and then fixed the problem before thinking about getting a save file
- Attachments
-
- factorio-rounding-error.png (489.55 KiB) Viewed 11647 times
Re: [0.13.9] Rounding errors with GUI vs. game logic
Thanks for the report
Even though its a minor issue,
I do think fluid input for recipes should round down, instead of to the nearest significant figure
Even though its a minor issue,
I do think fluid input for recipes should round down, instead of to the nearest significant figure
Re: [0.13.9] Rounding errors with GUI vs. game logic
Fixed for 0.13.10.
If you want to get ahold of me I'm almost always on Discord.
Re: [0.13.9] Rounding errors with GUI vs. game logic
Probably fixed NOT.
You made it worse then before.
Now the tank is full, but the number is rounded down.
We had this similiar discussion before in combination with logic network, where the tank was full but the signal was not transmitted due rounding down.
viewtopic.php?f=11&t=24558&hilit=+tank+full
I beg you don't play with th numbers in this glumpsy way or you will have alot of new bug reports like the curved rail collision boxes,
All cause have an effect.
Greetings steinio
You made it worse then before.
Now the tank is full, but the number is rounded down.
We had this similiar discussion before in combination with logic network, where the tank was full but the signal was not transmitted due rounding down.
viewtopic.php?f=11&t=24558&hilit=+tank+full
I beg you don't play with th numbers in this glumpsy way or you will have alot of new bug reports like the curved rail collision boxes,
All cause have an effect.
Greetings steinio
- Attachments
-
- Oil tank.png (829.32 KiB) Viewed 11433 times
Re: [0.13.9] Rounding errors with GUI vs. game logic
It's a display only value. The tank doesn't have 2.5k fluid in it, it has something like 2499.9 fluid and so it rounds down to 2.4k since there isn't actually 2.5k fluid in the tank.steinio wrote:Probably fixed NOT.
You made it worse then before.
Now the tank is full, but the number is rounded down.
We had this similiar discussion before in combination with logic network, where the tank was full but the signal was not transmitted due rounding down.
viewtopic.php?f=11&t=24558&hilit=+tank+full
I beg you don't play with th numbers in this glumpsy way or you will have alot of new bug reports like the curved rail collision boxes,
All cause have an effect.
Greetings steinio
If you want to get ahold of me I'm almost always on Discord.
Re: [0.13.9] Rounding errors with GUI vs. game logic
Rseding91 wrote:It's a display only value. The tank doesn't have 2.5k fluid in it, it has something like 2499.9 fluid and so it rounds down to 2.4k since there isn't actually 2.5k fluid in the tank.steinio wrote:Probably fixed NOT.
You made it worse then before.
Now the tank is full, but the number is rounded down.
We had this similiar discussion before in combination with logic network, where the tank was full but the signal was not transmitted due rounding down.
viewtopic.php?f=11&t=24558&hilit=+tank+full
I beg you don't play with th numbers in this glumpsy way or you will have alot of new bug reports like the curved rail collision boxes,
All cause have an effect.
Greetings steinio
The storage tanks gui should use natural rounding:
viewtopic.php?f=11&t=24558&p=154947&hilit=fluid#p154947
As it was in 0.12
Re: [0.13.9] Rounding errors with GUI vs. game logic
- The circuit says 2500.Rseding91 wrote: It's a display only value. The tank doesn't have 2.5k fluid in it, it has something like 2499.9 fluid and so it rounds down to 2.4k since there isn't actually 2.5k fluid in the tank.
- The refinery stops, because tbere is no space for heavy oil.
- Only the tooltip says 2400.
So pleace bring them all to one base of using the numbers.
In my linked thread, we come to the agreement to round up, no it's changed back to round down.
Greetings steinio
Re: [Rseding91] [0.13.9] [Reopened] Rounding errors with GUI vs. game logic
I changed it so item counts will round down and fluid counts will round as rounding does.
There's no perfect fix for this, if fluid counts round up then the original issue is still present but that's just how it is.
There's no perfect fix for this, if fluid counts round up then the original issue is still present but that's just how it is.
If you want to get ahold of me I'm almost always on Discord.
Re: [Rseding91] [0.13.9] [Reopened] Rounding errors with GUI vs. game logic
Perhaps the best idea for this would be for a config option to enable/disable 5/4 rounding?
Personally, I would prefer using 5/4 rounding.
-- Smoov
Personally, I would prefer using 5/4 rounding.
-- Smoov
- GlassDeviant
- Fast Inserter
- Posts: 170
- Joined: Wed Feb 11, 2015 1:51 am
- Contact:
Re: [Rseding91] [0.13.9] [Reopened] Rounding errors with GUI vs. game logic
Dunno 'bout others, but I program combinators with near-enough values. For example, my chem plants crack heavy oil when there is 2400 or more lubricant and 500 or more heavy oil stored, because when it comes right down to the wire that last 100 lubricant is not going to mean the difference between life and death.
As long as the games internal representation of the fluids isn't "losing" something (more than five nines accuracy at any rate) along the way somewhere it really doesn't matter if the display values or the values in the circuit network are not a perfect match. You can work around the fact that mathematics does not always reflect reality, rocket scientists do it every day in the real world.
As long as the games internal representation of the fluids isn't "losing" something (more than five nines accuracy at any rate) along the way somewhere it really doesn't matter if the display values or the values in the circuit network are not a perfect match. You can work around the fact that mathematics does not always reflect reality, rocket scientists do it every day in the real world.
- GD
Sorry if my posts are becoming difficult to read, my typing ability is rapidly deteriorating due to a nerve disorder. I try to clean them up before posting but don't always get every last typo.
Sorry if my posts are becoming difficult to read, my typing ability is rapidly deteriorating due to a nerve disorder. I try to clean them up before posting but don't always get every last typo.
Re: [Rseding91] [0.13.9] [Reopened] Rounding errors with GUI vs. game logic
my point is simply that the tank has a 2500 capacity, and with the 5/4 rounding from floating point to integer values on the circuit network, I only had to put 2500 to be 'full'... multiplied by the amount of tanks when monitoring others...
setting up displays also, would round properly.
didn't matter that it might have had 2499.5 in the tank, close enuf, call it full... but now we can't do that
if I'm monitoring 4 tanks, instead of 10,000, I have to use 9996, which just looks bad, and ends up rounding to 9.9k instead of 10k in the circuit network... so, did I set that up to 9900, or 9996?
It would be one thing if the circuit network used floating point numbers as well... I'd personally like that... but since we have to convert to integer, it is proper to 5/4 round rather than truncate to nearest integer.
anyways... just irritating to not have the 5/4 rounding... just feels wrong.
-- Smoov
setting up displays also, would round properly.
didn't matter that it might have had 2499.5 in the tank, close enuf, call it full... but now we can't do that
if I'm monitoring 4 tanks, instead of 10,000, I have to use 9996, which just looks bad, and ends up rounding to 9.9k instead of 10k in the circuit network... so, did I set that up to 9900, or 9996?
It would be one thing if the circuit network used floating point numbers as well... I'd personally like that... but since we have to convert to integer, it is proper to 5/4 round rather than truncate to nearest integer.
anyways... just irritating to not have the 5/4 rounding... just feels wrong.
-- Smoov
Re: [Rseding91] [0.13.9] [Reopened] Rounding errors with GUI vs. game logic
The developers have something planned for 0.15 with the fluid handling and this is a tiny step in this direction.Smoovious wrote:my point is simply that the tank has a 2500 capacity, and with the 5/4 rounding from floating point to integer values on the circuit network, I only had to put 2500 to be 'full'... multiplied by the amount of tanks when monitoring others...
setting up displays also, would round properly.
didn't matter that it might have had 2499.5 in the tank, close enuf, call it full... but now we can't do that
if I'm monitoring 4 tanks, instead of 10,000, I have to use 9996, which just looks bad, and ends up rounding to 9.9k instead of 10k in the circuit network... so, did I set that up to 9900, or 9996?
It would be one thing if the circuit network used floating point numbers as well... I'd personally like that... but since we have to convert to integer, it is proper to 5/4 round rather than truncate to nearest integer.
anyways... just irritating to not have the 5/4 rounding... just feels wrong.
-- Smoov
So let us be patient and decide after the release of 0.15 about what we then complain
-
- Burner Inserter
- Posts: 10
- Joined: Fri Apr 22, 2016 10:01 pm
- Contact:
Re: [Rseding91] [0.13.9] [Reopened] Rounding errors with GUI vs. game logic
I do what GlassDeviant does, and there is a reason for it. Fluid has to flow, it doesn't just balance perfectly, This means that if your heavy oil tanks are far enough away from your refineries, your refineries might be full because the pipe in front of them is full, because the next pipe is, because the next five pipes are 0.1 away from being full, and it continues like this until the tank, where it is 5 away from being full. This means that the heavy oil is stopping the refineries, but if you only crack it if your heavy oil is = to 2500 in the tank, it is not being cracked.
Re: [Rseding91] [0.13.9] [Reopened] Rounding errors with GUI vs. game logic
This issue isn't about fluid dynamics at work, but about floating point values being truncated to integer instead of rounded to integer.
How the fluid gets into the tank isn't really relevant here.
-- Smoov
How the fluid gets into the tank isn't really relevant here.
-- Smoov