ThreatMemory
A ThreatMemory is required to avoid following situation during simulation:
- Cognition layer detects a Threat.
- In locomotion layer, a Pedestrian has no time credit to react to the Threat.
- 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: allThreats [Threat>]
---
Field: latestThreatUnhandled [boolean]
---