mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-19 20:24:59 +01:00
test: red signal case, seven vehicles on the td.scn timetable, parallel runs
- eu07_td_red_signal: no route set, the train has to stop before the exit
signal and stay there (new checks stays_stopped and distance; distance
is integrated from the speed, the physicslog has no position)
- en57/ep09/et22/sm42/sn61/vectron/eu07_td_timetable share one fragment
template, td_timetable.scn; a case sets vars.consist and the lead vehicle
is named {{vehicle}} = autotest_<case>
- -j N runs cases in parallel: each case has its own physicslog and, with
multiplelogs, its own log files, which are moved to out/<case>/
- a run stops at once on Bad vehicle / Bad trainset instead of waiting for
the timeout, and fails after 120 s without physicslog rows
- the .sbt geometry cache of a test scenery is dropped when the base
scenery is newer
All 8 cases pass in about a minute with -j 4.
This commit is contained in:
21
tests/scenarios/cases/en57_td_timetable.json
Normal file
21
tests/scenarios/cases/en57_td_timetable.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"description": "EN57 EMU (three cars) on td.scn, AI driver on the td/rozklad timetable: starts from Stacja1, keeps to the speed limit, brakes to a stop at Przystanek.",
|
||||
"base_scenery": "td.scn",
|
||||
"time": "10:34",
|
||||
"fragment": "td_timetable.scn",
|
||||
"vars": {
|
||||
"consist": [
|
||||
"node -1 0 {{vehicle}} dynamic pkp\\en57_v2 EN57-1000ra EN57RA_GSO_WKM1_KM_NS_N 0 headdriver 255 0 enddynamic",
|
||||
"node -1 0 {{vehicle}}_s dynamic pkp\\en57_v2 EN57-1000s EN57S_WKM1_KM_NS_S 0 nobody 255 0 enddynamic",
|
||||
"node -1 0 {{vehicle}}_rb dynamic pkp\\en57_v2 EN57-1000rb EN57RB_GSO_WKM1_KM_NS 0 nobody 0 0 enddynamic"
|
||||
]
|
||||
},
|
||||
"duration": 240,
|
||||
"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": 0.5, "hold": 5 }
|
||||
]
|
||||
}
|
||||
17
tests/scenarios/cases/ep09_td_timetable.json
Normal file
17
tests/scenarios/cases/ep09_td_timetable.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"description": "EP09 on td.scn, AI driver on the td/rozklad timetable: starts from Stacja1, keeps to the speed limit, brakes to a stop at Przystanek.",
|
||||
"base_scenery": "td.scn",
|
||||
"time": "10:34",
|
||||
"fragment": "td_timetable.scn",
|
||||
"vars": {
|
||||
"consist": "node -1 0 {{vehicle}} dynamic pkp\\ep09_v1 104e-005 104e_3 0 headdriver 0 0 enddynamic"
|
||||
},
|
||||
"duration": 240,
|
||||
"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": 0.5, "hold": 5 }
|
||||
]
|
||||
}
|
||||
17
tests/scenarios/cases/et22_td_timetable.json
Normal file
17
tests/scenarios/cases/et22_td_timetable.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"description": "ET22 on td.scn, AI driver on the td/rozklad timetable: starts from Stacja1, keeps to the speed limit, brakes to a stop at Przystanek.",
|
||||
"base_scenery": "td.scn",
|
||||
"time": "10:34",
|
||||
"fragment": "td_timetable.scn",
|
||||
"vars": {
|
||||
"consist": "node -1 0 {{vehicle}} dynamic pkp\\et22_v3 201E-1150 201E 0 headdriver 0 0 enddynamic"
|
||||
},
|
||||
"duration": 240,
|
||||
"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": 0.5, "hold": 5 }
|
||||
]
|
||||
}
|
||||
18
tests/scenarios/cases/eu07_td_red_signal.json
Normal file
18
tests/scenarios/cases/eu07_td_red_signal.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"description": "EU07 on td.scn with no route set: pulls off, stops before the exit signal stacja1_j at stop, and stays there.",
|
||||
"base_scenery": "td.scn",
|
||||
"time": "10:34",
|
||||
"fragment": "td_red_signal.scn",
|
||||
"vars": {
|
||||
"consist": "node -1 0 {{vehicle}} dynamic pkp\\4e_v1 4e-004 4e 0 headdriver 0 0 enddynamic"
|
||||
},
|
||||
"duration": 240,
|
||||
"timeout": 600,
|
||||
"checks": [
|
||||
{ "type": "starts", "min_speed": 5, "within": 150 },
|
||||
{ "type": "max_speed", "limit": 40 },
|
||||
{ "type": "stops", "moving_speed": 5, "stop_speed": 0.5, "hold": 5 },
|
||||
{ "type": "stays_stopped", "moving_speed": 5, "stop_speed": 0.5 },
|
||||
{ "type": "distance", "max": 150 }
|
||||
]
|
||||
}
|
||||
@@ -2,8 +2,10 @@
|
||||
"description": "EU07 on td.scn, AI driver on the td/rozklad timetable: starts from Stacja1, keeps to the speed limit, brakes to a stop at Przystanek.",
|
||||
"base_scenery": "td.scn",
|
||||
"time": "10:34",
|
||||
"fragment": "eu07_td_timetable.scn",
|
||||
"vehicle": "autotest_eu07",
|
||||
"fragment": "td_timetable.scn",
|
||||
"vars": {
|
||||
"consist": "node -1 0 {{vehicle}} dynamic pkp\\4e_v1 4e-004 4e 0 headdriver 0 0 enddynamic"
|
||||
},
|
||||
"duration": 240,
|
||||
"timeout": 600,
|
||||
"checks": [
|
||||
|
||||
17
tests/scenarios/cases/sm42_td_timetable.json
Normal file
17
tests/scenarios/cases/sm42_td_timetable.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"description": "SM42 diesel shunter on td.scn, AI driver on the td/rozklad timetable: starts from Stacja1, keeps to the speed limit, brakes to a stop at Przystanek.",
|
||||
"base_scenery": "td.scn",
|
||||
"time": "10:34",
|
||||
"fragment": "td_timetable.scn",
|
||||
"vars": {
|
||||
"consist": "node -1 0 {{vehicle}} dynamic pkp\\sm42_v1 6D-468 6D 0 headdriver 0 0 enddynamic"
|
||||
},
|
||||
"duration": 240,
|
||||
"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": 0.5, "hold": 5 }
|
||||
]
|
||||
}
|
||||
17
tests/scenarios/cases/sn61_td_timetable.json
Normal file
17
tests/scenarios/cases/sn61_td_timetable.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"description": "SN61 diesel railcar on td.scn, AI driver on the td/rozklad timetable: starts from Stacja1, keeps to the speed limit, brakes to a stop at Przystanek.",
|
||||
"base_scenery": "td.scn",
|
||||
"time": "10:34",
|
||||
"fragment": "td_timetable.scn",
|
||||
"vars": {
|
||||
"consist": "node -1 0 {{vehicle}} dynamic pkp\\sn61_v2 SN61-13 SN61_v1 0 headdriver 0 0 enddynamic"
|
||||
},
|
||||
"duration": 240,
|
||||
"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": 0.5, "hold": 5 }
|
||||
]
|
||||
}
|
||||
6
tests/scenarios/cases/td_red_signal.scn
Normal file
6
tests/scenarios/cases/td_red_signal.scn
Normal file
@@ -0,0 +1,6 @@
|
||||
// added by tests/scenarios/run.py to td.scn, whose own trainsets were removed.
|
||||
// same start as td_timetable.scn, but nobody sets the route: the exit signal stacja1_j,
|
||||
// about 150 m ahead of the train, stays at stop.
|
||||
trainset td/rozklad tdo_n1734 0.0 0.1
|
||||
{{consist}}
|
||||
endtrainset
|
||||
@@ -1,11 +1,12 @@
|
||||
// added by tests/scenarios/run.py to the base scenery, whose own trainsets were removed:
|
||||
// added by tests/scenarios/run.py to td.scn, whose own trainsets were removed:
|
||||
// the trainset goes after FirstInit, the launcher before it.
|
||||
// the EU07 stands where td.scn keeps its timetable train and gets the same timetable.
|
||||
// the case's consist stands where td.scn keeps its timetable train (track 1 of Stacja1)
|
||||
// and gets the same timetable: Stacja1 10:35 -> Przystanek -> Stacja2.
|
||||
trainset td/rozklad tdo_n1734 0.0 0.1
|
||||
node -1 0 autotest_eu07 dynamic pkp\4e_v1 4e-004 4e 0 headdriver 0 0 enddynamic
|
||||
{{consist}}
|
||||
endtrainset
|
||||
|
||||
// td.scn sets routes from the keyboard (shift+1..4 run events keyctrl01..04). keyctrl04 is the
|
||||
// way out of the track the train stands on: switch zwr02 and the exit signal stacja1_j at 40.
|
||||
// way out of track 1: switch zwr02 and the exit signal stacja1_j at 40.
|
||||
// a launcher with a positive time fires once at that hour (HHMM), radius -1 means anywhere.
|
||||
node -1 0 autotest_route eventlauncher 0 0 0 -1 none 1034 keyctrl04 end
|
||||
17
tests/scenarios/cases/vectron_td_timetable.json
Normal file
17
tests/scenarios/cases/vectron_td_timetable.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"description": "Vectron 1293-107 on td.scn, AI driver on the td/rozklad timetable: starts from Stacja1, keeps to the speed limit, brakes to a stop at Przystanek.",
|
||||
"base_scenery": "td.scn",
|
||||
"time": "10:34",
|
||||
"fragment": "td_timetable.scn",
|
||||
"vars": {
|
||||
"consist": "node -1 0 {{vehicle}} dynamic pkp\\vectron_v1 1293-107 wariant_7w 0 headdriver 0 0 enddynamic"
|
||||
},
|
||||
"duration": 240,
|
||||
"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": 0.5, "hold": 5 }
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user