Train station skipping conditions
Moderator: ickputzdirwech
Train station skipping conditions
Currently a train visits every station in the list, waits for some seconds, then continues.
We already know(?) that 0.13 is going to bring us the ability to disable a station (at the station), and to set different conditions for when to leave a station (idle time, circuit signal, etc).
What I'd really like to have is another set of conditions at the train for when to skip going to a particular station entirely.
Simple use case:
I have route OreMine(OM)->OreSmelter1(OS1)->OreSmelter2(OS2). I want to go get ore, then drop some off at each smelter. In 0.12, I do this all with timers. In 0.13 I expect to add conditions so that the train will leave OM when the train is full and leave OS1 when OS1's buffer chests are full, ditto for OS2.
If this idea is implemented, then I could add a bunch of new conditions to improve this route. The simplest would simply be to add to OS2's skip-conditions list "empty train inventory". If there's no ore left in the train after dropping off at OS1, I want to go back to OM immediately, not waste time going to OS2 then immediately leaving (because the "empty train inventory" leave condition at OS2 would be met).
There's an equivalent case for two mines and one smelter, to skip the second mine if the train is full when leaving the first one.
This *COULD* be implemented without a new conditions list, by skipping a station if its leave condition is already met before going to it, but that would have a lot of side effects. A potential implementation that would have no side effects would be to have a single conditions list, and each condition gets two checkboxes to indicate if it's a leave-early condition or a skip-going-entirely condition or both (or neither, so I could leave conditions in the list but disable them, making temporary train reprogramming easier!).
There are, of course, *much* more complex use cases involving logistic and circuit network signals. I think it would be possible to implement very smart train systems with this feature. Without going into too much depth, my vague concept there is that I could make trains with long routes (such as one train that visits every station that needs copper plates), but have all of those stations skipped unless a circuit condition is met. That would allow the train to sit in the copper smelter output station until a request for copper is made, then make a delivery.
We already know(?) that 0.13 is going to bring us the ability to disable a station (at the station), and to set different conditions for when to leave a station (idle time, circuit signal, etc).
What I'd really like to have is another set of conditions at the train for when to skip going to a particular station entirely.
Simple use case:
I have route OreMine(OM)->OreSmelter1(OS1)->OreSmelter2(OS2). I want to go get ore, then drop some off at each smelter. In 0.12, I do this all with timers. In 0.13 I expect to add conditions so that the train will leave OM when the train is full and leave OS1 when OS1's buffer chests are full, ditto for OS2.
If this idea is implemented, then I could add a bunch of new conditions to improve this route. The simplest would simply be to add to OS2's skip-conditions list "empty train inventory". If there's no ore left in the train after dropping off at OS1, I want to go back to OM immediately, not waste time going to OS2 then immediately leaving (because the "empty train inventory" leave condition at OS2 would be met).
There's an equivalent case for two mines and one smelter, to skip the second mine if the train is full when leaving the first one.
This *COULD* be implemented without a new conditions list, by skipping a station if its leave condition is already met before going to it, but that would have a lot of side effects. A potential implementation that would have no side effects would be to have a single conditions list, and each condition gets two checkboxes to indicate if it's a leave-early condition or a skip-going-entirely condition or both (or neither, so I could leave conditions in the list but disable them, making temporary train reprogramming easier!).
There are, of course, *much* more complex use cases involving logistic and circuit network signals. I think it would be possible to implement very smart train systems with this feature. Without going into too much depth, my vague concept there is that I could make trains with long routes (such as one train that visits every station that needs copper plates), but have all of those stations skipped unless a circuit condition is met. That would allow the train to sit in the copper smelter output station until a request for copper is made, then make a delivery.
Re: Train station skipping conditions
AFAIK v0.13 will enable you to turn stations "off". The train will then skip this station in his schedule and continue with the next. So I move this to implemented cause all you need to do is to turn a station on/off in the right moment.
For information:
https://www.factorio.com/blog/post/fff-126
viewtopic.php?f=80&t=21899 Control Train Pathfinder (Passthru stations, Add Penalty)
For information:
https://www.factorio.com/blog/post/fff-126
viewtopic.php?f=80&t=21899 Control Train Pathfinder (Passthru stations, Add Penalty)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: Train station skipping conditions
Turning a station off causes every train to skip it. I want to be able to specify on each train when/why to skip a given station.
Also, turning a station off requires the decision information to be in the station's circuit network. My ore smelter input station won't know that my ore train is empty unless the two stations are connected to each other, which is a prohibitive amount of circuit wiring in many cases.
Also, turning a station off requires the decision information to be in the station's circuit network. My ore smelter input station won't know that my ore train is empty unless the two stations are connected to each other, which is a prohibitive amount of circuit wiring in many cases.
Re: Train station skipping conditions
And how should that work? I mean: How does the train know, what to do? Where does he get the information he needs to decide that? And how should the player instruct the train to do that without programming LUA.sparr wrote:Turning a station off causes every train to skip it. I want to be able to specify on each train when/why to skip a given station.
I mean: Make that specific! This is a GUI-problem, which isn't easy to solve. If you have an idea how that might look, without overwhelming the players show it us.
- In v0.13 it's much easier to use logistic network instead of circuit. They are similar. See https://www.factorio.com/blog/post/fff-138Also, turning a station off requires the decision information to be in the station's circuit network. My ore smelter input station won't know that my ore train is empty unless the two stations are connected to each other, which is a prohibitive amount of circuit wiring in many cases.
- And again the question, how should the train know that, if it is so complex for the ore smelter stations... Factorio logic requires that this needs to work without "magic".
So what I would say here is this: Let's wait for v0.13 and then we see, if this is still needed.
And... hmmm. I tell you how that will work in my opinoin: We should introduce routes.
Besides simple schedules (as now) a train can also follow one ore more routes.
Now the point: Routes can be turned on and off from somewhere (active/inactive).
So with this last element we can implement semi-intelligent routing and solve your problem: Either route A is active or route B.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: Train station skipping conditions
The train would make the decision to skip the same way it makes the decision on when to depart. The list given in a previous FFF was Time passed, Inventory full, Inventory empty, In-activity, Item count, Circuit condition. Those same conditions would be used here. The functionality would be almost entirely identical. The only difference would be the time passed and inactivity checks, which would check the time/activity for the station being departed, rather than the station whose conditions are being checked.ssilk wrote:And how should that work? I mean: How does the train know, what to do? Where does he get the information he needs to decide that? And how should the player instruct the train to do that without programming LUA.sparr wrote:Turning a station off causes every train to skip it. I want to be able to specify on each train when/why to skip a given station.
Here's my idea to modify the train UI posted in a previous FFF:ssilk wrote:I mean: Make that specific! This is a GUI-problem, which isn't easy to solve. If you have an idea how that might look, without overwhelming the players show it us.
Checking all the Depart boxes leaves the behavior the same as it works now. Checking some/all of the Skip boxes triggers the behavior I'm requesting.
Re: Train station skipping conditions
Hm. Much better. I'll put it back to suggestions and add it to viewtopic.php?f=80&t=21899 Control Train Pathfinder (Passthru stations, Add Penalty)
I would change your example like so, that there are two boxes, one with the "Depart condition" and a second with the "Skip next station condition".
My personal opinion is still, that I don't like it. It's difficult to explain the reason. One problem is, that more and more control of the train behavior will be inside of the train.
But it should be outside. Why? Cause a train is just one train. But we need to think to many trains. Routes.
With other words: This is in my opinion a dead end, because it makes trains too complicated and they behave more and more like single cars.
But they should behave like a fleet. Which means, the logic must be outside, so that it can serve all trains.
I would change your example like so, that there are two boxes, one with the "Depart condition" and a second with the "Skip next station condition".
My personal opinion is still, that I don't like it. It's difficult to explain the reason. One problem is, that more and more control of the train behavior will be inside of the train.
But it should be outside. Why? Cause a train is just one train. But we need to think to many trains. Routes.
With other words: This is in my opinion a dead end, because it makes trains too complicated and they behave more and more like single cars.
But they should behave like a fleet. Which means, the logic must be outside, so that it can serve all trains.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: Train station skipping conditions
I'm just working with what we have I don't know the internal dev process, but I'm hopeful that improvements made to the individual train system will carry over as features in a route/smart system later. I'm already looking at making improvements to the Smart Trains mod to approach this idea. Thanks for following up, and you guys keep making a kick ass game!
Re: Train station skipping conditions
[quote]One problem is, that more and more control of the train behavior will be inside of the train.
But it should be outside. Why? Cause a train is just one train. But we need to think to many trains. Routes.
/quote]
Hmm how will a train behave if the train station gets turned off while the train is at the station?? - if the train just leaves for the next station, then maybe you could set up a network that turns the station off as soon as the loading/undloading has stopped, and turns the station back on as soon as the train has left, and the ligths turn green.
Would something like that be possible??
But it should be outside. Why? Cause a train is just one train. But we need to think to many trains. Routes.
/quote]
Hmm how will a train behave if the train station gets turned off while the train is at the station?? - if the train just leaves for the next station, then maybe you could set up a network that turns the station off as soon as the loading/undloading has stopped, and turns the station back on as soon as the train has left, and the ligths turn green.
Would something like that be possible??
Re: Train station skipping conditions
Try it out: Remove the train station, while the train is waiting at it. It will mark the missing station red and continues with the next.xuhao wrote:Hmm how will a train behave if the train station gets turned off while the train is at the station??
Don't understand the sense of that. Sorry.maybe you could set up a network that turns the station off as soon as the loading/undloading has stopped, and turns the station back on as soon as the train has left, and the ligths turn green.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: Train station skipping conditions
In context to the previous sentence, i guess he wants to "turn off" e.g. "delete" the station out of the trains schedule for a short while so the train is leaving immediately, which would resemble a "leave when full / empty" condition. Since 0.13 will bring those conditions, there will be a simpler implementation.ssilk wrote:Don't understand the sense of that. Sorry.maybe you could set up a network that turns the station off as soon as the loading/undloading has stopped, and turns the station back on as soon as the train has left, and the ligths turn green.
FYI: In the meantime, use the SmartTrains mod which does also include those conditions.
Re: Train station skipping conditions
Ah, well, that "Leave-condition" is very different to a "Next-Target-condition".
Leaving a station is not critical. It doesn't matter much, when a train leaves a station (seen from game-logic), if I compare that with the implications you have, if the train just doesn't come.
My point was, that it is no good idea, if the train itself can change the schedule targets; that is - seen from many aspects - very different from just when should it leave a station. The problems won't appear, if the schedules are changed from outside of the train, cause from outside you have easier control over the rest of the environment.
Leaving a station is not critical. It doesn't matter much, when a train leaves a station (seen from game-logic), if I compare that with the implications you have, if the train just doesn't come.
My point was, that it is no good idea, if the train itself can change the schedule targets; that is - seen from many aspects - very different from just when should it leave a station. The problems won't appear, if the schedules are changed from outside of the train, cause from outside you have easier control over the rest of the environment.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: Train station skipping conditions
Train Driver: "Where are we going next?"
Train Navigator: "Well, the schedule says we go to station X next. But it also says we should leave station X when we are empty, and we're empty now, so I know we'll just keep going through X to Y. How about we go straight to Y and save time?"
Train Driver: "Y, here we come!"
Train Navigator: "Well, the schedule says we go to station X next. But it also says we should leave station X when we are empty, and we're empty now, so I know we'll just keep going through X to Y. How about we go straight to Y and save time?"
Train Driver: "Y, here we come!"
Re: Train station skipping conditions
The wait is no functionality of the schedule.
It works currently so:
Train: Next?
Scheduler: Station X. Wait there 30 seconds.
Train: I'm now at X. Next?
Scheduler: Station Y. Wait there until full.
Train: There is no Y (*). Next?
Scheduler: Station Z. Wait there until empty.
...
(*) That train stop has been temporally turned off.
The logic of the trains and the scheduler is simply stupid, because of many reasons.
It works currently so:
Train: Next?
Scheduler: Station X. Wait there 30 seconds.
Train: I'm now at X. Next?
Scheduler: Station Y. Wait there until full.
Train: There is no Y (*). Next?
Scheduler: Station Z. Wait there until empty.
...
(*) That train stop has been temporally turned off.
The logic of the trains and the scheduler is simply stupid, because of many reasons.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
-
- Fast Inserter
- Posts: 129
- Joined: Sun May 03, 2015 9:17 pm
- Contact:
Re: Train station skipping conditions
How about this:Train: Next?
Scheduler: Station X. Wait there 30 seconds.
Train: I'm now at X. Next?
Scheduler: Station Y. Wait there until full.
Train: There is no Y (*). Next?
Scheduler: Station Z. Wait there until empty.
Train: Next?
Scheduler: Station X. Wait there 30 seconds.
Train: I'm now at X. Next?
Scheduler: Station Y. Wait there until full or skip if you are already full. Are you already full?
Train: Yes.
Scheduler: Station Z. Wait there until empty. Are you currently empty?
Train: you for real here? I just said I'm full.
Scheduler: Station A. Wait for 10 seconds.
See? You can even keep the stupidity of the train scheduler.
Of course disabling the station and changing the schedule have different implications, that's the point. They can both be useful, and they both have their use cases (which partially overlap).My point was, that it is no good idea, if the train itself can change the schedule targets; that is - seen from many aspects - very different from just when should it leave a station. The problems won't appear, if the schedules are changed from outside of the train, cause from outside you have easier control over the rest of the environment.
Also, I don't see why it would be a problem when a train decides to skip a station "by itself" (without that station being turned off, but because the schedule for this specific train said so) if the train system was build for it (or maybe even, if the train system was not build specifically so that this would NOT work)
Re: Train station skipping conditions
+1 for this idea.
Trains need the ability to make decisions by themselves, just like robots. Having the settings inside/outside of the train is more related to a global schedule system, not the stops and conditions of the schedule.
I have done up a good example GUI that should make it more clear what a GUI could look like. The Enabled Condition should be reasonably clear to anyone that has played with the signal network.
In this way you could set up a stop to be enabled when it needs or has goods and a train to go to the appropriate stations when it can supply or pick up the goods. It would also be possible to set up the network to dispatch trains by using "command codes" (items in their wagons).
Many of the other solutions I have seen really don't sit well with me. I think that having to micro the train system is a good trade-off when compared to the throughput you get from it and this method gives you the most expressive power for the least number of mechanisms.
Trains need the ability to make decisions by themselves, just like robots. Having the settings inside/outside of the train is more related to a global schedule system, not the stops and conditions of the schedule.
I have done up a good example GUI that should make it more clear what a GUI could look like. The Enabled Condition should be reasonably clear to anyone that has played with the signal network.
In this way you could set up a stop to be enabled when it needs or has goods and a train to go to the appropriate stations when it can supply or pick up the goods. It would also be possible to set up the network to dispatch trains by using "command codes" (items in their wagons).
Many of the other solutions I have seen really don't sit well with me. I think that having to micro the train system is a good trade-off when compared to the throughput you get from it and this method gives you the most expressive power for the least number of mechanisms.
Re: Train station skipping conditions
Sorry, but robots don't make decissions on themselves. They are ordered by the logistic network.BenSeidel wrote: Trains need the ability to make decisions by themselves, just like robots.
But that is a conditon of the station and not the schedule nor train.
Don't get me wrong: I'm jumping on the logical issues, that such a suggestion includes, as long, as they are fixed.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
-
- Fast Inserter
- Posts: 129
- Joined: Sun May 03, 2015 9:17 pm
- Contact:
Re: Train station skipping conditions
No, that is a condition for the schedule: if the train meets those conditions, it will go to that station, if not it will check the next station.
Re: Train station skipping conditions
If train contains X then goto station, otherwise next station which is itself? Hm. What is the difference to a wait-condition with the same condition: Leave if train cargo is more than X?
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
-
- Fast Inserter
- Posts: 129
- Joined: Sun May 03, 2015 9:17 pm
- Contact:
Re: Train station skipping conditions
I think this is just a (bad) example: (why would a copper train check for circuits?) it would be more useful if there are two copper mines, and you can skip the second if the cargo is already full after the first.
Or, something that I would like: check fuel, only go to fueling station if you have less than 50 kJ fuel left (for example, I don't know how far you can get on 50 kJ)
Or a train that picks up all the stuff required for an item (like modules): don't go to the green circuit pickup if there are no more slots to be filled (or if you still have more than 50% of the capacity)
Or, something that I would like: check fuel, only go to fueling station if you have less than 50 kJ fuel left (for example, I don't know how far you can get on 50 kJ)
Or a train that picks up all the stuff required for an item (like modules): don't go to the green circuit pickup if there are no more slots to be filled (or if you still have more than 50% of the capacity)
Re: Train station skipping conditions
Yeah, "bad" example, but really just there to illustrate the interface, not the reasoning behind the user's logic. I didn't even look at the station's name.
The main issue with trains is that there is no mechanism to say "collect here when" and "drop off here when". If you compare it with the logistics network, that logic "built in". "Collect here when there are goods to collect", "drop off here when there is less that is being requested". You can also do some really intricate setups when you mix in the circuit network.
Also, everything in the tab marked "Schedule" is part of the schedule, including all stops and wait conditions and any other logic that would alter the trains behaviour.
Yes robots make decisions, it's just not something you can control directly (I wish you could), but indirectly through the type of chests you use. You don't ever see a robot moving back and forth between two chests carrying nothing do you?ssilk wrote:Sorry, but robots don't make decisions on themselves. They are ordered by the logistic network.BenSeidel wrote: Trains need the ability to make decisions by themselves, just like robots.
The main issue with trains is that there is no mechanism to say "collect here when" and "drop off here when". If you compare it with the logistics network, that logic "built in". "Collect here when there are goods to collect", "drop off here when there is less that is being requested". You can also do some really intricate setups when you mix in the circuit network.
Also, everything in the tab marked "Schedule" is part of the schedule, including all stops and wait conditions and any other logic that would alter the trains behaviour.