You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
core: remove neutral section hacks to improve reliability
The current implementation of neutral ranges has at least two troublesome hacks:
- when leaving a neutral section, the train takes time to start drawing power again.
due to the design of the current implementation, this time is converted into an
approximate distance
- power is cut ahead of time using an announce zone, instead of having the driver
react to the signal. this zone is there regardless of routes
These hacks bring about several bugs:
- the length of neutral section is extended by an approximation of the distance
required to start drawing power again. This approximation is always too high
if the train is slowing down. If the train is slowing down to a stop, it can
get stuck in this approximated extension. This issue will vanish once this
gets simulated over time instead.
- if a train stops inside the neutral section announce zone, it has to start
drawing power anyway to start back up, then cut power in the neutral section.
this behavior is very hard to emulate with the current simulation engine.
- if a sign announces a neutral section just before a switch, the announce zone
is directional. getting this right probably means treating annonce signs as
signals, and treat those as route dependant. This is a lot of work, and needs
to wait until trains can react to signals (train sim v3).
These hacks were a bad idea in the first place, and the features they were meant
to implement will be a lot easier to implement once trains:
- are simulated in a causal way
- can react to signals
0 commit comments