18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-03 11:15:23 +01:00
Files
maszyna/physics/components
jerrrrycho 0e3503a0ba perf(physics): no derailment criteria for a vehicle standing still while they hold nothing
check_derailment() worked out the lateral acceleration, the wheel unloading and Y/Q of every rail vehicle in every
step, the standing ones too, which are about half of them on Tomaszewo. The criteria derail a vehicle only once one of
them held over a distance (derailment::stretch), and a step of no distance adds none: when neither stretch holds any
distance yet, it stays empty whatever the step finds, and the monitor gives no verdict. So a vehicle which didn't move
in the step (Distance 0) with an idle monitor (derailment::monitor::idle()) skips them.

Results unchanged. A unit test runs an idle monitor through steps of no distance at a speed that overturns the
vehicle, and checks it stays idle with no verdict, while a monitor holding a distance is not idle and keeps it.
2026-12-02 07:24:02 +01:00
..