Occasionally not detecting full fluid wagon
Occasionally not detecting full fluid wagon
Factorio version: 1.1.70-1
I have tried to setup a fluid provider station for 1 fluid wagon worth of heavy oil. However, the train is stuck at the station even though the fluid wagon is full. When I click into the train, it shows that the train condition for fluid contents >= 25k is not satisfied even though when I look at the fluid wagon, it shows 25k. This seem to have happened after the request timed out. I'm not sure if that could have caused this.
Are there any workarounds I can try? Thanks.
I have tried to setup a fluid provider station for 1 fluid wagon worth of heavy oil. However, the train is stuck at the station even though the fluid wagon is full. When I click into the train, it shows that the train condition for fluid contents >= 25k is not satisfied even though when I look at the fluid wagon, it shows 25k. This seem to have happened after the request timed out. I'm not sure if that could have caused this.
Are there any workarounds I can try? Thanks.
Re: [1.18.0] Occasionally not detecting full fluid wagon
1) This should be in general gameplay help.
LTN uses base game schedule-train interactions.
2) Going by the schedule the train is not filled to 25k.
Remember the GUI and circuit network round up.
LTN uses base game schedule-train interactions.
2) Going by the schedule the train is not filled to 25k.
Remember the GUI and circuit network round up.
Last edited by Optera on Tue Nov 29, 2022 6:36 am, edited 1 time in total.
My Mods: mods.factorio.com
Re: [1.18.0] Occasionally not detecting full fluid wagon
Sorry I'm not sure I understand your suggestion. The train schedule says I haven't met the 25k condition but when I check the fluid wagon contents I do have 25k.
Re: Occasionally not detecting full fluid wagon
Try changing the condition to "> 24999".
Circuit network rounds down, unless it's a fluid in (0, 1], which is rounded up (to 1). Most, if not all, other displays round normally.
So, even if the wagon is at 24999.999 and everything displays "25k", the circuit network will see 24999 which is less than 25000 so the condition is not fulfilled.
With fluids I recommend only using the full/empty cargo conditions or, if they can't be used, account for potential floating point imprecision in the conditions.
Missing a word there?
Circuit network rounds down, unless it's a fluid in (0, 1], which is rounded up (to 1). Most, if not all, other displays round normally.
So, even if the wagon is at 24999.999 and everything displays "25k", the circuit network will see 24999 which is less than 25000 so the condition is not fulfilled.
With fluids I recommend only using the full/empty cargo conditions or, if they can't be used, account for potential floating point imprecision in the conditions.
Re: Occasionally not detecting full fluid wagon
When I hit this scenario, I waited about 10 minutes for it to try to resolve itself but it never did. Even if at one point in time the fluid wagon was 24999 instead of 25000, shouldn't the pump have been able to pump the remaining fluid into the wagon? Is it possible there is a rounding error in the fluid wagon contents calculation?
In terms of workarounds, the train conditions are set by LTN. Optera, is it possible to have LTN round down the train condition when handling fluids, or is there a way to tell LTN to request an amount smaller than a full wagon? (ie 24k)
In terms of workarounds, the train conditions are set by LTN. Optera, is it possible to have LTN round down the train condition when handling fluids, or is there a way to tell LTN to request an amount smaller than a full wagon? (ie 24k)
Re: Occasionally not detecting full fluid wagon
Last I checked Factorio uses mathematical rounding everywhere. (>= 0,5 is rounded UP)Nidan wrote: ↑Tue Nov 29, 2022 6:50 amCircuit network rounds down, unless it's a fluid in (0, 1], which is rounded up (to 1). Most, if not all, other displays round normally.
So, even if the wagon is at 24999.999 and everything displays "25k", the circuit network will see 24999 which is less than 25000 so the condition is not fulfilled.
With fluids I recommend only using the full/empty cargo conditions or, if they can't be used, account for potential floating point imprecision in the conditions.
My Mods: mods.factorio.com
Re: Occasionally not detecting full fluid wagon
Don't ask for workarounds you disabled.mauhler31 wrote: ↑Wed Nov 30, 2022 4:49 amWhen I hit this scenario, I waited about 10 minutes for it to try to resolve itself but it never did. Even if at one point in time the fluid wagon was 24999 instead of 25000, shouldn't the pump have been able to pump the remaining fluid into the wagon? Is it possible there is a rounding error in the fluid wagon contents calculation?
In terms of workarounds, the train conditions are set by LTN. Optera, is it possible to have LTN round down the train condition when handling fluids, or is there a way to tell LTN to request an amount smaller than a full wagon? (ie 24k)
LTN adds a default stop timeout of 120s, after which trains are forced to leave stations.
Anyway since this is now a base game interaction I consider it resolved for LTN.
My Mods: mods.factorio.com
Re: Occasionally not detecting full fluid wagon
If there's any fluid at all in the storage tank, which the alt mode icon suggests there is, then the pump should be able to put the last unit(s) of fluid into the fluid wagon. If you have a save showing this situation, I recommend posting it as a bug report.
-
- Smart Inserter
- Posts: 2768
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: Occasionally not detecting full fluid wagon
Unless something changed recently, last I remember, the circuit network truncates/drops the decimal portion. I've had situations before where the value in the circuit network was 1 lower than what the gui showed.Optera wrote: ↑Wed Nov 30, 2022 5:52 amLast I checked Factorio uses mathematical rounding everywhere. (>= 0,5 is rounded UP)Nidan wrote: ↑Tue Nov 29, 2022 6:50 amCircuit network rounds down, unless it's a fluid in (0, 1], which is rounded up (to 1). Most, if not all, other displays round normally.
So, even if the wagon is at 24999.999 and everything displays "25k", the circuit network will see 24999 which is less than 25000 so the condition is not fulfilled.
With fluids I recommend only using the full/empty cargo conditions or, if they can't be used, account for potential floating point imprecision in the conditions.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
Re: Occasionally not detecting full fluid wagon
The condition is not set to >= 25000 based on the progress bar in the first screenshot, look like 25900.
Re: Occasionally not detecting full fluid wagon
It seems like I got confused since the condition displayed was truncated. I believe the problem was that I hadn't set a LTN max train length so it was trying to request more than a single wagon load. I haven't encountered this since I added it.
Really appreciate all the help!
Really appreciate all the help!