ChangeTargetScripted
Class signals agents to change their targets.
This stimulus allows to script
- when agents change their target to a new target.
- how much agents should change their target to a new target.
For instance, a stimulus description looks like this:
- allowedTimeDelta = 1.0
- changeRemainingPedestrians = true
- originalTargetIds = [1, 2]
- newTargetIds = [3, 4]
- simTimesToChangeTarget = [10.0, 20.0]
- totalAgentsToChangeTarget = [1, 2]
On the cognition layer, this leads to following actions:
- At sim time 10.0 second, for 1 agent with target id 1 or 2 change target id to 3.
- At sim time 20.0 second, for 2 agents with target id 1 or 2 change target id to 4.
- At each sim time from "simTimesToChangeTarget", change also the target of all remaining agents
(i.e., whose target id is not in list "originalTargetIds") if "changeRemainingPedestrians = true".
For instance, at sim time 10.0 second the target id of agent a1 changed from 1 to 3 and at
sim time 20.0 the target id is changed from 3 to 4 (since 3 is not in list [1, 2].
Note: "allowedTimeDelta" is necessary to make sure that stimulus is injected properly. For instance, if
"simTimeStepLength = 0.4" the simulated times are [0.0, 0.4, 0.8, 1.2, ...]. If "ChangeTargetScripted" should
be injected at "start = 1.0" and "end = 1.1" this would mean it could not be injected because the
"simTimeStepLength" is too coarse. Setting "allowedTimeDelta = 0.2" causes that the stimulus is
injected at "simTime = 1.2".
Field: allowedTimeDelta [double]
---
Field: originalTargetIds [Integer>]
---
Field: totalAgentsToChangeTarget [Integer>]
---
Field: simTimesToChangeTarget [Double>]
---
Field: changeRemainingPedestrians [boolean]
---
Field: newTargetIds [Integer>]
---