The refused throws of a switch run through and the split of a vehicle running onto it from its points hung only
on physics.derailment new. Existing sceneries trail through switches set against the train in ordinary play (four
td.scn cases do), so with new as the default (#631) such a switch would refuse the signaller for the rest of the
run and split the next train routed over it, with no way back but monitor, which turns off everything else of new.
The damage now has its own eu07.ini key, physics.derailment.runthrough yes|no, default no. With no a run-through is
still detected, logged, kept by the switch and its snapshot and given to the scenery, and new still derails a
run-through over 60 km/h, but the switch obeys the throws and is run over from its points as before. monitor tells
what new would do with the same key. The rules come from switch_fork::configured_rules() (world/switchfork.h),
which replaces the free run_through_rules() of world/Track.h.
monitor told "ran onto switch ... from its points" for every vehicle of every later train; it is told once for a
switch now (TSwitchExtension::m_splittold, kept in snapshots as runthroughsplittold).
The scenario cases of the damage set the key; eu07_td_switch_run_through_backs_new checks new with the default.
Documented in docs/behaviour-changes.md, tests/scenarios/README.md and blackbox_doc.md.
A rail vehicle running onto a switch from its frog end by the way the switch
is not set to pushes its blades over. Before, the switch was just thrown to
that way and nothing remembered it. Now the switch is marked as run through,
the log tells it once per run-through, and the scenery can react through the
memory cell and event __simulation.runthrough.
With physics.derailment new the damaged switch stays out of use for the run:
switch events no longer throw it, a vehicle running onto it from its points
pushes the loose blades over under its first axle and runs forked (the #496
limits derail it, cause split_switch), and a run-through above 60 km/h derails
the vehicle at the switch (cause run_through). In monitor mode the run does
not change; the log tells what new would do. Every switch is still taken as
trailable, as before.
A new core module, world/switchfork.h, for forked running: two axles
that follow each other in a train on the two ways of a switch thrown
between them.
- leaving_path(): the way an axle leaves a switch by. Its own way only
when the switch was thrown since it ran onto it; -1 (as the switch is
set, the call of before) otherwise.
- path_memory: the ways of the last four switches an axle ran over.
- forked(): an axle that ran onto a switch from its points took
another way than the axle ahead of it.
- bogie_limit(): the angle a bogie turns under the body in the tightest
curve the vehicle runs through, asin(a / 2R); R is the Rmin of the
vehicle definition, or 150 m (TSI LOC&PAS 4.2.3.6) without one.
- buffer_head_width: 0.45 m (UIC 527-1), past which two coupled ends
have no buffer face against the other.
Unit tests: the coach of td.scn forked on its switch derails 23 m into
it, the EU07 at 10 m, a coupled coach at 15.5 m.