crowdmodel.agents
Class CrowdAgent

java.lang.Object
  extended by crowdmodel.CObject
      extended by crowdmodel.agents.CrowdAgent

public class CrowdAgent
extends CObject

Base class for a crowd agent (individual) An agent in this simulation refers to an computational individual in a crowd. An agent consists out of physiological properties and a memory.

Author:
Nanda Wijermans

Field Summary
private  repast.simphony.context.Context<CrowdAgent> d_agent_context
           
private  int d_agentID
           
private  boolean d_cannotMove
           
 int d_dance
           
 double d_danceUtil
           
private  double d_density
           
 int d_densityCondition
           
 double d_distNearestAgent
           
private  boolean d_dummy
           
private  int d_dummyColor
           
 boolean d_groupA
           
private  double d_heading
           
private  double d_internalTime
           
private  boolean d_leader
           
 int d_leadershipCondition
           
private  int d_leaderType
           
 Memory d_memory
           
 java.lang.String d_myBehaviour
           
private  repast.simphony.space.continuous.NdPoint d_mypos
           
private  java.util.Vector<CrowdAgent> d_nearbyAgents
           
 CrowdAgent d_nearestAgent
           
private  int d_numDancingLeaders
           
private  int d_numOthers
           
private  int d_numRunningLeaders
           
private  int d_numVisibleLeaders
           
private  int d_numVisibleOthers
           
private  int d_numWalkingLeaders
           
private  double d_occupation_diameter
           
 Physiology d_physiology
           
private  java.lang.String d_POI
           
private  java.util.Vector<CrowdAgent> d_prevAgentsInSight
           
private  double d_prevIdSatis
           
private  java.util.Vector<CrowdAgent> d_prevNearbyAgents
           
private  repast.simphony.space.continuous.NdPoint d_prevPos
           
private  double d_prevSafeSatis
           
private  double d_prevSocSatis
           
private  double d_prevSubsSatis
           
 int d_run
           
 double d_runUtil
           
 int d_safetyCondition
           
 int d_sameAsLeader
           
private  boolean d_satisfied
           
private  double d_visibleArea
           
private  java.util.Vector<CrowdAgent> d_visibleOthers
           
 int d_walk
           
 double d_walkUtil
           
 repast.simphony.space.continuous.NdPoint heading2point
           
 
Fields inherited from class crowdmodel.CObject
d_id, d_world_context
 
Constructor Summary
CrowdAgent(int agentID, repast.simphony.context.Context<CObject> worldContext, repast.simphony.context.Context<CrowdAgent> agentContext)
          This constructor creates and initialises an agent
 
Method Summary
 double calcUtil(BehaviourRule b)
          Calculates a value (utility value) to compare two behaviours with each other.
 void checkRange(Goal goal)
          Function that checks and when necessary corrects the range of the satisfaction value of a goal to stay between [0,1]
 double clusterIndex()
          Function indicates the relative crowdedness around an agent.
 BehaviourRule compare(BehaviourRule b)
          Compares the current behaviour ready for execution with the next behaviour.
 void decreaseInternalTime(double val)
           
 double getActivationBruleDance()
          Returns the current activation of the memory element: dance (behaviour rule)
 double getActivationBruleRun()
          Returns the current activation of the memory element: run (behaviour rule)
 double getActivationBruleWalk()
          Returns the current activation of the memory element: walk (behaviour rule)
 int getAgentID()
          Returns the ID of an agent
 double getAgentMove2x()
           
 double getAgentMove2y()
           
 java.lang.String getAgentPOI()
          Returns the name of the point of interest an agent is heading towards??
 double getArousalLevel()
           
 double getBladderLevel()
           
 boolean getCannotMove()
          Returns whether an agent is inhibited in its current movement or not
 int getCntVisibleLeaders()
           
 double getDanceExp()
           
 double getDanceUtil()
           
 double getDensity()
           
 int getDensityCondition()
          the experiment condition of the density 1 : low (1) 2 : medium (3) 3 : high (5.5)
 double getDistNearestAgent()
           
 int getDomGoal()
          Returns the dominant goal in a integer notation identity (0); social (1); safety (2); subsistence (3)
 java.lang.String getDomGoalString()
          Returns the dominant goal
 java.lang.String getDomPhysio()
          Returns the dominant influence given (subsistence-related) physiology
 int getDummyColor()
           
 boolean getGroupMembership()
          Function returns whether an agent is member of a group At this point specifically to belong to group (A) or not
 double getHeading()
          Returns the heading of the current CrowdAgent
 double getIDdominance()
          Returns the current goal dominance of the identity goal
 double getIDlevel()
          Returns the current level of satisfaction of the identity goal
 int getIDNearestAgent()
           
 double getIDpref()
          Satisfaction preference of the Identity goal for this agent (heterogeneous & static attribute of the agent)
 void getInfo()
          Retrieves the information from the external world based on the constraints upon perception.
 int getIsDancing()
           
 int getIsRunning()
           
 int getIsWalking()
           
 boolean getLeadership()
          Returns whether this agent is a leader or not note: this is a perception an agent of itself being a leader or not At this point in my simulation this also means that others view this agent as a leader, however this is setup as a perception of those others too.
 int getLeadershipCondition()
          the experiment condition of the number of leaders 1 : zero leaders (0) 2 : low amount of leaders (25) 1:28 3 : medium amount of leaders (50) 1:14 4: high amount of leaders (100) 1:7
 java.lang.String getLeadershipType()
          Returns the type of leader an agent is.
 repast.simphony.space.continuous.NdPoint getMyPos()
           
 double getMyPosx()
           
 double getMyPosy()
           
 java.util.Vector<CrowdAgent> getNearbyAgents()
           
 CrowdAgent getNearestAgent()
           
 int getNumDancingLeaders()
           
 int getNumRunningLeaders()
           
 int getNumVisibleOthers()
           
 int getNumWalkingLeaders()
           
 java.lang.String getObservableB()
          Returns the behaviour of that this agent is currently showing.
 int getObservableBNum()
          Returns the behaviour an individual is showing in a numerical value 1 = walk 2 = run 3 = dance 4 = inhibited no behaviour - system.out.errrrr!
 double getOccupationDiameter()
          Returns the diameter of the area an individual occupies.
 double getPerceivedDensity()
          Returns the local density perceived by this individual
 int getPerceivedOthers()
           
 java.util.Vector getPrevAgentsInsight()
           
 double getPrevIdSatis()
           
 java.util.Vector getPrevNearbyAgents()
           
 repast.simphony.space.continuous.NdPoint getPrevPos()
           
 double getPrevSafeSatis()
           
 double getPrevSocSatis()
           
 double getPrevSubsSatis()
           
 repast.simphony.space.continuous.NdPoint getRandomLocation()
           
 double getRunExp()
           
 double getRunUtil()
           
 double getSafeDominance()
          Returns the current goal dominance of the safety goal
 double getSafelevel()
          Returns the current level of satisfaction of the safety goal
 double getSafepref()
          Satisfaction preference of the Safety goal for this agent (heterogeneous & static attribute of the agent)
 int getSafetyCondition()
          the experiment condition of the safety preference 1 : low safety preference 2 : control condition, medium safety pref 3 : high safety preference
 int getSameBasLeader()
           
 boolean getSatisfied()
          Returns the whether an agent is satisfied meaning whether all its goals are currently fullfilled or not
 double getSocDominance()
          Returns the current goal dominance of the social goal
 double getSocialpref()
          Satisfaction preference of the Social goal for this agent (heterogeneous & static attribute of the agent)
 double getSoclevel()
          Returns the current level of satisfaction of the social goal
 double getStomachLevel()
           
 double getSubsDominance()
          Returns the current goal dominance of the subsistence goal
 double getSubslevel()
          Returns the current level of satisfaction of the subsistence goal
 double getSubspref()
          satisfaction preference of the Subsistence goal for this agent (heterogeneous & static attribute of the agent)
 int getSurroundedness()
          returns the number of people surrounding this individual within 1 simulation unit (=0.4 meters)
 java.util.Vector<CrowdAgent> getVisibleOthers()
           
 double getWalkExp()
           
 double getWalkUtil()
           
 boolean ingroup(CrowdAgent otherAgent)
          Function that checks whether another agent is part of the same group as this agent.
 void init(int exp_dens, int exp_safe, int exp_leader)
          Initialisation function of the agents
 void initPos(repast.simphony.space.graph.Network socNetwork)
          Initially agents are placed randomly in the world.
 boolean isDummy()
           
 boolean isLeader()
           
private  void leaveQueue()
          Makes sure agents don't stand on or in front of the bar or toilet after they are completely satisfied
 void ooBehave()
          A behaviour is chosen and executed.
 void perceive()
          In this model perception is 'hard-coded', this means that no intelligent algorithm is behind perception.
 void primeMemory()
          When an agents observes the world around it, information enters the cognitive system that directly affect the agent in terms of activation or dominance.
 void resetCounters()
          Resets the counters
private  void resetInternalTime()
          Function that sets the internal time an agent has to select a behaviour This is based upon the arousal level of an individual.
 void setCannotMove(boolean b)
          Indicates whether the agent in inhibited by it's physical surroundings in moving
private  void setDistNearestAgent(double dichtstebije)
           
 void setHeading(double heading)
          Sets the heading of the current CrowdAgent
 void setLeadership()
          Sets an agent to be a leader
 void setLeadership(int leaderType)
          Sets an agent to be a leader and the the type of influence the agent will steer to this can be: peaceful or warful/toward aggression mind that this is the perception of the agent itself as being a leader.
 void setMyLeaders(java.util.HashSet<CrowdAgent> leaders)
          Sets the agent with the persons it perceives as a leader
 void setNearestAgent(CrowdAgent nearest)
           
 void setObservableB(java.lang.String name)
          Sets a variable with the explicit behaviour performed by this agent It checkes whether the behaviour that was intended to executed has really been executed, otherwise it says that is was obstructed while trying.
 void setOccupationDiameter(double d_occupation_diameter)
          Sets the area an individual occupies.
 void setSatisfied(boolean bool)
          Indicates whether an agent is satisfied.
 void setToDummy(int color)
          Sets this agent to be a dummy.
 void updateFacts()
          Facts are updated according to the current situation.
 void updateGoals()
          The update of the goals describe the effect the current situation has (external and internal state/perception) has on the satisfaction of the goals an individual has.
 void updatePhysiology()
          Describes the effect every time step upon physiology.
 void updateTestVars()
          The step function defines what an agent does every simulation step/tick.
 
Methods inherited from class crowdmodel.CObject
CObject, delete, getID, step
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

d_agentID

private final int d_agentID

d_agent_context

private final repast.simphony.context.Context<CrowdAgent> d_agent_context

d_memory

public final Memory d_memory

d_physiology

public final Physiology d_physiology

d_internalTime

private double d_internalTime

d_visibleArea

private final double d_visibleArea

d_mypos

private repast.simphony.space.continuous.NdPoint d_mypos

d_heading

private double d_heading

d_occupation_diameter

private double d_occupation_diameter

d_leader

private boolean d_leader

d_leaderType

private int d_leaderType

d_groupA

public boolean d_groupA

d_cannotMove

private boolean d_cannotMove

d_satisfied

private boolean d_satisfied

d_numVisibleOthers

private int d_numVisibleOthers

d_visibleOthers

private java.util.Vector<CrowdAgent> d_visibleOthers

d_numOthers

private int d_numOthers

d_nearbyAgents

private java.util.Vector<CrowdAgent> d_nearbyAgents

d_density

private double d_density

d_numVisibleLeaders

private int d_numVisibleLeaders

d_POI

private java.lang.String d_POI

d_myBehaviour

public java.lang.String d_myBehaviour

d_walk

public int d_walk

d_run

public int d_run

d_dance

public int d_dance

d_sameAsLeader

public int d_sameAsLeader

d_walkUtil

public double d_walkUtil

d_runUtil

public double d_runUtil

d_danceUtil

public double d_danceUtil

d_dummy

private boolean d_dummy

d_dummyColor

private int d_dummyColor

d_prevIdSatis

private double d_prevIdSatis

d_prevSocSatis

private double d_prevSocSatis

d_prevSafeSatis

private double d_prevSafeSatis

d_prevSubsSatis

private double d_prevSubsSatis

d_prevPos

private repast.simphony.space.continuous.NdPoint d_prevPos

d_prevNearbyAgents

private java.util.Vector<CrowdAgent> d_prevNearbyAgents

d_prevAgentsInSight

private java.util.Vector<CrowdAgent> d_prevAgentsInSight

d_distNearestAgent

public double d_distNearestAgent

d_nearestAgent

public CrowdAgent d_nearestAgent

heading2point

public repast.simphony.space.continuous.NdPoint heading2point

d_densityCondition

public int d_densityCondition

d_safetyCondition

public int d_safetyCondition

d_leadershipCondition

public int d_leadershipCondition

d_numWalkingLeaders

private int d_numWalkingLeaders

d_numRunningLeaders

private int d_numRunningLeaders

d_numDancingLeaders

private int d_numDancingLeaders
Constructor Detail

CrowdAgent

public CrowdAgent(int agentID,
                  repast.simphony.context.Context<CObject> worldContext,
                  repast.simphony.context.Context<CrowdAgent> agentContext)
This constructor creates and initialises an agent

Method Detail

init

public void init(int exp_dens,
                 int exp_safe,
                 int exp_leader)
Initialisation function of the agents. - Sets within the memory to which agent it belongs. - Dito for the memory elements. So every memoryElement needs to know to what memory it belongs and what agent. (This because the memory is a context on it's own and not part of the overall context as it is only accessible for and owned by an agent.) - Sets the social scenario (tells the agents who their friends are by adding PersonFacts to memory) - Sets the initial position if the current (random) position is not on walkable terrain and not in the vicinity of friends


initPos

public void initPos(repast.simphony.space.graph.Network socNetwork)
Initially agents are placed randomly in the world. However based on the scenario some positions are non-walkable areas so those agents are relocated.
Furthermore, agents that belong to a group, are placed in each others vicinity as this group representation indicates the persons who the agent joined to come to this event.


updateTestVars

public void updateTestVars()
The step function defines what an agent does every simulation step/tick. Here the main processes are called: perception and behaving. This function needs to be called first by the scheduler, that is why priority has a high number. This is relative to the other functions that are assigned to the scheduler, which are currently Cluster.updateClusters() and Tests..testIt()


perceive

public void perceive()
In this model perception is 'hard-coded', this means that no intelligent algorithm is behind perception. Instead we use the knowledge at hand to define what is observed and how this effects an individual. The internal world can be affected in different ways. Perception is used in the broad sense of the word meaning that everything that can be sensed, including internal updates based on metabolism changes.


ooBehave

public void ooBehave()
A behaviour is chosen and executed. The behaviour selection is based on the current internal settings: dominance of goals, activation of the behaviours Behaviour is executed = the effects it has in the real world are registered need to check here how one deals with multiple effect on the same object in the real world. necessary to notice this and let the changes override each other ruled by the order of the agent in which they behave Behaviour selection is depending on time. The time an individual has to choose a behaviour is implemented as a direct link between the arousal level and internal time to choose and compare behaviours with each other. This gives rise to automatic/heuristic vs. reasoned action in a continuous range. The general procedure of behaviour selection is as follows:
0) set time (done by resetInternalTime())
1) set current B (behaviour with the highest activation (and if considered the one that has the highest satisfaction of current goal dominance)
2) while (time > 0 ) { compare B with the next (= activation based) behaviour)
update B accordingly (B will be the one with the highest utility (= highest satisfaction of goals in the current tick)}
3) execute B The steps that cost time are: - retrieving the next behaviour (getNextActive()): time costs = a constant value = Constants.BRULE_RETRIEVE_TIME
- retrieving a fact from memory to calculate the utility (compare()): time costs = activation-based function (bfact.retrievalTime())


leaveQueue

private void leaveQueue()
Makes sure agents don't stand on or in front of the bar or toilet after they are completely satisfied


setDistNearestAgent

private void setDistNearestAgent(double dichtstebije)

setNearestAgent

public void setNearestAgent(CrowdAgent nearest)

resetCounters

public void resetCounters()
Resets the counters


getInfo

public void getInfo()
Retrieves the information from the external world based on the constraints upon perception. This guarantees local and restricted perception. Plus it already sets the variables for the functions used later in perception.


primeMemory

public void primeMemory()
When an agents observes the world around it, information enters the cognitive system that directly affect the agent in terms of activation or dominance. Here we limit ourselves to what can be perceived with our eyes (however in future the role of audible, tactile, nasal perception should be incorporated) In this model when an agent observes objects and actions in the world they are primed, meaning their activation in memory is increased. This is important as we assume that those elements that are dominant (i.e. active) in the cognitive system plays a role in the behaviour an individual will show. Meaning that, something can be relevant but inactive and therefore not a behavioural option. TODO: een sprekend voorbeeld geven + referentie naar thesis


updatePhysiology

public void updatePhysiology()
Describes the effect every time step upon physiology. Meaning the role of perception on physiology, but also the internal updates as metabolism changes the internal settings. We incorporated the following effects:


updateGoals

public void updateGoals()
The update of the goals describe the effect the current situation has (external and internal state/perception) has on the satisfaction of the goals an individual has. This is based on the scenario chosen, for our festival setting we chose to following links between perception and satisfaction of goals: In future we also want to update the expectation (facts about behaviours) based on the person who is performing a behaviour. As follows:


checkRange

public void checkRange(Goal goal)
Function that checks and when necessary corrects the range of the satisfaction value of a goal to stay between [0,1]

Parameters:
goal -

updateFacts

public void updateFacts()
Facts are updated according to the current situation. This can be regarded as the effect of experience or learning in a very simple form. Currently this only involves the differentation between the individuals one perceives. The behaviour shown by a leader will effect the expectation of this behaviour of satisfying the social goal. 1) the expectation of the social goal of the specific behaviour is set to 0.4 2) this value will decrease in 5 time steps to the initial value of that behaviour expectation


compare

public BehaviourRule compare(BehaviourRule b)
Compares the current behaviour ready for execution with the next behaviour. In which the next behaviour is based on the current hierarchy among behaviours in terms of activationLevel.

Parameters:
b -
Returns:
the best behaviour b or b1

calcUtil

public double calcUtil(BehaviourRule b)
Calculates a value (utility value) to compare two behaviours with each other. This utility function is based on the expectancy an individual has performing a behaviour in fulfilling a specific goal.
This is a function that can be 'played' with. What makes a certain behaviour more valuable compared to others. Or under what circumstances does the valuation change etc. Here theories can differ and thus this is the place to let them have effect.

Parameters:
b -
Returns:

ingroup

public boolean ingroup(CrowdAgent otherAgent)
Function that checks whether another agent is part of the same group as this agent. (ingroup buddy check)

Parameters:
otherAgent -
Returns:
being part of the same group

resetInternalTime

private void resetInternalTime()
Function that sets the internal time an agent has to select a behaviour This is based upon the arousal level of an individual. High arousal implies less time to choose a behaviour, and vise versa

We let time be a factor that has a range of [0,10] Where arousal is ranging between [0,1], this only differs a factor 10, This functionr returns the time by retrieving the arousal level and return this times 10.


decreaseInternalTime

public void decreaseInternalTime(double val)

getRandomLocation

public repast.simphony.space.continuous.NdPoint getRandomLocation()

getAgentID

public int getAgentID()
Returns the ID of an agent

Returns:
the id of the agent

getAgentPOI

public java.lang.String getAgentPOI()
Returns the name of the point of interest an agent is heading towards?? TODO CHECK of ik dit uberhaupt wel gebruik!!

Returns:

setHeading

public void setHeading(double heading)
Sets the heading of the current CrowdAgent


getHeading

public double getHeading()
Returns the heading of the current CrowdAgent


getDomGoal

public int getDomGoal()
Returns the dominant goal in a integer notation identity (0); social (1); safety (2); subsistence (3)

Returns:
integer

getDomGoalString

public java.lang.String getDomGoalString()
Returns the dominant goal

Returns:
name of the dominant goal (String)

getIDdominance

public double getIDdominance()
Returns the current goal dominance of the identity goal

Returns:
double - identity goal dominance

getNumWalkingLeaders

public int getNumWalkingLeaders()
Returns:
the d_numWalkingLeaders

getNumRunningLeaders

public int getNumRunningLeaders()
Returns:
the d_numRunningLeaders

getNumDancingLeaders

public int getNumDancingLeaders()
Returns:
the d_numDancingLeaders

getSocDominance

public double getSocDominance()
Returns the current goal dominance of the social goal

Returns:
double - social goal dominance

getSafeDominance

public double getSafeDominance()
Returns the current goal dominance of the safety goal

Returns:
double - safety goal dominance

getSubsDominance

public double getSubsDominance()
Returns the current goal dominance of the subsistence goal

Returns:
double - subsistence goal dominance

getIDlevel

public double getIDlevel()
Returns the current level of satisfaction of the identity goal

Returns:
double

getSoclevel

public double getSoclevel()
Returns the current level of satisfaction of the social goal

Returns:
double

getSafelevel

public double getSafelevel()
Returns the current level of satisfaction of the safety goal

Returns:
double

getSubslevel

public double getSubslevel()
Returns the current level of satisfaction of the subsistence goal

Returns:
double

setLeadership

public void setLeadership(int leaderType)
Sets an agent to be a leader and the the type of influence the agent will steer to this can be: peaceful or warful/toward aggression mind that this is the perception of the agent itself as being a leader. These are current options, however this is a point for further development. This can be done in many ways: - manipulate the positions/spreading of leader(s) given an area of people - A leader can steer in many different ways and this can also change during time. - Perception of other agents effect whether the influence of this agent will play a role, even further it can change the way an agent perceives itself as being a leader. - etc.

Parameters:
leaderType -

setLeadership

public void setLeadership()
Sets an agent to be a leader


getLeadership

public boolean getLeadership()
Returns whether this agent is a leader or not note: this is a perception an agent of itself being a leader or not At this point in my simulation this also means that others view this agent as a leader, however this is setup as a perception of those others too. This is a starting point and made easy for further development.

Returns:
d_leader - a boolean value

getLeadershipType

public java.lang.String getLeadershipType()
Returns the type of leader an agent is. An leader can direct peaceful or warful (aggressive/violent)

Returns:
d_leaderType - an integer indicating 0 (neutral), 1 (peaceful), 2 (warful/aggressive)

getGroupMembership

public boolean getGroupMembership()
Function returns whether an agent is member of a group At this point specifically to belong to group (A) or not

Returns:
d_groupA

getMyPos

public repast.simphony.space.continuous.NdPoint getMyPos()
Returns:
current position of the agent in continuous space

getSurroundedness

public int getSurroundedness()
returns the number of people surrounding this individual within 1 simulation unit (=0.4 meters)


getPerceivedOthers

public int getPerceivedOthers()
Returns:
number of agents that are observed at this time

setCannotMove

public void setCannotMove(boolean b)
Indicates whether the agent in inhibited by it's physical surroundings in moving

Parameters:
b -

getCannotMove

public boolean getCannotMove()
Returns whether an agent is inhibited in its current movement or not

Returns:
ability to move

setObservableB

public void setObservableB(java.lang.String name)
Sets a variable with the explicit behaviour performed by this agent It checkes whether the behaviour that was intended to executed has really been executed, otherwise it says that is was obstructed while trying. This is done to easily observe the behaviour of another agent. TODO make this obstruction sensitive for all behaviours, not only for movement behaviours

Parameters:
name -

getObservableB

public java.lang.String getObservableB()
Returns the behaviour of that this agent is currently showing. This is not the behaviour an agent chose to perform, but the behaviour that is actually performed. As the agent might be inhibited in showing its behaviour

Returns:

getObservableBNum

public int getObservableBNum()
Returns the behaviour an individual is showing in a numerical value 1 = walk 2 = run 3 = dance 4 = inhibited no behaviour - system.out.errrrr!

Returns:

getActivationBruleWalk

public double getActivationBruleWalk()
Returns the current activation of the memory element: walk (behaviour rule)

Returns:

getActivationBruleRun

public double getActivationBruleRun()
Returns the current activation of the memory element: run (behaviour rule)

Returns:

getActivationBruleDance

public double getActivationBruleDance()
Returns the current activation of the memory element: dance (behaviour rule)

Returns:

getOccupationDiameter

public double getOccupationDiameter()
Returns the diameter of the area an individual occupies.

Returns:
the d_occupation_diameter

setOccupationDiameter

public void setOccupationDiameter(double d_occupation_diameter)
Sets the area an individual occupies. (diameter of the occupation circle) Default this is 40x40cm ; 1x1 simulation unit. However for some bheaviours (such as dancing) more space is taken.

Parameters:
d_occupation_diameter -

setSatisfied

public void setSatisfied(boolean bool)
Indicates whether an agent is satisfied. Meaning that all its goals are currently fullfilled.

Parameters:
bool -

getSatisfied

public boolean getSatisfied()
Returns the whether an agent is satisfied meaning whether all its goals are currently fullfilled or not

Returns:

getDomPhysio

public java.lang.String getDomPhysio()
Returns the dominant influence given (subsistence-related) physiology

Returns:
dominant physio factor: blatter or stomach

getPerceivedDensity

public double getPerceivedDensity()
Returns the local density perceived by this individual

Returns:
local (perceived) density level

getPrevIdSatis

public double getPrevIdSatis()
Returns:
the prevIdSatis

getPrevSocSatis

public double getPrevSocSatis()
Returns:
the prevSocSatis

getPrevSafeSatis

public double getPrevSafeSatis()
Returns:
the prevSafeSatis

getPrevSubsSatis

public double getPrevSubsSatis()
Returns:
the prevSubsSatis

getPrevPos

public repast.simphony.space.continuous.NdPoint getPrevPos()
Returns:
the prevPos

getPrevNearbyAgents

public java.util.Vector getPrevNearbyAgents()
Returns:
nearby agents of last timeStep (before moving)

getPrevAgentsInsight

public java.util.Vector getPrevAgentsInsight()
Returns:
agents insight of last timeStep (before moving)

clusterIndex

public double clusterIndex()
Function indicates the relative crowdedness around an agent. In which the clustering refers to the pure physical presence of others clusterIndex = other agents (moores neigborhood) / max_agents that can surround an agent As currently only one person can stand on a patch the maximum of agents that can stand in the area of an agent is: ci = # persons in surrounding / max. possible persons in surrounding nearby = # persons in surrounding maxNearby = max. possible persons in surrounding = area of 1 person / area of the surrounding personArea = area of 1 person = 0.4 * 0.4 = 0.16 m^2 surroundingArea = area of the surrounding = area of a circle = pi * r^2 = pi * gaze-depth^2 = pi * (2 * unit2meter)^2 = 3,14 * (2 * 0,4)^2 = 2,01 maxSurrounding = 2,01/0.16 = 12,6 circle area = pi* r^2.

Returns:

getArousalLevel

public double getArousalLevel()

getDensity

public double getDensity()
Returns:
the local density (density perceived by this agent)

getNearbyAgents

public java.util.Vector<CrowdAgent> getNearbyAgents()
Returns:
the agents that are nearby (360, surrounding the agent)

getDistNearestAgent

public double getDistNearestAgent()
Returns:
the distClosestAgent

getIDNearestAgent

public int getIDNearestAgent()
Returns:
ID of nearest agent

getNearestAgent

public CrowdAgent getNearestAgent()
Returns:
nearest agent

getNumVisibleOthers

public int getNumVisibleOthers()
Returns:
the d_numVisibleOthers

getVisibleOthers

public java.util.Vector<CrowdAgent> getVisibleOthers()
Returns:
the d_visibleOthers

getIDpref

public double getIDpref()
Satisfaction preference of the Identity goal for this agent (heterogeneous & static attribute of the agent)

Returns:
preference level of the Identity goal

getSocialpref

public double getSocialpref()
Satisfaction preference of the Social goal for this agent (heterogeneous & static attribute of the agent)

Returns:
preference level of the Social goal

getSafepref

public double getSafepref()
Satisfaction preference of the Safety goal for this agent (heterogeneous & static attribute of the agent)

Returns:
preference level of the Safety goal

getSubspref

public double getSubspref()
satisfaction preference of the Subsistence goal for this agent (heterogeneous & static attribute of the agent)

Returns:
preference level of the Subsistence goal

getStomachLevel

public double getStomachLevel()
Returns:
stomach level [0,1] (empty-full)

getBladderLevel

public double getBladderLevel()
Returns:
bladder level [0,1] (empty-full)

getAgentMove2x

public double getAgentMove2x()

getAgentMove2y

public double getAgentMove2y()

getMyPosx

public double getMyPosx()

getMyPosy

public double getMyPosy()

getWalkExp

public double getWalkExp()

getRunExp

public double getRunExp()

getDanceExp

public double getDanceExp()

getDensityCondition

public int getDensityCondition()
the experiment condition of the density 1 : low (1) 2 : medium (3) 3 : high (5.5)

Returns:
the experiment condition of the safety preference

getSafetyCondition

public int getSafetyCondition()
the experiment condition of the safety preference 1 : low safety preference 2 : control condition, medium safety pref 3 : high safety preference

Returns:
the experiment condition of the safety preference

getLeadershipCondition

public int getLeadershipCondition()
the experiment condition of the number of leaders 1 : zero leaders (0) 2 : low amount of leaders (25) 1:28 3 : medium amount of leaders (50) 1:14 4: high amount of leaders (100) 1:7

Returns:
the experiment condition of the safety preference

setToDummy

public void setToDummy(int color)
Sets this agent to be a dummy. An agent who is tracked during a run to use in the life histories that explain what happens on the individual todo - turn this var in a final


isDummy

public boolean isDummy()
Returns:
whether this agent is a dummy

getDummyColor

public int getDummyColor()
Returns:
the visualisation color of dummy

isLeader

public boolean isLeader()
Returns:
whether the agent is a leader

setMyLeaders

public void setMyLeaders(java.util.HashSet<CrowdAgent> leaders)
Sets the agent with the persons it perceives as a leader

Parameters:
leaders -

getIsWalking

public int getIsWalking()
Returns:
whether this agent is walking

getIsRunning

public int getIsRunning()
Returns:
whether this agent is running

getIsDancing

public int getIsDancing()
Returns:
whether this agent is dancing

getCntVisibleLeaders

public int getCntVisibleLeaders()
Returns:
amount of leaders that this agent perceived in this timestep

getSameBasLeader

public int getSameBasLeader()
Returns:
whether an agent performs the same behaviour as it saw by its leader

getDanceUtil

public double getDanceUtil()

getRunUtil

public double getRunUtil()

getWalkUtil

public double getWalkUtil()