Page 1 of 1

Full Fuell Wait Condition for Trains

Posted: Thu Jun 13, 2019 11:09 pm
by Alshain
TL;DR
Add a wait condition to trains for full fuel.

What ?
Add a wait condition to trains for when it is full on fuel.
Why ?
I want to set up a fuel station for trains that do not normally pass through a station that has fuel going in or out of it. I know this can be done with a simple timer but it would be nice to have it as a dedicated condition.

Re: Full Fuell Wait Condition for Trains

Posted: Fri Jun 14, 2019 1:59 am
by Tekillaa
Hi

The dedicated solution would be the "inactivity" condition, each time a locomotive have fuel, it reset the inactivity timer, use wisely, it does the job. same things with circuitry condition... classic timer like you said etc.

I don't know if dev will look into something which already can be easily achieve. I can see why you need it, it could be nice to have it, but i hope they will first spend their time in "more important ideas according to my point of view" (no offense, but things more important are missing for me).

Have fun!

Re: Full Fuell Wait Condition for Trains

Posted: Fri Jun 14, 2019 2:46 am
by Tekky
In the following thread, it has been suggested that it should be possible for a train station to read the contents of a locomotive:

viewtopic.php?f=6&t=70294 Train station can also read locomotive contents when 'Read train contents' is turned on

In that thread, I also referred to a different suggestion which would allow you to read the contents of individual wagons, including the locomotive.

Re: Full Fuell Wait Condition for Trains

Posted: Fri Jun 14, 2019 12:48 pm
by hale42
If im not misstaken you should be able to set the wait condition to cargo=3 nuclear fuel or whatever you are using (if it has a wagon carrying fuel you would have to add that to the cargo number)

Re: Full Fuell Wait Condition for Trains

Posted: Fri Jun 14, 2019 1:04 pm
by steinio
Use the inactivity option.

Re: Full Fuell Wait Condition for Trains

Posted: Fri Jun 21, 2019 7:45 am
by Roxor128
Ah, just what I was looking for before making a suggestion.

Rather than just "Fuel Full", make it so fuel gets treated like cargo (minus the empty condition for obvious reasons). That way you could have something like

Fuel Full
OR Fuel: Coal > 25
AND Circuit: Coal < 1000

as a way to ration out coal when the refuelling station is running low.

And yes, we're well aware of the inactivity=1s workaround (I use it myself). It's still just that: a workaround. This would be more flexible and save on wait time (granted, it's only a second, but it adds up with busy stations). Also, this would go well with a conditional station-skipping system, too.

New train schedule condition: Fuel amount

Posted: Mon Jul 22, 2019 10:24 am
by mrvn
merged — ssilk

TL;DR
The train schedule should allow using the fuel amount as condition.
What ?
I suggest:
1) adding a new condition "fuel" that acts similar to the item count condition except that it works on the items in the fuel slot of the train.
2) add up the fuel slots of all locomotives, for bi-directional trains compute the amount for forward and backward facing locomotives separately and use the minimum.
3) adding a special signal "fuel value" that corresponds to the fuel value of whatever fuel the locomotive has loaded. Fuel value would include the partial amount buffered in the locomotive(s).
Why ?
In the train schedule a train can wait to be empty, wait to be full, wait for 5s of inactivity, wait for 42 iron plates being loaded. But the train can not wait till "fuel: coal > 20" or "fuel: value > 10 MJ".

The new condition would make refueling much more flexible.

Re: New train schedule condition: Fuel amount

Posted: Mon Jul 22, 2019 12:05 pm
by Koub
For records, this issue (currently unable to give a train orders depending on fuel/loco inventory) has been the subject of many previous topics (totally non exhaustive list) :
viewtopic.php?f=6&t=59114
viewtopic.php?f=6&t=49214
viewtopic.php?f=6&t=46732
viewtopic.php?f=6&t=51387
viewtopic.php?f=6&t=58395
viewtopic.php?f=6&t=55670
viewtopic.php?f=6&t=53768
viewtopic.php?f=6&t=45586

Suggested solutions may differ or be very similar to yours, but all try to tackle with the "I want to be able to send my trains for refueling only when needed" need.

Re: New train schedule condition: Fuel amount

Posted: Mon Jul 22, 2019 12:41 pm
by mrvn
Koub wrote: Mon Jul 22, 2019 12:05 pm For records, this issue (currently unable to give a train orders depending on fuel/loco inventory) has been the subject of many previous topics (totally non exhaustive list) :
viewtopic.php?f=6&t=59114
viewtopic.php?f=6&t=49214
viewtopic.php?f=6&t=46732
viewtopic.php?f=6&t=51387
viewtopic.php?f=6&t=58395
viewtopic.php?f=6&t=55670
viewtopic.php?f=6&t=53768
viewtopic.php?f=6&t=45586

Suggested solutions may differ or be very similar to yours, but all try to tackle with the "I want to be able to send my trains for refueling only when needed" need.
59114 - Read contents from locomotive, about putting the fuel contents onto the circuit network. (thats for the Train Stop, not the schedule)
49214 - Pre-condition for skipping a stop. (a whole new scheduling way)
46732 - Train Wait Condition: Loco Inventory Full (horribly limited version of my proposal and basically covered by "inactivity")
51387 - Rail car/locomotive scanners (there is a mod for this)
58395 - Block rail section based on train condition (whole new way to interact with path finding)
55670 - wait until fueled (as in go to fuel stop when low on fuel - a whole new scheduling way)
53768 - Adding a fuel wait condision to trains (ok, a duplicate of mine with even fewer words and no suggested implementation)
45586 - Train Fuel Scheduling Parameters (a pre-condition like 49214)

While all the above might be nice additions I'm talking about something much simpler to implement right now. No new GUI and just very basic code to add to the existing schedule conditions.

Only 53768 seems to come close. To clarify I'm not talking about giving the train orders depending on fuel/loco inventory. No pre-condition to only go to a stop if some condition is met or anything requiring tons of new code or such. It's a simple leave condition just like all the existing ones. 50 lines of code or less all in one place I assume.

The problem I'm faced with is made worse by pyanodon mods having a stacksize of 500 for coal. So when I build a new train it requires 1500 coal or 6GJ of energy before it leaves the refuel station. Problem 1) it takes 15 minutes for a yellow inserter to load 1500 fuel. Problem 2) Where do I get 1500 coal per train from? That's a serious dip in the available coal buffer every time a train is added.

Re: New train schedule condition: Fuel amount

Posted: Mon Jul 22, 2019 1:12 pm
by Koub
Sure, I'm not saying these suggestions were better than yours, just enriching the context and the way many people have expressed being bothered by the inability to give orders depending on the fuel contents to their trains.

2020 - V0.18 ... how to read fuel of locomotive and set waiting condition

Posted: Wed Feb 19, 2020 1:50 pm
by Kelderon
Years in developement and it is not possible to set a waiting condition "fuel at X% (100%) / X (150 whatever)"?
How about this?
Most of the time the trains wait X seconds (5 is my favorite) but they are full within less than 1 or 2 seconds. So it is working but not as i prefer it.

Re: New train schedule condition: Fuel amount

Posted: Wed Feb 19, 2020 2:20 pm
by Koub
[Koub] Merged into older topic with same suggestion.

Re: New train schedule condition: Fuel amount

Posted: Wed Feb 19, 2020 2:23 pm
by Kelderon
Ok, but an essential function like this and no response :(

Re: New train schedule condition: Fuel amount

Posted: Wed Feb 19, 2020 4:37 pm
by bobucles
A fuel wait simply isn't a terribly important condition. Train fuel consumption isn't very high, and train refueling is extremely fast. It takes a very special setup to have a train load or unload more slowly than it can refuel.

As long as your train has at least one location in its route where it can refuel, there's not going to be any problems.

Re: New train schedule condition: Fuel amount

Posted: Thu Feb 20, 2020 5:14 am
by ssilk
Inventory sensor mod is the key.

https://mods.factorio.com/mod/Inventory%20Sensor

Also mods than add a refuel station to the schedule, if fuel runs low.

https://mods.factorio.com/query/Refuel?version=0.18

New train wait condition "full fuel"

Posted: Sun Apr 04, 2021 9:06 pm
by Bertus
TL;DR
New train wait condition "full fuel" so the train gets refuelled fully before leaving.
What ?
See TL;DR.
Why ?
It now sometimes happens that I have set up train refuelling sorrectly, but trains are at stops so short a time that refuelling does not happen (e.g. when using the bilk rail loader mod loading and unloading can happen really fast) so I still end up with trains out of fuel in the middle of nowhere. Setting a wait condition for x amount of seconds is wasteful when the train has fuel.

Re: New train wait condition "full fuel"

Posted: Sun Apr 04, 2021 11:19 pm
by jodokus31
Add the following condition:
and 2 sec. of inactivity

Re: New train wait condition "full fuel"

Posted: Mon Apr 05, 2021 10:39 am
by ickputzdirwech
Topics about the same suggestion that both could be merged with this one: 71996 and 73542.

See also this post 93738 for similar suggestions.

Re: Full Fuell Wait Condition for Trains

Posted: Mon Apr 05, 2021 11:14 pm
by ssilk
merged suggested topics

Thanks to ickputzdirwech

@all: See also the links to other articles and mods above!