Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
vadere
vadere
Commits
556a1ba2
Commit
556a1ba2
authored
Jan 17, 2020
by
Benedikt Kleinmeier
Browse files
Added "state/psychology/cognition/GroupMembership.java"
parent
46c443a6
Pipeline
#203849
passed with stages
in 119 minutes and 35 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
VadereSimulator/src/org/vadere/simulator/control/psychology/cognition/ThreatCognitionModel.java
View file @
556a1ba2
...
...
@@ -47,11 +47,15 @@ public class ThreatCognitionModel implements ICognitionModel {
}
else
{
// TODO: Imitate behavior if recognizing an in-group member.
// Maybe, use also cooperative behavior from "CooperativeCognitionModel".
// TODO: A pedestrian needs boolean variable "isInGroup" or another enum
// "Member { IN_GROUP, OUT_GROUP, OUT_GROUP_FRIENDLY, OUT_GROUP_NEUTRAL_ OUT_GROUP_HOSTILE }"
// if (pedestrian.getPerceivedThreat() != null) => These peds perceived a threat!
// else checkIfSearchRadiusContainsAThreatedPed
pedestrian
.
setSelfCategory
(
SelfCategory
.
TARGET_ORIENTED
);
}
}
else
{
throw
new
IllegalArgumentException
(
"
Use
only \"Bang\" and \"ElapsedTime\" stimuli!"
);
throw
new
IllegalArgumentException
(
"
Can
only
process
\"Bang\" and \"ElapsedTime\" stimuli!"
);
}
}
}
...
...
VadereState/src/org/vadere/state/psychology/cognition/GroupMembership.java
0 → 100644
View file @
556a1ba2
package
org.vadere.state.psychology.cognition
;
/**
* According to the self-categorization theory ("reicher-2010"), people define
* themselves as member of social categories (see{@link SelfCategory}). When
* people share the same {@link SelfCategory}, they often act collectively
* if they feel as in-group member to this category.
*
* For instance, two protesters - which define themselves as in-group members
* of the category protesters - walk together during a demonstration.
*
* This enum shall capture this in- and out-group membership. The membership
* can be interpreted as a tree:
*
* <pre>
* Membership
* /\
* / \
* / \
* In Out
* / | \
* / | \
* / | \
* Friendly Neutral Hostile
* </pre>
*
* Following outcome may be observed when two people with a given membership
* come together:
* <ul>
* <li>IN_GROUP / IN_GROUP => imitate behavior</li>
* <li>IN_GROUP / OUT_GROUP_FRIENDLY => imitate behavior</li>
* <li>IN_GROUP / OUT_GROUP_NEUTRAL => ignore behavior of IN_GROUP member</li>
* <li>IN_GROUP / OUT_GROUP_HOSTILE => react hostile to IN_GROUP member</li>
* </ul>
*
* Note: The value "OUT_GROUP" exists for convenience if you do not like to handle
* the subcategories FRIENDLY, NEUTRAL and HOSTILE. "OUT_GROUP" should be handled
* like "OUT_GROUP_NEUTRAL". I.e., IN_GROUP / OUT_GROUP => ignore behavior of
* IN_GROUP member.
*/
public
enum
GroupMembership
{
IN_GROUP
,
OUT_GROUP
,
OUT_GROUP_FRIENDLY
,
OUT_GROUP_NEUTRAL
,
OUT_GROUP_HOSTILE
}
VadereState/src/org/vadere/state/psychology/cognition/SelfCategory.java
View file @
556a1ba2
...
...
@@ -4,9 +4,9 @@ package org.vadere.state.psychology.cognition;
* According to the self-categorization theory ("reicher-2010"), people define
* themselves as member of a social category. Often, people act collectively
* when being in the same category. E.g., protesters - which define themselves
* as protesers - walk together during a demonstration.
* as protes
t
ers - walk together during a demonstration.
*
* Our agents can use these categorizations to
to
derive a specific behavior.
* Our agents can use these categorizations to derive a specific behavior.
* E.g., if an agents is "COOPERATIVE", the pedestrian swaps places
* with other "COOPERATIVE" pedestrians.
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment