From ecaa6872b9ac77db2425198e5109f99ed626bdcd Mon Sep 17 00:00:00 2001 From: jerrrrycho Date: Thu, 19 Nov 2026 01:58:56 +0100 Subject: [PATCH] test: scenario cases of an EU07 hauling a dead Vectron prepared for hauling eu07_td_hauls_dead_vectron: the timetable run on td.scn with a Vectron behind the EU07, hook and brake hose only, nobody in it, parameter H (MaSzyna-EU07/maszyna#64). eu07_td_hauls_dead_vectron_cold: the same from a cold start (trainset velocity 0, fragment td_cold_timetable.scn, the driver woken with Obey_train). Both reach Przystanek and stop there. Without the H neither train moves: the Vectron vents the brake pipe (run before the feature, on the code of staging: the pipe empty in 2 s, the Vectron's cylinders at 3.7 bar for the whole 300 s; cold, the pipe below 1 bar and a standstill). Refs MaSzyna-EU07/maszyna#64 --- tests/scenarios/README.md | 13 +++++++++++ .../cases/eu07_td_hauls_dead_vectron.json | 20 ++++++++++++++++ .../eu07_td_hauls_dead_vectron_cold.json | 23 +++++++++++++++++++ tests/scenarios/cases/td_cold_timetable.scn | 19 +++++++++++++++ 4 files changed, 75 insertions(+) create mode 100644 tests/scenarios/cases/eu07_td_hauls_dead_vectron.json create mode 100644 tests/scenarios/cases/eu07_td_hauls_dead_vectron_cold.json create mode 100644 tests/scenarios/cases/td_cold_timetable.scn diff --git a/tests/scenarios/README.md b/tests/scenarios/README.md index 7ab7646e7..6156828de 100644 --- a/tests/scenarios/README.md +++ b/tests/scenarios/README.md @@ -265,6 +265,19 @@ pushed, runs onto `tor1k` (`eventall2`), with the train still moving, and the bl locomotive coupled to the coaches (it couples about 70 s after the start). A driver that leaves its hand brake on under Connect pulls against it for good and the case ends as a standstill after 300 s. +`eu07_td_hauls_dead_vectron` is the timetable run with a dead locomotive in the train: behind the EU07 a +Vectron with nobody in it, coupled with the hook and the brake hose alone (the EU07's coupling `3`) and +prepared for hauling, the parameter `H` after its own coupling (`0.H`: the pullee mode of +MaSzyna-EU07/maszyna#64). The checks are those of the timetable cases; the train takes 300 s to +Przystanek and on (20 km/h after 79 s, the stop after 220 s and 1405 m). Without the `H` the Vectron, +which applies the emergency brake while none of its cabs is active, empties the brake pipe of the train +in two seconds, both locomotives stand with their brake cylinders full and the train never moves. +`eu07_td_hauls_dead_vectron_cold` (fragment `td_cold_timetable.scn`) is the same train from a cold start: +trainset velocity 0, so both locomotives stand braked (brake pipe at 3.5 bar, batteries off, the spring +brake of the Vectron switched on), and `event0` of the track gives the driver `Obey_train`, once. The EU07 +starts up, charges the brake pipe and leaves on time (the stop after 209 s and 1393 m); without the `H` +the pipe stays below 1 bar and the case ends as a standstill after 300 s. + ### Cases on a mission of a scenery The cases made from players' reports (eu07/maszyna#421, #506, #524, #525) run a whole mission diff --git a/tests/scenarios/cases/eu07_td_hauls_dead_vectron.json b/tests/scenarios/cases/eu07_td_hauls_dead_vectron.json new file mode 100644 index 000000000..8c06596c8 --- /dev/null +++ b/tests/scenarios/cases/eu07_td_hauls_dead_vectron.json @@ -0,0 +1,20 @@ +{ + "description": "EU07 on td.scn hauls a dead Vectron prepared for hauling (coupling 3, parameter H: the pullee mode of MaSzyna-EU07/maszyna#64), AI driver on the td/rozklad timetable: starts from Stacja1, keeps to the speed limit, brakes to a stop at Przystanek. Without the H the Vectron vents the brake pipe and the train never moves.", + "base_scenery": "td.scn", + "time": "10:34", + "fragment": "td_timetable.scn", + "vars": { + "consist": [ + "node -1 0 {{vehicle}} dynamic pkp/4e_v1 4e-004 4e 0 headdriver 3 0 enddynamic", + "node -1 0 dead_{{vehicle}} dynamic pkp/vectron_v1 1293-107 wariant_7w 0 nobody 0.H 0 enddynamic" + ] + }, + "duration": 300, + "timeout": 600, + "checks": [ + { "type": "starts", "min_speed": 20, "within": 150 }, + { "type": "max_speed", "limit": 90, "tolerance": 3 }, + { "type": "brakes", "min_pressure": 0.5 }, + { "type": "stops", "moving_speed": 20, "stop_speed": 1.0, "hold": 0, "min_distance": 1380, "max_distance": 1420 } + ] +} diff --git a/tests/scenarios/cases/eu07_td_hauls_dead_vectron_cold.json b/tests/scenarios/cases/eu07_td_hauls_dead_vectron_cold.json new file mode 100644 index 000000000..ed43f3c98 --- /dev/null +++ b/tests/scenarios/cases/eu07_td_hauls_dead_vectron_cold.json @@ -0,0 +1,23 @@ +{ + "description": "As eu07_td_hauls_dead_vectron, from a cold start: the trainset stands with velocity 0, so both locomotives start braked (brake pipe at 3.5 bar, batteries off, the Vectron's spring brake on). The EU07's driver gets the order to run as a train, starts the engine, charges the brake pipe and hauls the Vectron, prepared for hauling (parameter H), to Przystanek.", + "base_scenery": "td.scn", + "time": "10:34", + "fragment": "td_cold_timetable.scn", + "vars": { + "consist": [ + "node -1 0 {{vehicle}} dynamic pkp/4e_v1 4e-004 4e 0 headdriver 3 0 enddynamic", + "node -1 0 dead_{{vehicle}} dynamic pkp/vectron_v1 1293-107 wariant_7w 0 nobody 0.H 0 enddynamic" + ] + }, + "track_events": { + "tdo_n1734": "event0 autotest_wake" + }, + "duration": 300, + "timeout": 600, + "checks": [ + { "type": "starts", "min_speed": 20, "within": 150 }, + { "type": "max_speed", "limit": 90, "tolerance": 3 }, + { "type": "brakes", "min_pressure": 0.5 }, + { "type": "stops", "moving_speed": 20, "stop_speed": 1.0, "hold": 0, "min_distance": 1380, "max_distance": 1420 } + ] +} diff --git a/tests/scenarios/cases/td_cold_timetable.scn b/tests/scenarios/cases/td_cold_timetable.scn new file mode 100644 index 000000000..b11c4825a --- /dev/null +++ b/tests/scenarios/cases/td_cold_timetable.scn @@ -0,0 +1,19 @@ +// added by tests/scenarios/run.py to td.scn, whose own trainsets were removed: +// the trainset goes after FirstInit, the launcher and the events before it. +// the case's consist stands cold where td.scn keeps its timetable train (track 1 of Stacja1): trainset +// velocity 0, so every vehicle starts "Braked": brake pipe at 3.5 bar, battery off, hand and spring brakes on. +// it has the same timetable: Stacja1 10:35 -> Przystanek -> Stacja2. +trainset td/rozklad tdo_n1734 0.0 0.0 +{{consist}} +endtrainset + +// the way out of track 1, as in td_timetable.scn +node -1 0 autotest_route eventlauncher 0 0 0 -1 none 1034 keyctrl04 end + +// a driver of a standing trainset sleeps on Wait_for_orders until something wakes it. event0 of the train's +// track (the case's track_events) runs while it stands there and gives it, once (the memory cell), the order +// to run as a train: Obey_train. the engine is cold, so the AI starts it first (Prepare_engine). +node -1 0 autotest_ordered memcell 0 0 0 ordered 0 0 none endmemcell +event autotest_wake multiple 0 autotest_ordered autotest_order autotest_order_given condition memcompare * 0 * endevent +event autotest_order PutValues 0 none 0 0 0 Obey_train 0 0 endevent +event autotest_order_given UpdateValues 0 autotest_ordered * 1 * endevent