Page 1 of 1

Detecting Locomotive Fuel Level

Posted: Fri Sep 08, 2017 5:18 am
by spaghetti335
TL;DR
It should be possible to determine the fuel level of a locomotive automatically.

What ?
We used to be able to pull fuel out of a locomotive with inserters. This was once removed, and with it, our only method of measuring a locomotive's fuel. So now, the only way to check how much fuel a locomotive has is manually, which means we cannot automate any processes around this information.
There are two easy solutions.
a) Allow inserters to remove fuel from locomotives again.
b) Add a 'read fuel' circuit conditional.
Why ?
a) Let's be honest. I was working on a project, but this was the limiting factor to my success.
b) Let's automate more things!
c) Returns a previous feature that was removed for (as far as I can tell) no good reason.
d) This would play well with many other ideas (eg. more complex train scheduling - "Go to station 2 only if fuel > X")

Re: Detecting Locomotive Fuel Level

Posted: Sat Sep 09, 2017 1:18 pm
by Jamaica_MURR
It will be much better if we can have 2 types of conditions for every station in the train shedule:

1) wait conditions | wait until oil < 25000 for example (This type of conditions already exists)
2) arrival conditions | go to station only if coal < 2000 or (fuel) coal < 50 for example

Smart trains.

Re: Detecting Locomotive Fuel Level

Posted: Mon Sep 11, 2017 5:01 pm
by Factoruser
At least the fuel content should be added to the train's cargo information.

Re: Detecting Locomotive Fuel Level

Posted: Mon Sep 11, 2017 5:43 pm
by Selvek
Factoruser wrote:At least the fuel content should be added to the train's cargo information.
Yes, as long as there is a way to differentiate coal in the fuel storage from coal in the cargo.

Re: Detecting Locomotive Fuel Level

Posted: Fri Sep 15, 2017 3:18 pm
by Factoruser
Selvek wrote:
Factoruser wrote:At least the fuel content should be added to the train's cargo information.
Yes, as long as there is a way to differentiate coal in the fuel storage from coal in the cargo.
Would be convient, but not a must. Resp. if you distinguish cargo and fuel, you can make a fuel level signal based on MJ or GJ straight away.

Re: Detecting Locomotive Fuel Level

Posted: Sun Sep 17, 2017 8:54 am
by ItsDarthChaos
Really, in the long run just having a fuel depot that your trains need to route to in their routine with, like, a 10 second timer isn't THAT bad. You'd just have to make sure you don't create a bottleneck in doing so. Currently, my trains have a fuel input at the main unloading platform that tops off their fuel while they are unloading.

Re: Detecting Locomotive Fuel Level

Posted: Mon Sep 18, 2017 6:14 am
by JCav
ItsDarthChaos wrote:Really, in the long run just having a fuel depot that your trains need to route to in their routine with, like, a 10 second timer isn't THAT bad. You'd just have to make sure you don't create a bottleneck in doing so. Currently, my trains have a fuel input at the main unloading platform that tops off their fuel while they are unloading.
That's also how I solve it. All trains share a stacker named "Fuel Stop" where they wait for the signals indicating their pickup is ready. In the meantime, they get refueled and are off the main line.

Just make sure your fuel stop has more stacker slots than active trains.

Re: Detecting Locomotive Fuel Level

Posted: Tue Sep 19, 2017 8:50 am
by Engimage
I find thread Train station skipping conditions being more consistent. It includes info on train fuel AND the way to handle it as currently there is no way to change train destination based on aquired information.

However there is another problem currently which makes fuel detection complex - every locomotive has its own fuel storage and while generally they do spend fuel equally there is a possibility where some locomotives might have fuel and thus can drive and others don't. In this case the total amount of fuel makes no sense. Also locomotives can be fueled with different items so what value exactly would you like to see? Maybe the total amount of energy (KJ)? Or lowest amount of energy per locomotive?

Re: Detecting Locomotive Fuel Level

Posted: Wed Sep 18, 2019 4:57 pm
by Ironhair
Was there any way added to check the locomotive fuel count?

Re: Detecting Locomotive Fuel Level

Posted: Wed Sep 18, 2019 5:15 pm
by steinio
Ironhair wrote:
Wed Sep 18, 2019 4:57 pm
Was there any way added to check the locomotive fuel count?
Inventory Sensor can read it for circuit network: https://mods.factorio.com/mod/Inventory%20Sensor