round up fluids reading train inventory

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

doktorstick
Fast Inserter
Fast Inserter
Posts: 219
Joined: Fri Aug 12, 2016 10:22 pm
Contact:

Re: round up fluids reading train inventory

Post by doktorstick »

please rito
BlakeMW
Filter Inserter
Filter Inserter
Posts: 954
Joined: Thu Jan 21, 2016 9:29 am
Contact:

Re: round up fluids reading train inventory

Post by BlakeMW »

I really think it should just be a hacky solution to either make pumps forcefully remove any fraction of liquid less than one, or quietly destroy fractions of liquid less than 1 (or some other threshold where pumps stop being effective at moving the remaining fraction, probably even 0.1 would be fine)
mrvn
Smart Inserter
Smart Inserter
Posts: 5873
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: round up fluids reading train inventory

Post by mrvn »

BlakeMW wrote:I really think it should just be a hacky solution to either make pumps forcefully remove any fraction of liquid less than one, or quietly destroy fractions of liquid less than 1 (or some other threshold where pumps stop being effective at moving the remaining fraction, probably even 0.1 would be fine)
They already move the last fraction out of a tank. The problem is just that if you wire them up to the tank with liquid > 0 then they stop before doing so.
BlakeMW
Filter Inserter
Filter Inserter
Posts: 954
Joined: Thu Jan 21, 2016 9:29 am
Contact:

Re: round up fluids reading train inventory

Post by BlakeMW »

Don't they fail to move the last fraction if there are joined tanks?

edit: nevermind. Looks like it does remove the last fraction.
Crysis1
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Dec 11, 2017 9:16 am
Contact:

Re: round up fluids reading train inventory

Post by Crysis1 »

I'm currently working on powering distant outposts using oil fractions by sending out whichever of the 3 fractions I currently have the most of. The (presumably empty) train is filled with a fraction and heads out to all the outposts that have less than 10,000 petrol+heavy+2*light. When it comes back to the oil depot it needs to be drained of leftover oil so it can head to the loading station mentioned earlier and be loaded with potentially a different fraction, so it needs to be completely emptied. I can't know which unloading pump to turn on if the total amount in the train is less than 1. Of course, it would be possible to add memory cells to keep track of what trains were last loaded with what but at that point I'm solving problems which arise not from the mechanics of the gameplay but from the programming of the game, which I don't think players should have to do.

I've read through this thread and realize changing from floor to ceiling would create problems too. But what about making it so that a pump won't leave <1 fluid in a tank by only pumping tankAmount-1 if that would occur. That's less extra cpu usage than a single pipe would use, it would be unnoticeable. I don't think many designs depend on precise pump speed unless somebody is using pumps for clocks.
mrvn
Smart Inserter
Smart Inserter
Posts: 5873
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: round up fluids reading train inventory

Post by mrvn »

Crysis1 wrote:I'm currently working on powering distant outposts using oil fractions by sending out whichever of the 3 fractions I currently have the most of. The (presumably empty) train is filled with a fraction and heads out to all the outposts that have less than 10,000 petrol+heavy+2*light. When it comes back to the oil depot it needs to be drained of leftover oil so it can head to the loading station mentioned earlier and be loaded with potentially a different fraction, so it needs to be completely emptied. I can't know which unloading pump to turn on if the total amount in the train is less than 1. Of course, it would be possible to add memory cells to keep track of what trains were last loaded with what but at that point I'm solving problems which arise not from the mechanics of the gameplay but from the programming of the game, which I don't think players should have to do.

I've read through this thread and realize changing from floor to ceiling would create problems too. But what about making it so that a pump won't leave <1 fluid in a tank by only pumping tankAmount-1 if that would occur. That's less extra cpu usage than a single pipe would use, it would be unnoticeable. I don't think many designs depend on precise pump speed unless somebody is using pumps for clocks.
Note that a pump does not pump from a tank. The tank naturally flows into the pump input fluid box. The pump then "pumps" that fluid to the output fluid box where it again flows naturally out of the pump. To do what you describe would mean changing the generic fluid box.
Crysis1
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Dec 11, 2017 9:16 am
Contact:

Re: round up fluids reading train inventory

Post by Crysis1 »

mrvn wrote:Note that a pump does not pump from a tank. The tank naturally flows into the pump input fluid box. The pump then "pumps" that fluid to the output fluid box where it again flows naturally out of the pump. To do what you describe would mean changing the generic fluid box.
I see that would be no good. On second thought the problem is not with the fluid mechanics but with the circuit network. Perhaps we can add a checkmark to round up instead of down on objects which round floating point numbers. Looks like the only such objects are the storage tank, the pumpjack, the accumulator and the train stop. An option in the options menu could also be added to enable this checkbox so it doesn't clutter up menus.
mrvn
Smart Inserter
Smart Inserter
Posts: 5873
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: round up fluids reading train inventory

Post by mrvn »

Crysis1 wrote:
mrvn wrote:Note that a pump does not pump from a tank. The tank naturally flows into the pump input fluid box. The pump then "pumps" that fluid to the output fluid box where it again flows naturally out of the pump. To do what you describe would mean changing the generic fluid box.
I see that would be no good. On second thought the problem is not with the fluid mechanics but with the circuit network. Perhaps we can add a checkmark to round up instead of down on objects which round floating point numbers. Looks like the only such objects are the storage tank, the pumpjack, the accumulator and the train stop. An option in the options menu could also be added to enable this checkbox so it doesn't clutter up menus.
The signal network should simply round up if the value is less than 1. So 0 is only ever reported when a tank really is empty. And since this would only affect checks for 0 there would be minimal impact. Basically only fixes setups that are currently broken.
bobucles
Smart Inserter
Smart Inserter
Posts: 1708
Joined: Wed Jun 10, 2015 10:37 pm
Contact:

Re: round up fluids reading train inventory

Post by bobucles »

Off by 0.00000000012143569827 errors truly are the worst.
Zavian
Smart Inserter
Smart Inserter
Posts: 1649
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: round up fluids reading train inventory

Post by Zavian »

What looks like a related bug report viewtopic.php?t=56031.
Koub
Global Moderator
Global Moderator
Posts: 7784
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: round up fluids reading train inventory

Post by Koub »

@Zavian : I took the liberty to edit your post to fix the link (you linked to "answering" the other bug report, I think this was unintended).
Koub - Please consider English is not my native language.
User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2638
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: round up fluids reading train inventory

Post by steinio »

This mod tries to fix the issue.
https://mods.factorio.com/mods/Shia/shi ... in-pumping

Has anybody tested it?
Image

Transport Belt Repair Man

View unread Posts
rdrunner
Burner Inserter
Burner Inserter
Posts: 6
Joined: Thu Sep 13, 2018 9:14 am
Contact:

Re: round up fluids reading train inventory

Post by rdrunner »

I posted a solution to the issue here:

https://www.reddit.com/r/factorio/comme ... requestor/

!blueprint https://pastebin.com/3dpi3Mpg

It is using a small timer and a latch in order to keep the pump active and actually empty the wagon:
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: round up fluids reading train inventory

Post by ssilk »

+11
This "bug" now tooks me about 5 hours to fix the completly contamined liquid network in my megabase.

BTW: I hope with the new fluid network it will not be possible to feed any liquid into a station, that is not thought to handle it. E.g. handle sulfur acid for a refinery station.

And vice versa: I hope with the new fluid network it will be possible to make stations, that can handle any kind of fluid. That needs sensors to check, what kind of fluid (or none) is in a part of a network flowing.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Darinth
Filter Inserter
Filter Inserter
Posts: 323
Joined: Wed Oct 17, 2018 12:17 pm
Contact:

Re: round up fluids reading train inventory

Post by Darinth »

The recent FFF that specifically showcased the new fluid system seemed very specific that it would not allow fluid mixing in the same pipe network. Unfortunately, I don't think your request for a single network able to hold different kinds of fluids and route them will happen. :(
mrvn
Smart Inserter
Smart Inserter
Posts: 5873
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: round up fluids reading train inventory

Post by mrvn »

It only needs 2 things:

1) A pump, pipe or tank that has a fluid filter so it only accepts one fluid type.
2) the pipe network will become empty when something somewhere accepts the fluid (see 1).

Then you can unload the train and "sort" any liquid into a separate pipe network.
Cobaltur
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Sat Sep 24, 2016 1:33 pm
Contact:

Re: [0.17.43] round down floats <1.0 leads to undesired behaviors

Post by Cobaltur »

Twinsen wrote: Mon Jun 05, 2017 3:55 pm Oh no, not this again.
I remember the rounding method was changed about 2 times due to problems like this.
Won't rounding up(in all cases including storage tanks, since it has to be consistent) cause other problems in other setups?

I'll add this to my TODO and hopefully we can fix it.
We might implement a mechanic where large high pressure fluids would destroy static small amounts of leftover fluid. This would also solve the "delete and replace all pipes because I accidentally put the wrong fluid in it for 1 second" problem.
We are also considering remove all the pipe fluid physics and replacing it with a much simpler model, similar to how electric networks work.
2 years ago it seems not high or no longer on the todo list.

last developer statement was 2 years ago was in "ideas and suggestions".
And in the referred topic many people give good examples why the current implementation is still not the expected.

Twinsen wrote: Fri Jul 21, 2017 9:48 am It's not as simple as rounding up.

If I round up soon there will be a flood of complaints from a different group of people saying that their storage tank logic no longer works, because there is 0.00001 fluid in their storage tank that they can't pump out. Or similar problems to this.
but reading singals from the source and rounding up, will solve this issue ;)


You referring "someone" will complain. This is bad argument style. We are asked to deliver good examples to prove that somehting is a bug and you refer just to "someone might complain".

If you thing the fluid flow is the source of the problem. Ok. But I don't want to talk over the fluid flow, just the signals.

Please also give at least one good example why rounding up singals is a bad idea. PersonaIly I cannot see it. This would help me not to insist on handling this as bug.

Thx
User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: round up fluids reading train inventory

Post by ptx0 »

is this getting any kind of attention at all?
mrvn
Smart Inserter
Smart Inserter
Posts: 5873
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: round up fluids reading train inventory

Post by mrvn »

ptx0 wrote: Fri Jan 03, 2020 11:46 pm is this getting any kind of attention at all?
no
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: round up fluids reading train inventory

Post by Optera »

mrvn wrote: Mon Jan 13, 2020 11:55 am
ptx0 wrote: Fri Jan 03, 2020 11:46 pm is this getting any kind of attention at all?
no
Sadly. Fluid unloading is as much a pain as ever and most frustratingly the fix is a simple change that wouldn't hurt anything else.
Post Reply

Return to “Ideas and Suggestions”