mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-27 21:45:16 +01:00
* fix(ai): read the motor parameters of ESMVelocity() within the table
TController::ESMVelocity() indexed MotorParam with the field shunting
step of the next master controller position. For a position with a
step of its own that index is RList[].ScndAct, the sixth column of the
RList rows of the .fiz, which readRList() takes as it is. A step of 11
or more read past the 11 entries of MotorParam.
The pole flux is now read through motor_param(), which keeps the index
inside the table, as MomentumF() in the same loop and Momentum() already
do. Nothing changes for a .fiz with valid steps.
The unit tests show the loader keeping an out-of-range ScndAct and
motor_param() clamping it; ESMVelocity() itself is in Driver.cpp, which
the unit tests don't build.
* test(scenarios): a Traxx, with a brake handle with a time chamber, starting up
None of the cases had a driver's brake handle with a time chamber
(MHZ_K5P, MHZ_6P, M394, Knorr, St113, FVel6, FVE408), for which the AI
getting the vehicle ready has a rule of its own for releasing the train
brake (5775493b2). Three cases run a Traxx (E186, MHZ_6P) on td.scn: the
timetable run from a trainset ready to depart, the same from a cold
start, and the locomotive standing ready to depart with nobody in it
until a driver is put in. In each the driver puts the handle to running
and leaves.
* test: read the EP09 definition into a json with '=', not braces
GCC takes nlohmann::ordered_json in braces for an initializer list and
makes an array holding the parsed object, so at("RList") threw on the
Linux build (type_error 304); MSVC kept the object.
32 lines
1.5 KiB
JSON
32 lines
1.5 KiB
JSON
{
|
|
"description": "As eu07_td_crew_add, with a Traxx (E186, p160dc) standing ready to depart (trainset velocity 0.1) with nobody in it: its brake handle, one with a time chamber (MHZ_6P), in the holding position and the brake pipe and the control reservoir at running pressure. The AI driver put in cab A 20 s after the start gets the locomotive ready, puts the handle to running and leaves through the exit signal.",
|
|
"base_scenery": "td.scn",
|
|
"time": "10:34",
|
|
"fragment": "td_crew.scn",
|
|
"vars": {
|
|
"trainsets": [
|
|
"trainset none tdo_n1734 0.0 0.1",
|
|
"node -1 0 {{vehicle}} dynamic pkp/e186_v2 146_226-6 p160dc 0 nobody 0 0 enddynamic",
|
|
"endtrainset"
|
|
],
|
|
"crew": [
|
|
"event autotest_crew_put putvalues 0 none 0 0 0 Crew:{{vehicle}} 1 0 endevent",
|
|
"event autotest_crew_on multiple 20 none autotest_crew_put autotest_crew_waits endevent",
|
|
"node -1 0 autotest_crew_on_launcher eventlauncher 0 0 0 -1 none 1034 autotest_crew_on end"
|
|
]
|
|
},
|
|
"track_events": {
|
|
"tdo_n1734": "event0 autotest_wake"
|
|
},
|
|
"duration": 300,
|
|
"timeout": 600,
|
|
"checks": [
|
|
{ "type": "log_contains", "pattern": "Crew: \\[autotest_traxx_td_crew_add\\] an AI driver takes cab A" },
|
|
{ "type": "driver_changes", "vehicle": "{{vehicle}}", "to": "ai", "after": 15, "before": 30 },
|
|
{ "type": "starts", "min_speed": 20, "within": 240 },
|
|
{ "type": "moves", "vehicle": "{{vehicle}}", "direction": "front", "min_speed": 20 },
|
|
{ "type": "log_lacks", "pattern": "derailed" },
|
|
{ "type": "log_lacks", "pattern": "collided" }
|
|
]
|
|
}
|