Full tank not full for logistics
Full tank not full for logistics
Hello,
i've a setup which shows the fill level of my tanks.
If i set the 'full' lamp to light if level > 2499 the lamp gets never on although the tank shows full.
The connected pump with the same settings also never switch on.
2498 works indeed. Could be a rounding error.
The number is apprev. with 2.5k, better would be 4 digits for clearance.
Greetings steinio
i've a setup which shows the fill level of my tanks.
If i set the 'full' lamp to light if level > 2499 the lamp gets never on although the tank shows full.
The connected pump with the same settings also never switch on.
2498 works indeed. Could be a rounding error.
The number is apprev. with 2.5k, better would be 4 digits for clearance.
Greetings steinio
- Attachments
-
- Logistics tank.png (2.64 MiB) Viewed 12585 times
Re: Full tank not full for logistics
I think it has to do with the fluid handling of Factorio.
Storage tanks (or pipes for that matter) will fill very slowly if they are almost full.
I have a small lubricant production only for electric engines which uses 0.1 lubricant/sec but I produce 1 lubricant/sec in the chemical plant.
In between is a storage tank. It will stay between 2496 and 2498 amount. As soon as I disconnect the electric engine production it will slowly fill to the max, after ~3-5 seconds it goes > 2499 and ~15 seconds later it will stop at 2499.97.
I don't think this is a bug, as the fluid handling was probably done this way by design.
What stops you from using 2490 or 2475 as value? One could reasonably say the storage tank is as good as full at that value (2475 = 99% full).
You can check the amount of fluid in the storage tank with the following command while the entity is selected with the mouse:
Storage tanks (or pipes for that matter) will fill very slowly if they are almost full.
I have a small lubricant production only for electric engines which uses 0.1 lubricant/sec but I produce 1 lubricant/sec in the chemical plant.
In between is a storage tank. It will stay between 2496 and 2498 amount. As soon as I disconnect the electric engine production it will slowly fill to the max, after ~3-5 seconds it goes > 2499 and ~15 seconds later it will stop at 2499.97.
I don't think this is a bug, as the fluid handling was probably done this way by design.
What stops you from using 2490 or 2475 as value? One could reasonably say the storage tank is as good as full at that value (2475 = 99% full).
You can check the amount of fluid in the storage tank with the following command while the entity is selected with the mouse:
Code: Select all
/c game.local_player.print(game.local_player.selected.fluidbox[1].amount)
Re: Full tank not full for logistics
I was about to say it wasn't a bug but now I don't know.
The fluid is stored as a floating point number. 2499.9024 fluid for instance.
The circuit network and conditions deal with integers.
The question is: should fluid when sent to the network as a number be rounded up or down.
If the first, then there's a bug, if the 2nd then there's no bug to fix.
The fluid is stored as a floating point number. 2499.9024 fluid for instance.
The circuit network and conditions deal with integers.
The question is: should fluid when sent to the network as a number be rounded up or down.
If the first, then there's a bug, if the 2nd then there's no bug to fix.
If you want to get ahold of me I'm almost always on Discord.
Re: Full tank not full for logistics
Hello daniel34,daniel34 wrote:I think it has to do with the fluid handling of Factorio.
Storage tanks (or pipes for that matter) will fill very slowly if they are almost full.
I have a small lubricant production only for electric engines which uses 0.1 lubricant/sec but I produce 1 lubricant/sec in the chemical plant.
In between is a storage tank. It will stay between 2496 and 2498 amount. As soon as I disconnect the electric engine production it will slowly fill to the max, after ~3-5 seconds it goes > 2499 and ~15 seconds later it will stop at 2499.97.
I don't think this is a bug, as the fluid handling was probably done this way by design.
What stops you from using 2490 or 2475 as value? One could reasonably say the storage tank is as good as full at that value (2475 = 99% full).
You can check the amount of fluid in the storage tank with the following command while the entity is selected with the mouse:Code: Select all
/c game.local_player.print(game.local_player.selected.fluidbox[1].amount)
well nothing stops me...
I use it as discribed by you as workaround. The question is, is 2500 > 2499 in the eyes of the game.
Greetings steinio
Re: Full tank not full for logistics
I vote for natural rounding. floor(n + 0.5).Rseding91 wrote:The question is: should fluid when sent to the network as a number be rounded up or down.
Re: Full tank not full for logistics
Thanks for the report
Since the only way to read super accurate fluid levels is with script,
And that combinators work with integers etc.
I believe this should be the case, round it to the nearest integer,DaveMcW wrote:I vote for natural rounding. floor(n + 0.5).Rseding91 wrote:The question is: should fluid when sent to the network as a number be rounded up or down.
Since the only way to read super accurate fluid levels is with script,
And that combinators work with integers etc.
Re: Full tank not full for logistics
Yes, sounds reasonable, changed it for 0.12.32Klonan wrote:Thanks for the report
I believe this should be the case, round it to the nearest integer,DaveMcW wrote:I vote for natural rounding. floor(n + 0.5).Rseding91 wrote:The question is: should fluid when sent to the network as a number be rounded up or down.
Since the only way to read super accurate fluid levels is with script,
And that combinators work with integers etc.
Re: Full tank not full for logistics
Gooooood morning vietnam..
Sorry factorio guys but i have the feeling that i'm getting angry.
According to the 2nd latest changelog someone of your team had the need to fiddle with the topic of this thread again:
Does this change now with every new major version?
You can see in the picture, that the tank never reach it's capacity of 2500.
The lamp should lit if water > 2499.
Please repair it again - forever.
Greetings steinio
Sorry factorio guys but i have the feeling that i'm getting angry.
According to the 2nd latest changelog someone of your team had the need to fiddle with the topic of this thread again:
Code: Select all
Storage tanks connected to the circuit network will output floored fluid values instead of rounding them.
The lamp should lit if water > 2499.
Please repair it again - forever.
Greetings steinio
Re: Full tank not full for logistics
This is desired behaviour, set your combinator to 2490.steinio wrote:Gooooood morning vietnam..
Sorry factorio guys but i have the feeling that i'm getting angry.
According to the 2nd latest changelog someone of your team had the need to fiddle with the topic of this thread again:Does this change now with every new major version? You can see in the picture, that the tank never reach it's capacity of 2500.Code: Select all
Storage tanks connected to the circuit network will output floored fluid values instead of rounding them.
The lamp should lit if water > 2499.
Please repair it again - forever.
Greetings steinio
There is a solution in 0.15,
So you will have to trust us until then, that it is the right move
Re: Full tank not full for logistics
Oh man so much leap of faith - hopefully it pays off
Re: Full tank not full for logistics
Not that my vote matters, but if I had one, I would want to have the 5/4 rounding back. (even with multiplying fluid volumes by 10x).
Testing my 4 tanks together, for volume of 10,000 to see if they're full, and 0, to see if they're empty, just makes more sense to me than testing for 9,996.
Unless the circuit network will be switched to floating point... well, even then, I'd still want to 5/4 round to the last decimal place it would use.
My 0.02 monies worth.
-- Smoov
Testing my 4 tanks together, for volume of 10,000 to see if they're full, and 0, to see if they're empty, just makes more sense to me than testing for 9,996.
Unless the circuit network will be switched to floating point... well, even then, I'd still want to 5/4 round to the last decimal place it would use.
My 0.02 monies worth.
-- Smoov
- GlassDeviant
- Fast Inserter
- Posts: 170
- Joined: Wed Feb 11, 2015 1:51 am
- Contact:
Re: Full tank not full for logistics
Not sure why this is showing up on my "unread posts" list, but...
I know this game is an OCD dream; however, there comes a point when rigid definitions of "full" and "empty" get in the way of a functional system. The fractional difference between 4990 units of heated water in a pair of tanks and 5000 units is real, but it's not going to make one bit of difference between survival and destruction when pumping it into an array of steam engines powering a wall of defensive lasers against an alien attack.
When you set your thermostat in your house, there is a limit to the precision of the setting.
Ask anyone with an engineering degree, precision has limits.
So while you can demand that tanks in a simulation game fill absolutely, totally full and notify you via the circuit network what it happens, does it really matter so much that you are able to avoid having to say "X > 2490" or did you just miss a dose of Paxil?
(sorry, a little melodramatic/exaggerated, but really...is it going to kill you to use 99.6% full instead of 100%? no offense intended, just injecting a little philosophy)
I know this game is an OCD dream; however, there comes a point when rigid definitions of "full" and "empty" get in the way of a functional system. The fractional difference between 4990 units of heated water in a pair of tanks and 5000 units is real, but it's not going to make one bit of difference between survival and destruction when pumping it into an array of steam engines powering a wall of defensive lasers against an alien attack.
When you set your thermostat in your house, there is a limit to the precision of the setting.
Ask anyone with an engineering degree, precision has limits.
So while you can demand that tanks in a simulation game fill absolutely, totally full and notify you via the circuit network what it happens, does it really matter so much that you are able to avoid having to say "X > 2490" or did you just miss a dose of Paxil?
(sorry, a little melodramatic/exaggerated, but really...is it going to kill you to use 99.6% full instead of 100%? no offense intended, just injecting a little philosophy)
- 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: Full tank not full for logistics
No... the real problem is, that the fundamental behavior has changed 3 times in the last year.
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: Full tank not full for logistics
i just adjust my numbers to get around the problem in question. [offtopic] how are you displaying those numbers?steinio wrote:
Re: Full tank not full for logistics
The game didn't exist a few years agosteinio wrote:No... the real problem is, that the fundamental behavior has changed 3 times in the last year.
If you want to get ahold of me I'm almost always on Discord.
Re: Full tank not full for logistics
Sorry - it's SmartDisplay by binbinhfr: https://mods.factorio.com/mods/binbinhfr/SmartDisplayimpetus maximus wrote:
i just adjust my numbers to get around the problem in question. [offtopic] how are you displaying those numbers?
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: Full tank not full for logistics
ok thanks. looked vanillaish.steinio wrote: Sorry - it's SmartDisplay by binbinhfr: https://mods.factorio.com/mods/binbinhfr/SmartDisplay