Updating driver behavior parameters at the run time
All Foretellix Human Driver Model behavior parameters can be updated by calling the update_config function during runtime. You can find these parameters in the parameter tables of the specific behavior section in this documentation.
To update behavior parameters at the run time:
- Set a new
behavior_paramvalue. -
Call the
update_config.In the log file you can see, "“BEHAVIOR NAME” :update_config is called“.
The following example shows how to set a new distance_from_stop_line value:
extend sut.example:
# event to trigger update the distance_from_stop_line of the junction_behavior
# the change happens at time 1 second - so from this simulation time onwards the new parameter value will be active
on @top.clk if (top.time == 1s):
#define a new value for distance_from_stop_line
sut.car.ftx_driver.junction_behavior.distance_from_stop_line = 1.5m
#call to update_config function to update the config param of junction behavior
call sut.car.ftx_driver.junction_behavior.update_config()
Similarly, you can call update_config for other behaviors.