Trains ignore no-stopping zones when able to touch target station but not align

Trains
computerneek · 5 months ago

Issue description

What it says in the title, really. This has been a mild annoyance ever since trains were added to the game, and probably arises from how a train pathing to a station is actually pathing to the very first track block of that station- so as soon as it can reach that block, it disregards no-stopping zones and parks across the entrance. Thus, you get incidents like this- the only reason that crossing isn't a no-stopping zone is because it would be utterly meaningless:

Image

... Yes, the Vehicle Parts section of that station is further ahead- four train lengths further ahead. It's a very long station. My thought is to have the train still consider no-stop zones when entering the station, and only disregard them on station approach when it can reach its first loading/unloading position, or the "fully in station parked" position if it doesn't have any cargo to move (ex. fueling station)- not just the station entrance.

It would also be nice if, in considering reservation area for a no-stop zone, it considers the areas that the train ahead is known to be vacating (based on that other train's own reservation distance), so a non-stop zone in the middle of the mainline need not cause closely-following trains to slam on the brakes for no apparent reason. I'm aware the current system doesn't really support that kind of thing, and it'd be more of a QOL improvement for networks with relatively low power-to-weight trains rather than a behavioral fix. I'd also note that this kind of thing would tend to reduce minimum follow distance of fast trains, and mean that faster trains might actually allow a single track to have greater total throughput than slower trains of similar size on the same track... which would, for operators like me that rely on at-station buffering instead of just-in-time deliveries, make there actually be a point to optimizing the network to eek out the last few kph, or use the faster but lower power-to-maintenance/power-to-weight locomotives like diesel or hydrogen.

Another potential QOL would be for the train to "look ahead" beyond its reservation distance to the next junction, so as to spot when it's going to collide with another (moving) train's reservation, and enable it to adjust its speed to slot in behind it- rather than the current system where merging tracks inevitably result in full-stop or near-stop merges rather than pre-accelerated merges, especially when the tracks are busy or one (or both) of the merging lines are right at the top of a steep climb. I'd imagine such a system could realistically just assume the other train will maintain constant speed, rather than try to compensate for poor railway design by predicting its speed changes.

I will note I haven't tested to see if unloading trains will violate station-exit exclusive zones, but given how the reservations work, I don't expect them to.

Reproduction steps

  1. Build any train station of multiple modules, ideally unidirectional and without exclusive zones. Assign at least one train to it, and put a no-stopping zone at the entrance, less than a train length away. Any non-stopping zone will work.
  2. Park one train in the station, or across the exit, or whatever else, such that the approaching train cannot begin loading or unloading until it moves, but can enter the rearmost module of the station. Can be a paused train, or an occupied exclusive block that extends into only part of the station (which would certainly be an interesting station design), but has to be a train, not a fork, end-of-track, or even another non-stopping zone (critical non-stop zones on station exits being ignored by actively loading/unloading trains isn't a behavior flaw, it's poor station design).
  3. Watch the approaching train completely disregard the non-stopping zone and nose into the station when it can't get nearly far enough in to actually begin unloading.

Game version and build number

Update 4.1 | v0.8.3a (b578)

Operating system

Windows

Malcolm-MacArthur [github] · 5 months ago

This is happening with me as well. Here is picture from my save file:

Image
Train 1 is loading up steel plates, and train 2 is trying to load slag at the same station. Instead of waiting at the waiting spots where train 3 is, train 2 ignores the no-stop section as it can touch the station. So now train 2 is blocking train 3. Since train 3 can't path and touch the bottom target station, to unload iron ore, it correctly waits in the waiting area.

Game version and build number

Update 4.1 | v0.8.4b (b593)

Operating system

Windows

Attachments

Here is the save file. The bug presents itself at the "Iron Ore Proccessing Outake" station after running the game for 30-60 seconds.

25 Showing 1–2 of 2