ThreatMemory

A ThreatMemory is required to avoid following situation during simulation:

  1. Cognition layer detects a Threat.
  2. In locomotion layer, a Pedestrian has no time credit to react to the Threat.
  3. In next simulation loop, the Threat is already gone. I.e., the Threat from previous simulation loop would be lost.
Therefore, provide a ThreatMemory with a boolean flag included which indicates if latest Threat was already handled by the locomotion layer. Note: Maybe, this memory could also be implemented as a stack. I.e., cognition layer pushes Threats to the stack while the locomotion layer pops off the Threats. But, this is ot a real "memory"!


Field: latestThreatUnhandled [boolean]

---


Field: allThreats [Threat>]

---