mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-27 21:45:16 +01:00
* test(scenarios): heavy trains on gradients, the limits #187, #199, #263 and #265 left Cases on lines of their own beside td.scn, built the way the downgrade fragment of #479 is (x = -3000, a substation of their own, signals that are a memory cell with SetVelocity 0 0), with level track long enough for a whole heavy consist at the start: - et41_coal_td_downgrade_restriction: ET41 + 25 coal wagons (1670 t) down 20 per mille into a 20 km/h restriction. Staging: 10.5 km/h at the lowest, stops at the signal. #263 saw it stop before the restriction; it no longer does. - et22_764_td_downgrade_restriction: ET22 + 20 loaded 764 (2650 t) on the same line. xfail: it dips to 8.5 km/h in the restriction, as the AI applies and releases the train brake in turn and the release of a G train takes 10-15 s. - st43_steel_td_downgrade12_long: ST43 + 45 425S, 6.5 km down 12 per mille at 40 km/h (#199): 35-37.5 km/h all the way. - et41_coal_td_upgrade_start: the ET41 train stops at a signal on 10 per mille and starts when it clears (#265): moves off 4.7 s later, rolls back 0.04 m. - eu07a_coaches_td_upgrade_long: EU07A + 8 coaches up 10 per mille at 80 km/h (#187): never below 73.8 km/h. run.py gets two checks: keeps_moving (the lowest vehicle speed between two distances) and starts_again (a start from a signal that clears at a given time, with the rollback). The README lists the cases and what the AI still does with heavy trains. * fix(ai): a heavy train starting on poor rails keeps sanding and takes the power down a step at a time An ET41 with 25 loaded coal wagons (2170 t) starting on level track with friction 0.3 (#187: heavy trains often don't get going on such rails) moved 75 m in 1500 s, never above 1 km/h, with 395 slips. Each slip made control_wheelslip() take the power down on every update while the wheels spun (DecSpeed(), two notches each: 3 to 0 within half a second) and press the anti-slip brake (1.1 bar on the locomotive), which braked the train, just moving, to a stand. Once the wheels gripped, the sand went off at once, as it stays on ahead of a slip only at a high motor current, and the start began anew from notch 1. A slip under power below 15 km/h now makes the start a sanded one until the train is at 15 km/h, or stands with no speed asked for: the sand stays on while there is power, a slip takes the power down one step at most once a second, and the anti-slip brake isn't used. A slip at speed, or one without power, is handled as before. The same train now gets going and stops at the signal 1000 m ahead (392 s, 85 slips). New case et41_coal_td_slippery_start (td_level_signal.scn); it fails on staging. * fix(ai): a sanded start only on a vehicle with sand