Skip to content

[GUI] display information state of an agent

Mayr, Christina Maria requested to merge gui_information into master

Visualize information state of an agent in the GUI (Online-Visualization + Post-Vis.)

Agents can receive different types of information, e.g.

  • In the default setting, we assume agents have global knowledge about the location to target (NO_INFORMATION).
  • If the psychology layer is used, the information is set up as a stimulus.
  • If the crowd is managed e.g. over TraCI, information can be passed as directly to an agent or as stimuli.
  • If the reaction behavior is modeled, it is also possible that agents refuse to react to information (INFORMATION_UNCONVINCING_RECEIVED).

For that purpose, I have added the enum InformationState.class

public enum InformationState {
    NO_INFORMATION,
    INFORMATION_STIMULUS,
    INFORMATION_RECEIVED,
    INFORMATION_CONVINCING_RECEIVED,
    INFORMATION_UNCONVINCING_RECEIVED,
}

The default value is NO_INFORMATION.

What is new?

The user can pick a new option for agent coloring 'Coloring by Information State', see following image:

new_setting_options

New feature: Visualize CHANGE_TARGET and WAIT behavior

Currently, the two stimuli ChangeTarget and Wait are not being visualized in the post-visualization.

The reason is that these two stimuli happen in between two footsteps. Therefore, the stimuli are not written out by the respective dataprocessors

  • FootStepMostImportantStimulusProcessor
  • FootStepPsychologyStatusProcessor -> its output file is used in the postvis!
  • FootStepSelfCategoryProcessor

Example output file FootStepPsychologyStatusProcessor

In the output file cannot see the WAIT stimuli that starts at t=0.0s and lasts until t=10.0s.

pedestrianId simTime endTime-PID1 startX-PID1 startY-PID1 endX-PID1 endY-PID1 targetId-PID2 mostImportantStimulus-PID3 selfCategory-PID3 groupMembership-PID3 informationState-PID3
1 0.4 0.9707501015618938 1.196 10.696 1.3303046975095987 9.934320210724556 1 **ElapsedTime** **TARGET_ORIENTED** OUT_GROUP NO_INFORMATION 
2 0.4 1.1001829000111136 1.588 10.696 1.9348998058565199 10.095151911120729 1 **ElapsedTime** **TARGET_ORIENTED** OUT_GROUP NO_INFORMATION
...
1 10.343253453453453 1.5415002031237877 1.3303046975095987 9.934320210724556 1.7170196613925053 9.264510245232199 1 **ElapsedTime** **TARGET_ORIENTED** OUT_GROUP NO_INFORMATION
...

I propose, that in case of stimuli that are active in between footsteps (CHANGE_TARGET and WAIT), the stimuli should be mapped to the last available time step.

In this case, the output file looks like:

pedestrianId simTime endTime-PID1 startX-PID1 startY-PID1 endX-PID1 endY-PID1 targetId-PID2 mostImportantStimulus-PID3 selfCategory-PID3 groupMembership-PID3 informationState-PID3
1 0.4 0.9707501015618938 1.196 10.696 1.3303046975095987 9.934320210724556 1 **Wait** **WAIT** OUT_GROUP NO_INFORMATION 
2 0.4 1.1001829000111136 1.588 10.696 1.9348998058565199 10.095151911120729 1 **Wait** **WAIT** OUT_GROUP NO_INFORMATION
...
1 10.343253453453453 1.5415002031237877 1.3303046975095987 9.934320210724556 1.7170196613925053 9.264510245232199 1 **ElapsedTime** **TARGET_ORIENTED** OUT_GROUP NO_INFORMATION
...

Merge request reports