Commit de76d101 authored by Benedikt Kleinmeier's avatar Benedikt Kleinmeier

In "PostvisualizationModel", visualize content of "mostImportantStimulusCol"...

In "PostvisualizationModel", visualize content of "mostImportantStimulusCol" and "socialCategoryCol"
parent b179d74a
......@@ -7,6 +7,9 @@ import org.vadere.gui.postvisualization.utils.PotentialFieldContainer;
import org.vadere.simulator.projects.Scenario;
import org.vadere.state.attributes.AttributesSimulation;
import org.vadere.state.attributes.scenario.AttributesAgent;
import org.vadere.state.psychology.cognition.SocialCategory;
import org.vadere.state.psychology.perception.types.Stimulus;
import org.vadere.state.psychology.perception.types.StimulusFactory;
import org.vadere.state.scenario.Agent;
import org.vadere.state.scenario.Pedestrian;
import org.vadere.state.scenario.ScenarioElement;
......@@ -224,6 +227,16 @@ public class PostvisualizationModel extends SimulationModel<PostvisualizationCon
pedestrian.getGroupSizes().addLast(row.getInt(trajectories.groupSizeCol));
}
if(trajectories.mostImportantStimulusCol != -1) {
String mostImportantStimulusString = row.getString(trajectories.mostImportantStimulusCol);
pedestrian.setMostImportantStimulus(StimulusFactory.stringToStimulus(mostImportantStimulusString));
}
if(trajectories.socialCategoryCol != -1) {
String socialCategoryString = row.getString(trajectories.socialCategoryCol);
pedestrian.setSocialCategory(SocialCategory.valueOf(socialCategoryString));
}
return pedestrian;
}
......
......@@ -54,8 +54,8 @@ public class TableTrajectoryFootStep {
public final int groupIdCol;
public final int groupSizeCol;
private final int mostImportantStimulusCol;
private final int socialCategoryCol;
public final int mostImportantStimulusCol;
public final int socialCategoryCol;
public static final int agentDFPedIdCol = 0;
public static final int birthTimeCol = 1;
......@@ -84,8 +84,8 @@ public class TableTrajectoryFootStep {
targetIdCol = columnNames.getTargetIdCol(dataFrame);
groupIdCol = columnNames.getGroupIdCol(dataFrame);
groupSizeCol = columnNames.getGroupSizeCol(dataFrame);
mostImportantStimulusCol = columnNames.getMostImportantEventCol(dataFrame);
socialCategoryCol = columnNames.getSalientBehaviorCol(dataFrame);
mostImportantStimulusCol = columnNames.getMostImportantStimulusCol(dataFrame);
socialCategoryCol = columnNames.getSocialCategoryCol(dataFrame);
this.trajectoryDataFrame = dataFrame;
......
......@@ -84,11 +84,11 @@ public final class ColumnNames {
keys.add(endTimeKeys);
}
public int getSalientBehaviorCol(@NotNull final Table dataFrame) {
public int getSocialCategoryCol(@NotNull final Table dataFrame) {
return getColId(dataFrame, socialCategoryKeys);
}
public int getMostImportantEventCol(@NotNull final Table dataFrame) {
public int getMostImportantStimulusCol(@NotNull final Table dataFrame) {
return getColId(dataFrame, mostImportantStimulusKeys);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment