18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-21 12:05:01 +01:00

feat(ai): suggested pantograph setup for shunting in the .fiz (eu07/maszyna#461)

A new optional key in the AI section of the .fiz, ShuntPantstate= (bits as in
Pantstate: 1 front, 2 rear, 3 both), sets the pantographs the AI driver keeps
up while its order is Shunt or Loose_shunt, moving and standing alike: it
raises those of the setup and lowers the others once one of the setup
collects the voltage, and doesn't raise more when idling. Lowering on the
track's demand still comes first. Without the key (default 0) nothing
changes, so an ET41 no longer has to shunt on all four pantographs once its
.fiz says so.

SVN data, optional: add "AI: ShuntPantstate=<1|2|3>" to the .fiz of vehicles
that should shunt on fewer pantographs, e.g. dynamic/pkp/et41_v2/203e-a.fiz,
203e-b.fiz and their _dsa150 variants (no AI line there yet). Without it the
vehicles behave as before.

(eu07/maszyna#461)
This commit is contained in:
jerrrrycho
2026-11-07 21:32:41 +01:00
parent 939e42b611
commit 8f51ea9a19
5 changed files with 79 additions and 1 deletions

View File

@@ -2300,6 +2300,9 @@ class TMoverParameters
plc::basic_controller m_plc;
int AIHintPantstate{0}; // suggested pantograph setup
// suggested pantograph setup in shunting (AI: ShuntPantstate=, eu07/maszyna#461), the bits as in Pantstate: 1 front,
// 2 rear, 3 both; 0 (the default) shunts with the pantographs handled as in train mode
int AIHintShuntPantstate{0};
bool AIHintPantUpIfIdle{true}; // whether raise both pantographs if idling for a while
double AIHintLocalBrakeAccFactor{1.05}; // suggested acceleration weight for local brake operation

View File

@@ -11474,6 +11474,7 @@ void TMoverParameters::LoadFIZ_AI(std::string const &Input)
{
extract_value(AIHintPantstate, "Pantstate", Input, "");
extract_value(AIHintShuntPantstate, "ShuntPantstate", Input, "");
extract_value(AIHintPantUpIfIdle, "IdlePantUp", Input, "");
extract_value(AIHintLocalBrakeAccFactor, "LocalBrakeAccFactor", Input, "");
}