Adaptive assistance
The script tag accepts an additional “adaptive” parameter. If set to true, adaptive control is enabled. There is also an “adaptiveparams” tag, where the adaptive behavior can be configured. The string value of adaptive params is in the form (no space between key=value pairs!):
“key=value;key=value;”
for as many key/value pairs as needed- Valid keys (and values) to set the type of adaptive control are:
- adaptiveControl=[transmission|logging|combined|predefinedtransmission|predefinedlogging|none]
- Sets the adaptiveControl to be used. Valid values are:
- transmission : Adaptive control based on transmission check reaction time
- logging : Adaptive control based on Ni logging reaction time
- combined : Adaptive control based based on combined transmission and logging reaction times
- predefinedtransmission : Adaptive control based on predefined intervals for transmission reaction times
- predefinedlogging : Adaptive control based on predefined intervals for logging reaction times
- none : Disables adaptive control
Adaptive control based on stdev of baseline
The decision is made following this logic:
step 1. compute the stdev based on the user supplied baseline and the logged data step 2.
if (stdev > baseLine * 2.0) { INCREASE; } else if (stdev < baseLine / 2.0) { DECREASE; } else MAINTAIN;
Valid parameters (to be supplied as adaptiveParams or command) are:
* reactionBaseLineTransmission=[baseline in ms] * reactionBaseLineTransmissionDuringFault=[baseline in ms] * reactionBaseLineLogging=[baseline in ms] * reactionBaseLineLoggingDuringFault=[baseline in ms]
Adaptive control with predefined intervals
Valid parameters are:
- reactionTimeLoggingPredefinedIntervals=A,B,C,D,E
- reactionTimeTransmissionPredefinedIntervals=A,B,C,D,E
Adaptive control changes the level of assistance as follows:
- by more than (or equal to) A milliseconds and less than B milliseconds, then LOA1;
- by more than (or equal to) B milliseconds and less than C milliseconds, then LOA2;
- by more than (or equal to) C milliseconds and less than D milliseconds, then LOA3;
- by more than (or equal to) D milliseconds and less than E milliseconds, then LOA4;
- by more than (or equal to) E milliseconds, then LOA5.
Example:
adaptiveparams="adaptiveControl=transmission;"
To control the adaptive process during the simulation, the <adaptive/> command is used. The command accepts a “start” parameters (in seconds), to define when the command should be executed during the simulation. Several commands can be invoked at the same time, by separating them with “;”.
Valid commands are:
- key=value
- Sets adaptive control parameters. The same key,values as with “adaptiveparams” can be used.
- onPeriod [from] [to]
- Decides adaptive control based on measurements in the period from [from] milliseconds to [to] milliseconds into execution.
- onSamples [count]
- Decides adaptive control based on the last [count] samples
- onPast [period]
- Decides adaptive control based on the last [period] milliseconds
- log [transmission|logging] [value]
- Logs a fake value for either transmission or logging reaction time (useful for debugging)
Example:
<adaptive start="20" command="reactionBaseLineTransmissionDuringFault=10;reactionBaseLineTransmission=10;onPast 10000"/>
Limiting the jump of level
A variable can be set in adaptive commands:
adaptiveControlMaxChange
which defines the maximum number of steps the adaptive control can change. For example:
<adaptive start="0" command="adaptiveControlMaxChange=1"/>
limits the change to at most 1 level of automation (up or down) from 0 seconds into simulation. This means that the adaptive change cannot jump more than 1 level when deciding.