18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-19 21:34:58 +01:00
Files
maszyna/tests/scenarios/cases/test_mode_standstill.json
jerrrrycho e5aafd154f feat(simulation): the pass and the standstill wait for the train under test only
Both waited for every vehicle of the scenery to stand still, so on a scenery
with AI traffic a test could pass only when the traffic happened to stand too,
and the standstill end hardly ever came.

A test scenery names the train under test with test.vehicle <name> in its
config block (once for each train, if several): the pass and the standstill wait
for the consists of these vehicles as they are at the moment, so a train the
tested one couples to counts with it. A name the scenery doesn't have ends the
test with the error code. Without test.vehicle every vehicle counts, as before.
A signal passed at danger counts for every train either way.

run.py puts the case's lead vehicle into test.vehicle. test_mode_standstill_traffic
has the train under test standing on track 2 of Stacja1 while AI traffic leaves
track 1 on the timetable: it ends on its 100 s standstill, where counting every
vehicle runs into the 300 s timeout. Physicslogs of the other trains of a case
(<something>_<vehicle>) are moved out of the game dir too.
2026-11-08 11:39:52 +01:00

27 lines
804 B
JSON

{
"description": "Test mode, standstill: EU07 on td.scn with no route set stops before the exit signal stacja1_j at stop and stays; nothing reports a result, so the test ends once the train under test stood still for test.standstill 120 seconds (the train waits about 70 s before it pulls off, so less would end it before the start).",
"base_scenery": "td.scn",
"time": "10:34",
"fragment": "td_red_signal.scn",
"test_config": [
"test.standstill 120"
],
"vars": {
"consist": "node -1 0 {{vehicle}} dynamic pkp\\4e_v1 4e-004 4e 0 headdriver 0 0 enddynamic"
},
"expect": "standstill",
"timeout": 600,
"checks": [
{
"type": "stops",
"moving_speed": 5,
"stop_speed": 0.5,
"hold": 5
},
{
"type": "distance",
"max": 150
}
]
}