Such units can be stabled in pools, sidings or just in yards or platforms where they sit in between duties.
At present, all units stabled in this manner will always have power on, with all the related sounds which reflect this state.
I am now working on new commands which allow power to be switched off when units are stabled, and this also includes proper sound management for switching off power which at present does not exist. Note that power switching only applies to electric and diesel engines, steam trains are not affected.
To keep this post from getting far too long, I will split the information in three posts:
- General information (this post)
- Timetable commands for switching power
- Sound processing
General setup
Power switch off:
With specific timetable commands, it will be possible to switch off power (and sound) for units for the following situations :
- When created, either as actual train or as static (but not in pools, see below)
- When terminated, either with $forms, $trigger or $static (but not in pools, see below)
- When detached
- When attached, but only when $attach is defined in #dispose row, and only when the train to which is attached is not active.
The actual time that power is switched off will vary, and is random delayed between 30 to 60 seconds after the action which sets the power off command takes place.
Automatic Power switch on:
For units which have power switched off, power will be switched on automatically at the starttime as defined in the #start column.
When units are attached, and the train which attaches is not terminated as part of the attach action, and the train to which is attached has power off, all units will have the power switched on after attaching has taken place.
Forced Power switch on:
Power can be forced to be switched on before the defined start time, at a specific given time. It is also possible for an attach action that power for the static units to which a running train will be attached, to have the power switched on before the attach action, at a specific given time.
Power switching on is at the time as defined, there is no delay.
Pools:
A general pools command will be introduced as part of the pools definition which defines that power must be switched off for engines stabled in this pool. This setting will apply to all units in the pool, it is not possible to set commands for power switching for individual engines stored in a pool. When the option is set, a unit will switch off power when it is created in that pool, and also when it is stabled in the pool. Power will be switched on when an engine is requested from that pool.
Note that there are no commands linked with the $transfer command. This command is mainly used for non-powered units. Power state of any engines transferred between trains using the $transfer command will not be changed.
Player train
For the player train, power will never be switched on or off by the system. It is up to the player to decide if and when power will be switched on or off.
The state of the power of the player train at the start of a player session will depend on how the train is created.
If the player train is created using the $create command, or if it is formed out of an AI train using $forms, $trigger or $detach, the power state will depend on the power command set with the command through which the train is created. If that command defines that the power must be switched off, the player train will start with power switched off. If the player train is created in a pool, the power state will depend on the pools setting. In all other situations the player train will start with power switched on. Note that the setting of the general option in the menu "start player without power" no longer will affect player trains in timetable mode.
Program logic
This new function to switch power for AI trains required substantial program changes. The power logic simply was not set up to handle power switching for AI trains, in fact there were safeguards at multiple locations in the code to ensure power for AI trains was always switched on. Another problem was that calculations for power switching, in particular for diesel engines, is based on certain calculations and these calculations are such that these only work correct for limited delta values. During prerun, with low frequency update, these delta values were too large so special logic was required to handle power switching during prerun.
Progress
Presently I am testing the implemented changes, and first tests look very promising, with units properly switching on and off as required. Further tests are still needed, in particular for player train actions.
Outstanding issues
- Electric engines - pantographs: presently, power off for electric engines is linked with all panto's down. In real life, this is often not so, electric units are often stabled with power off but panto's up, in particular in between duties. I am looking into possible additional options to make this possible.
- Dead in tow. I am looking into possible additional commands to allow units with power switched off, to be attached to or by other trains, while power will remain switched off and the engines are taken along dead in tow.
Functions not implemented and not planned
Separate power switching for different MU sets in a single train is not implemented and will not be implemented as this is just too complicated.
As stated, testing is still taking place so it will be some time, probably two or three weeks, before this function will be pushed to the testing version.
Regards,
Rob Roeterdink