Page 4 of 8

### Re: Train station skipping conditions

Posted: Mon Jan 23, 2017 10:15 am
vipm23 wrote:
mrvn wrote:
Now a more interesting question: If train stops can be skipped, maybe even mid travel, then what does a train do when it skips all stations?
It's been suggested earlier that the train should simply stop where it is until a station opens up.
"where it is" would be quite bad if trains check in between stations. Trains would be sitting on the main lines blocking all other trains. I guess you mend it would stop at the current station (or the next on the list if in between).
TheUnknown007 wrote:That will only work with a train network where the train is guaranteed to be able to reach an "out of the way"-station from every position. Which means that you are pretty much forced to use loops at dead ends.
As for loops at the end: If you have dead ends then you have double sided trains. Make them symetrical and skipping a station doesn't matter. It will just arrive the other way around on the next.

Two solutions to the general problem:

1) don't use skip conditions if that makes stations unreachable.
2) when the station after a skipped one is unreachable then drive to previous station (the train doesn't have to stop but just has to plan the path to go through the station)

### Re: Train station skipping conditions

Posted: Mon Jan 23, 2017 10:23 am
That does not work, rails on any bigger system are one way only to prevent deadlocks

### Re: Train station skipping conditions

Posted: Mon Jan 23, 2017 10:24 am
TheUnknown007 wrote:That does not work, rails on any bigger system are one way only to prevent deadlocks
What does not work? Driving through the skipped station to reach the next one if it is otherwise unreachable?

### Re: Train station skipping conditions

Posted: Mon Jan 23, 2017 11:41 am
mrvn wrote:
TheUnknown007 wrote:That does not work, rails on any bigger system are one way only to prevent deadlocks
What does not work? Driving through the skipped station to reach the next one if it is otherwise unreachable?
A train cannot just stop anywhere, because the rails are one way, and they only lead to a few train stops. Without loops, the only way to get to the other train stops is going to a station, stopping, and reversing onto the other track. However, trains don't do that: if they can't reach a train stop by only driving forward, they say there is no path.

Example:

Code: Select all

``````____>____ : one way rail to the left
____<____ : one way rail to the right
____<>___ : both way rail
<-->   : train

The train is going from A to B, but halfway to B it should skip B and go to A. It cannot, because it is on a one way rail, which only leads to B.

train stops here
v
A____<>____>___<-->____>__________>__
\_<________<____________<___\__<>_______B
``````

### Re: Train station skipping conditions

Posted: Mon Jan 23, 2017 2:45 pm
TheUnknown007 wrote:
mrvn wrote:
TheUnknown007 wrote:That does not work, rails on any bigger system are one way only to prevent deadlocks
What does not work? Driving through the skipped station to reach the next one if it is otherwise unreachable?
A train cannot just stop anywhere, because the rails are one way, and they only lead to a few train stops. Without loops, the only way to get to the other train stops is going to a station, stopping, and reversing onto the other track. However, trains don't do that: if they can't reach a train stop by only driving forward, they say there is no path.
[/code]
At which point the "skipping code" would say: Darn, the next station is not reachable, lets try going to the one I skipped even though I shouldn't have to. And then it can find a path.

### Re: Train station skipping conditions

Posted: Mon Jan 23, 2017 2:54 pm
mrvn wrote:
TheUnknown007 wrote:
mrvn wrote:
TheUnknown007 wrote:That does not work, rails on any bigger system are one way only to prevent deadlocks
What does not work? Driving through the skipped station to reach the next one if it is otherwise unreachable?
A train cannot just stop anywhere, because the rails are one way, and they only lead to a few train stops. Without loops, the only way to get to the other train stops is going to a station, stopping, and reversing onto the other track. However, trains don't do that: if they can't reach a train stop by only driving forward, they say there is no path.
[/code]
At which point the "skipping code" would say: Darn, the next station is not reachable, lets try going to the one I skipped even though I shouldn't have to. And then it can find a path.
That is possible, but way too complicated. Who expects a train to still go to a station even though it is skipping it?

### Re: Train station skipping conditions

Posted: Tue Jan 24, 2017 4:37 am
I would do that. For me this behavior was clear, since more than a year and I bet for the dev that works on trains this is also clear. If not: we can hope, someone reads it. If not: we can make a bug ticket, cause it's a bug (that is simple to fix).

I also want to mention that I can have multiple stops with the same name and it makes sense: a coal mine should be skipped until there is enough coal. Which means: if you have 3 mines you can name them all "coal mine" and they have a separate control for on/off.

To other post from above: refueling. That is a completely different subject. I would say this is a special case and normally not needed, cause the trains don't need much power. You can refuel it anywhere on a schedule.

And writing a mod that changes the schedule if he train needstorefuel is simple and smart trains mod already does it. But I support ideas to have an integrated interface in the trains for refuel and other stuff...

### Re: Train station skipping conditions

Posted: Tue Jan 24, 2017 9:35 am
TheUnknown007 wrote:Who expects a train to still go to a station even though it is skipping it?
It's what you get now so it should not come as big surprise. It's what happens in real live if trains need to turn around there, too.

### Re: Train station skipping conditions

Posted: Tue Jan 24, 2017 9:41 am
ssilk wrote:I would do that. For me this behavior was clear, since more than a year and I bet for the dev that works on trains this is also clear. If not: we can hope, someone reads it. If not: we can make a bug ticket, cause it's a bug (that is simple to fix).

I also want to mention that I can have multiple stops with the same name and it makes sense: a coal mine should be skipped until there is enough coal. Which means: if you have 3 mines you can name them all "coal mine" and they have a separate control for on/off.

To other post from above: refueling. That is a completely different subject. I would say this is a special case and normally not needed, cause the trains don't need much power. You can refuel it anywhere on a schedule.

And writing a mod that changes the schedule if he train needstorefuel is simple and smart trains mod already does it. But I support ideas to have an integrated interface in the trains for refuel and other stuff...
You are mixing two things here:

1) coal mines switching the station on/off depending on how much coal is bunkered.
2) trains skipping stations because THE TRAIN don't need to go there.

I believe I saw it mentioned that problem 1 will be solved in .15 because you can turn stations on/off there. But it doesn't solve the second problem because that is a decision the train has to make.

And no, you can't do it efficiently by having a refueling stop anywhere in the schedule because you only want to refuel every X loops. And if you need a mod for something this simple then clearly that shows that something is missing from the game.

### Re: Train station skipping conditions

Posted: Sat Jan 28, 2017 1:37 pm
mrvn wrote:You are mixing two things here:

1) coal mines switching the station on/off depending on how much coal is bunkered.
2) trains skipping stations because THE TRAIN don't need to go there.
Ok, so tell me what is then this: A coal mine, that switches itself off BECAUSE the train should skip.
Is that a third case now?

And before you answer I tell you my thought (cause I already thought through all of that): You will not be able to explain the difference between both, I will find always examples, where you cannot distinct between both cases.

Refuel: It's not missing yet, normally you will not need it. But you can optimize it using refuel-mods, like smart-train. But it's not needed yet to keep the game fluid and only needed for those, who want to make really big train networks.

### Re: Train station skipping conditions

Posted: Sat Jan 28, 2017 10:30 pm
ssilk wrote:
mrvn wrote:You are mixing two things here:

1) coal mines switching the station on/off depending on how much coal is bunkered.
2) trains skipping stations because THE TRAIN don't need to go there.
Ok, so tell me what is then this: A coal mine, that switches itself off BECAUSE the train should skip.
Is that a third case now?
That is simply a combination of both cases and could be solved by both solutions.

Giving examples of cases where the second solution works is not a valid argument that the second solution is not needed. For that, you need to show that EVERY case of the second scenario can easily be solved with the first solution (which you can't).

### Re: Train station skipping conditions

Posted: Sun Jan 29, 2017 12:13 am
TheUnknown007 wrote:
Ok, so tell me what is then this: A coal mine, that switches itself off BECAUSE the train should skip.
Is that a third case now?
That is simply a combination of both cases and could be solved by both solutions.
Exactly. So if I look the two points of mrvn I can say "They are not different, I CAN mix both things, cause that is the same issue".
Giving examples of cases where the second solution works is not a valid argument that the second solution is not needed. For that, you need to show that EVERY case of the second scenario can easily be solved with the first solution (which you can't).
I don't need to prove that. The point is, that the other solution (trains controls schedule vs. train stops control schedule which seems to be implement in 0.15) is wanted (or meaning to be needed), but till yet no good reason, why.

The assertion is just, that the practice in real world shows, that controlling a schedule of any vehicle by the vehicle itself has in every case an equivalent to controlling it by the stations. Mathematically expressed: The order, in which an entity travels over nodes in a graph can be controlled by the entity (with a "schedule" or similar constructions like sorting the nodes or giving them kind of "weight").

Or it can be controlled by the nodes, which are able to appear/disappear (and a fixed rule in the entity, like "travel always to the next node").

### Re: Train station skipping conditions

Posted: Sun Jan 29, 2017 6:29 am
ssilk wrote:
mrvn wrote:You are mixing two things here:

1) coal mines switching the station on/off depending on how much coal is bunkered.
2) trains skipping stations because THE TRAIN don't need to go there.
Ok, so tell me what is then this: A coal mine, that switches itself off BECAUSE the train should skip.
Is that a third case now?
OK, now show me how this works when you have multiple trains with the same schedule. (One might have to skip, but another might not!)
Or other trains, doing different jobs, that happen to list the coal mine as a stop.(Same as above)
ssilk wrote: I don't need to prove that. The point is, that the other solution (trains controls schedule vs. train stops control schedule which seems to be implement in 0.15) is wanted (or meaning to be needed), but till yet no good reason, why.

The assertion is just, that the practice in real world shows, that controlling a schedule of any vehicle by the vehicle itself has in every case an equivalent to controlling it by the stations. Mathematically expressed: The order, in which an entity travels over nodes in a graph can be controlled by the entity (with a "schedule" or similar constructions like sorting the nodes or giving them kind of "weight").

Or it can be controlled by the nodes, which are able to appear/disappear (and a fixed rule in the entity, like "travel always to the next node").
You're making the implicit assumption that only one train is assigned to a stop, that only one entity could be passing through a node.

So controlling the entity by the nodes would be the same as controlling the entity by the entity, because only one entity would ever be affected by a node disappearing.

But this does not necessarily follow! Multiple trains can be assigned to a single stop-multiple entities can pass through the same node.
Controlling one entity by the state of one node would also, unavoidably, effect every other entity with a path through that node, including ones that would otherwise be completely unrelated, and might in fact need to go to that node right as it disappears(because the first entity needed to skip it.)

Among other things, this means that you cannot set up a refueling or rearming depot that services multiple trains without eschewing a train's ability to skip that depot because it still has fuel/supplies.(Unless you resort to the clunky solution of a refueling/rearming stop for every train that visits that depot-and they couldn't just be named the same, because the train that needs to skip would just go for the first open one-you would need a dedicated stop for each train.)

Or having an outpost resupplied by multiple trains with different items.(Unless you resort to one stop per item-this is a bit better, you don't need one for each train, just one for each item-but it's still going to be clunky.)

Or having a train skip the above outpost because it ran out of supplies (if you have multiple trains for that item, visiting that outpost, shutting off the station to make that train skip would make all the trains skip that stop, including the ones that still have supplies to give out. There isn't a good answer to this-unless you consider the above solution of a dedicated stop for every train that visits that outpost "good".)

### Re: Train station skipping conditions

Posted: Sun Jan 29, 2017 11:55 am
vipm23 wrote:OK, now show me how this works when you have multiple trains with the same schedule. (One might have to skip, but another might not!)
That depends on what you want to achieve. For example: If the train stop says "Come on trains, I have 10,000 of coal, please load here!", then it is correct, that the trains will halt as often as possible, until the train stop is emptied.
Or other trains, doing different jobs, that happen to list the coal mine as a stop.(Same as above)
Again: It depends on what you want to achieve. You cannot translate it 1:1, but I assert you will always find a solution, that is similar.
But this does not necessarily follow! Multiple trains can be assigned to a single stop-multiple entities can pass through the same node.
Controlling one entity by the state of one node would also, unavoidably, effect every other entity with a path through that node, including ones that would otherwise be completely unrelated, and might in fact need to go to that node right as it disappears(because the first entity needed to skip it.)
The game wants you to transport stuff and not bringing entities to nodes. Bringing entities to nodes is a requirement to transport stuff.
And how you bring them to the nodes is the task, the game-part.
Among other things, this means that you cannot set up a refueling or rearming depot that services multiple trains without eschewing a train's ability to skip that depot because it still has fuel/supplies.(Unless you resort to the clunky solution of a refueling/rearming stop for every train that visits that depot-and they couldn't just be named the same, because the train that needs to skip would just go for the first open one-you would need a dedicated stop for each train.)
Well you seem to assume, that this is already implemented. But the truth is: trains need to implement some kind of sensor "How much fuel is inside me?" "How much repair packs are available?". And I doubt this will come, cause as said, currently not really needed, there is not much gameplay-change with or without this. This changes only, if you build really big networks. But the main stream of players doesn't do that. So it's currently good enough to have a "depot", where all of this can be done, cause the train stops here at every round of it's schedule.
Or having an outpost resupplied by multiple trains with different items.(Unless you resort to one stop per item-this is a bit better, you don't need one for each train, just one for each item-but it's still going to be clunky.)
I cannot follow, cause I do similar things quite differently and it is no problem, but it's too much off topic to explain it here. , and when I look (on youtube) how others make similar stuff so much different than me and compared to each other it's clear, that everyone has his own method. The point I want to say is, there is not this one method. And I think this is good as it is (that you currently have so much different possibilities). There is always more than one solution and what you need to understand is, that your way is just one of many and if you do things differently from beginning you come automatically to completely different solutions. Which are not more or less wrong that yours. It's hard to accept that all solutions have a right to exist but when you want to generalize it into the gameplay you need to concentrate into one direction and that means you have to decide what is the best and that is a conflict which needs to be solved first.
And the conflict is, that it's not clear now how to make this in a way that is always useful, simple AND fun.
Or having a train skip the above outpost because it ran out of supplies (if you have multiple trains for that item, visiting that outpost, shutting off the station to make that train skip would make all the trains skip that stop, including the ones that still have supplies to give out. There isn't a good answer to this-unless you consider the above solution of a dedicated stop for every train that visits that outpost "good".)
I didn't said, that you can coordinate single trains, you need to do stuff differently, with your example you need to fill all trains equally for example. Quite different thinking. But a valid solution.

Well, I can start now over with similar arguments "Would it be possible to do that, if ....?", but that is just a useless Diskussion.

Hm. When I see the things like so, it could be possible, that a mix of both methods is most useful. For example the refueling could be part of the train, while the decision of what to transport is part of the stops.

And I think to the most easy way to implement something. For example: As developer I would like to avoid to have code, that looks like: "What is the next train stop in my schedule? Is this train stop currently opened? Can it be reached yet? All yes? Then look up, what is requested there? Should I go to that stop now or not? If yes: Is this stop still open?" And so on.

But it would be simple to do this from the sight of the train: "Do I still have enough fuel? If no then add a refuel station at the end of the schedule." Simple and straight forward.

And vice versa: A train station can much easier decide: "Oh, I have now plenty of iron ore in my stoc, enough to fill one train. So I open the train stop now, that the trains can come and load it until I'm empty again."
But not: "The next train coming has fresh bread. I like fresh bread so I open the train stop now. Oh. There was another train faster. Cause there was a small accident with a biter. I couldn't see that. And now he unloads the bread from last week! Noooo!".

### Re: Train station skipping conditions

Posted: Mon Jan 30, 2017 11:08 am
ssilk wrote:
mrvn wrote:You are mixing two things here:

1) coal mines switching the station on/off depending on how much coal is bunkered.
2) trains skipping stations because THE TRAIN don't need to go there.
Ok, so tell me what is then this: A coal mine, that switches itself off BECAUSE the train should skip.
Is that a third case now?
No, that's just a broken solution.

Just consider what happens when you have 2 trains. One needs to refuel, the other does not. So you switch the station off because the second train doesn't need to refuel and the first runs out? Or do you leave the station on causing the first train to refuel when it already has enough fuel?

See you can't make this work right for just 2 trains. Now consider 50.

### Re: Train station skipping conditions

Posted: Mon Jan 30, 2017 11:18 am
ssilk wrote:
vipm23 wrote:OK, now show me how this works when you have multiple trains with the same schedule. (One might have to skip, but another might not!)
That depends on what you want to achieve. For example: If the train stop says "Come on trains, I have 10,000 of coal, please load here!", then it is correct, that the trains will halt as often as possible, until the train stop is emptied.
Which is wrong if the train is already full. It would be better for the train to skip the station, go to unloading and then return when it is empty.
What we want to achieve is to make trains stop at a station depending on conditions on the train. Not on conditions of the station.

You do want both features, stations switching off and trains skipping stops. The coal station has to switch off when it has no coal and the train has to skip the coal station when it doesn't need coal. Same with other goods and fuel, loading and unloading are all the same. The two features do have some overlap but they also have areas where the other can not work.

You keep saying: If you want that then use a mod. Clearly the existence of mods for this and their use shows the need for it. Or at least that users want it.

### Re: Train station skipping conditions

Posted: Tue Jan 31, 2017 1:48 pm
mrvn wrote: You do want both features, stations switching off and trains skipping stops.
No, you want to do it like so. I make an own station for refueling. Problem fixed.
The coal station has to switch off when it has no coal and the train has to skip the coal station when it doesn't need coal.

So you mixed two different concerns. This is nice, if it works. But who says, that it must be like so?
Same with other goods and fuel, loading and unloading are all the same. The two features do have some overlap but they also have areas where the other can not work.
I didn't say it is easier or so, I said it is possible to use "train stop logic" to control trains.
Clearly the existence of mods for this and their use shows the need for it. Or at least that users want it.
Agreed, but what is the "right" solution? That cannot be found out before we try. Which means we need mods, cause implementing into core is much more expensive and if that implementation doesn't play well it is wasted and better suggestions than this one will not be implemented.

### Re: Train station skipping conditions

Posted: Tue Jan 31, 2017 3:07 pm
ssilk wrote:
mrvn wrote: You do want both features, stations switching off and trains skipping stops.
No, you want to do it like so. I make an own station for refueling. Problem fixed.
The coal station has to switch off when it has no coal and the train has to skip the coal station when it doesn't need coal.

So you mixed two different concerns. This is nice, if it works. But who says, that it must be like so?
Same with other goods and fuel, loading and unloading are all the same. The two features do have some overlap but they also have areas where the other can not work.
I didn't say it is easier or so, I said it is possible to use "train stop logic" to control trains.
Clearly the existence of mods for this and their use shows the need for it. Or at least that users want it.
Agreed, but what is the "right" solution? That cannot be found out before we try. Which means we need mods, cause implementing into core is much more expensive and if that implementation doesn't play well it is wasted and better suggestions than this one will not be implemented.
I didn't mix 2 concerns. I showed you that there are different problems that need different solutions.

I also never said one is easier or harder to use than the other. What I said is that one solves one set of problems and the other solves a different (although partially overlapping) set of problems. Neither of the solution is universal. You can not solve all problems with just one of the solutions.

It's not about preferring one over the other out of a personal like or dislike. It's that they solve different problems. Most cases you can not substitute one for the other. You can only opt to have a less efficient train setup.

### Re: Train station skipping conditions

Posted: Wed Feb 01, 2017 1:53 pm
wow. Interesting thread... but confusing, cause there are like 3 seperate topics being discussed (while everyone thinks there's only their 1 topic here).

topic 1 (OP i think). add some smart train stuff before .15 cause there's not enough now. i think this topic can be dropped at this poing in time completely, cause its clear that .15 is the next update, nothing is gonna be added before it.

topic 2. .15 will add ability to switch off stations. is that enough to make a smart train system? I think most people here agre its not, but everyone has their own sollution as to what else is needed. For those that disaggree that its not enough, simple case of two Iron trains that go through all 10 iron mines then deliver back to base, shows that with just turning off stations, you will never make a schedule that follows 3 simple (and intuitive rules):
1. a train only delivers iron to base when it is full. (base is most likely place of gridlock, half empty trains causing trafic is bad)
2. a train does not go to a mine if it (the train) is already full or the mine is empty (run out). (waste of time/fuel and everything else)
3. a train does not skip a mine if the train isnt full and the mine has iron.

Something in addition to current (.14) train's stop list, and .15's turning off stations is needed. the question is what!

Topic 3. What to add to .15 so that players can create all sorts of different train systems and much like in the other systems in the game be limited more by their immagination and creativity then be forced into the one and only way that actualy works (i dont mind one and only "most efficient" way, as the search for it is fun too, but there should be alternatives that arent broken by base systems).

As far as i understand, ssilk is the main force in pushing for some sort of scheduling/routes system. Ssilk, its not clear at all what it is you want to see in game, but you keep shooting down the alternative (skipping conditions) because it doesnt mesh with what you want. i assume the smart train mod has something like it, but i've barey played with it, so dont know it, and it seems from this thread that you want to control the trains from the stations, but i cant see at all how exactly you think it should work. Usualy i love seeing your posts in this type of disscussion thread, cause they bring order and clarity, but this thread is a surprising exception.

Right now i'm in love with the suggestion of trains having skip conditions for stops in their schedule, because in combination with stations turning off, this can be the two building blocks that make almost any smart system possible. It does have one big downside. on large systems, it is a LOT of mirco management, and to tune your system, you'll have to catch a LOT of trains and edit their lists of conditions.

The solution would be making routes (listsl of stations and their conditions) and assigning those routes to trains, but we dont have a item that would make sense as the holder for these schedules... some sort of "train controler" i guess. cause train stop is NOT the place to add those.

### Re: Train station skipping conditions

Posted: Wed Feb 01, 2017 6:28 pm
Thank you RoddyVR for your very good analysis of this thread. It's normally the job of the moderator to do this but in this case I have brought my stakes in and are too involved.

And I didn't thought enough over my arguments and what to achieve. And seem to fail with them.
I have no problem with that fact. What's important for me ist the result of discussions. I hoped we get a new/better idea by solving the conflict between this extreme positions. The problem is just to keep the face. But I think this is not a problem in this forum.

But to bring this forward I explain now the background of my opinion (sorry, it wasn't clear for me either, but the last posts made me thinking about that):
a) I think F. is a really complex game and it has been shown in the past, that too fast introduction of a solution is not always good. [I think for example to the personal roboport, which is in my opinion still alpha, cause it hinders you sometimes to do things effectively. But that is a complete different discussion. ]

b) That is a very personal opinoin and experience and I don't know if it is good to argue based on that.
I played F. trains A LOT. Really, really much. I think thousands of hours. I cannot explain it here and I won't cause my style of play is surely not a good prototype, but I can say, that with a bigger maps the train network issues change.

Say with networks below 2000-5000 tiles in diameter the arguments above are more or less right. You want to have specialized trains, you want to have special trains and special cases. But when a train takes 2 minutes from one end of your map to the other and over 50 trains this changes to a very different approach.
Someone can argue: Who by the hell needs to play such big games? All I can answer is, that this is the essence, what makes Factorio in this very, very long run really interesting. I think to multiplayer and servers which plays one map for a year or so and I think this is something, which never has been tried before in large scale. But with Factorio it suddenly is possible AND fun. And so it will happen!

And so I would like to make things "right". Which means, that nothing is introduced, which surely is really needed. Which changes, if you play it from a larger perspective.

That overlaps also with RoddyVR
on large systems, it is a LOT of mirco management
Yes, it is. You just WON'T to do that all by hand. Only for very special jobs, like refueling and some other examples. But for the big picture you just want to bring things from A to B and won't do special cases like one train of three has repair packs on board. That breaks the factory, cause you can build such a big factory only, if you have some kind of standards in how to build up the factory.
And because of that there needs not to be so much intelligence in the trains as argued.