|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcrowdmodel.CObject
crowdmodel.Cluster
public class Cluster
Cluster is a class that contains the functions to update the output measure: clusters A cluster is defined as a network structure that indicates a set of agents that either 1) perform the same behaviour 2) perform a specific behaviour 3) whatever way you would like to define a cluster.. For all connections counts that the agents are in each others physical vicinity (here range of sight). It is used as an output measure as this should represent observable group patterns that can also be compared in the real world. These clusters are represented as a graph (social network). Every time step the connections are created or updated between agents based on the current definition of a cluster. given the definition (1,2, ..) individuals are connected and can have a certain weight. This network is an unidirectional graph/network. We specify the connections in terms of: a) adding/removing edges given the current cluster definition, the clusters represent the current status b) updating the weights of the connections, given the definition weights are increased, which shows a development during time Note: I can also make this function independent from Repast by outputting in a file every time step still need to figure out what is the most convenient way to do so.
Field Summary | |
---|---|
double |
d_arousal1
|
double |
d_arousal2
|
double |
d_arousal3
|
double |
d_behaviour1
|
double |
d_behaviour2
|
double |
d_behaviour3
|
double |
d_ci1
|
double |
d_ci2
|
double |
d_ci3
|
(package private) int |
d_cntEdges
|
(package private) int |
d_crowdsize
|
double |
d_danceAct1
|
double |
d_danceAct2
|
double |
d_danceAct3
|
double |
d_danceExp1
|
double |
d_danceExp2
|
double |
d_danceExp3
|
double |
d_danceUtil1
|
double |
d_danceUtil2
|
double |
d_danceUtil3
|
double |
d_dancingLeaders1
|
double |
d_dancingLeaders2
|
double |
d_dancingLeaders3
|
(package private) double[] |
d_distances
|
(package private) CrowdAgent |
d_dummy1
|
(package private) CrowdAgent |
d_dummy2
|
(package private) CrowdAgent |
d_dummy3
|
(package private) int |
d_exp_dens
|
(package private) int |
d_exp_leadership
|
(package private) int |
d_exp_safe
|
double |
d_idDom1
|
double |
d_idDom2
|
double |
d_idDom3
|
double |
d_leadercnt1
|
double |
d_leadercnt2
|
double |
d_leadercnt3
|
(package private) double |
d_maxDensity
|
(package private) double |
d_meanAgentDistance
|
(package private) int |
d_n
|
(package private) int |
d_numEdges
|
double |
d_runAct1
|
double |
d_runAct2
|
double |
d_runAct3
|
double |
d_runExp1
|
double |
d_runExp2
|
double |
d_runExp3
|
(package private) int |
d_runlength
|
double |
d_runningLeaders1
|
double |
d_runningLeaders2
|
double |
d_runningLeaders3
|
double |
d_runUtil1
|
double |
d_runUtil2
|
double |
d_runUtil3
|
double |
d_safeDom1
|
double |
d_safeDom2
|
double |
d_safeDom3
|
(package private) java.lang.String |
d_safety_dist
|
(package private) int |
d_seed
|
double |
d_socDom1
|
double |
d_socDom2
|
double |
d_socDom3
|
double |
d_subsDom1
|
double |
d_subsDom2
|
double |
d_subsDom3
|
(package private) double |
d_sumDistances
|
(package private) double |
d_varAgentDistance
|
double |
d_walkAct1
|
double |
d_walkAct2
|
double |
d_walkAct3
|
double |
d_walkExp1
|
double |
d_walkExp2
|
double |
d_walkExp3
|
double |
d_walkingLeaders1
|
double |
d_walkingLeaders2
|
double |
d_walkingLeaders3
|
double |
d_walkUtil1
|
double |
d_walkUtil2
|
double |
d_walkUtil3
|
double |
d_x1
|
double |
d_x2
|
double |
d_x3
|
double |
d_y1
|
double |
d_y2
|
double |
d_y3
|
Fields inherited from class crowdmodel.CObject |
---|
d_id, d_world_context |
Constructor Summary | |
---|---|
Cluster(int densityCondition,
int safetyPrefCondition,
int leadershipCondition)
Constructor for cluster, initialises the vars |
Method Summary | |
---|---|
private void |
calcDistanceIndicators()
Sets the distance indicators for this time-step - Mean of the distances between agents : sum(distances) / n - Variance of the distances between agents : sum((distances - mean)^2) / (n-1) |
double |
getBehaviour1()
|
double |
getBehaviour2()
|
double |
getBehaviour3()
|
double |
getCrowdSize()
|
double |
getD_arousal1()
|
double |
getD_arousal2()
|
double |
getD_arousal3()
|
double |
getD_ci1()
|
double |
getD_ci2()
|
double |
getD_ci3()
|
double |
getD_dance1()
|
double |
getD_dance2()
|
double |
getD_dance3()
|
double |
getD_danceExp1()
|
double |
getD_danceExp2()
|
double |
getD_danceExp3()
|
double |
getD_danceUtil1()
|
double |
getD_danceUtil2()
|
double |
getD_danceUtil3()
|
double |
getD_dancingLeaders1()
|
double |
getD_dancingLeaders2()
|
double |
getD_dancingLeaders3()
|
CrowdAgent |
getD_dummy1()
|
CrowdAgent |
getD_dummy2()
|
CrowdAgent |
getD_dummy3()
|
double |
getD_idDom1()
|
double |
getD_idDom2()
|
double |
getD_idDom3()
|
double |
getD_leadercnt1()
|
double |
getD_leadercnt2()
|
double |
getD_leadercnt3()
|
double |
getD_run1()
|
double |
getD_run2()
|
double |
getD_run3()
|
double |
getD_runExp1()
|
double |
getD_runExp2()
|
double |
getD_runExp3()
|
double |
getD_runningLeaders1()
|
double |
getD_runningLeaders2()
|
double |
getD_runningLeaders3()
|
double |
getD_runUtil1()
|
double |
getD_runUtil2()
|
double |
getD_runUtil3()
|
double |
getD_safeDom1()
|
double |
getD_safeDom2()
|
double |
getD_safeDom3()
|
double |
getD_socDom1()
|
double |
getD_socDom2()
|
double |
getD_socDom3()
|
double |
getD_subsDom1()
|
double |
getD_subsDom2()
|
double |
getD_subsDom3()
|
double |
getD_walk1()
|
double |
getD_walk2()
|
double |
getD_walk3()
|
double |
getD_walkExp1()
|
double |
getD_walkExp2()
|
double |
getD_walkExp3()
|
double |
getD_walkingLeaders1()
|
double |
getD_walkingLeaders2()
|
double |
getD_walkingLeaders3()
|
double |
getD_walkUtil1()
|
double |
getD_walkUtil2()
|
double |
getD_walkUtil3()
|
double |
getD_x1()
|
double |
getD_x2()
|
double |
getD_x3()
|
double |
getD_y1()
|
double |
getD_y2()
|
double |
getD_y3()
|
int |
getDensityCondition()
the experiment condition of the density 1 : low (1) 2 : medium (3) 3 : high (5.5) |
int |
getLeadershipCondition()
the experiment condition of the leadership 0 : zero (0) leaders (0) 1 : low (25) leaders (1:28) 2 : medium (50) leaders (1:14) 3 : high (100) leaders (1:7) |
double |
getMeanAgentDistance()
Returns the current sample mean |
double |
getRunLength()
|
java.lang.String |
getSafetyDist()
|
int |
getSafetyPrefCondition()
the experiment condition of the safety preference 1 : low safety preference 2 : control condition, medium safety pref 3 : high safety preference |
double |
getSeed()
|
int |
getSyncEdgeCnt()
|
double |
getSynchronicity()
Returns the number of edges that are present in the current time step. |
double |
getVarAgentDistance()
Returns the current sample mean |
void |
resetCounters()
|
private void |
resetNetwork()
Removes all the existing connections (edges) in a given network. |
void |
setAgent4Tracking(CrowdAgent rndAgent1,
CrowdAgent rndAgent2,
CrowdAgent rndAgent3)
Sets the agents that will be tracked during the current run of the simulation. |
int |
testSynchronicity()
Returns the number of edges that are present in the current time step. |
void |
updateBClusters()
Updates the connections between agents in terms of a social network structure (clusters). |
void |
updateBClustersWithoutNetwork()
counts the synchronised behaviours without representing this in a network. |
void |
updateBSpecClusters(java.lang.String behaviour)
Updates the connections between agents in terms of a social network structure (clusters). |
void |
updateBSpecEvolvedClusters(java.lang.String behaviour)
Updates the connections between agents in terms of a social network structure (clusters). |
void |
updateClusters()
Function that makes sure the network of clusters is updated. |
void |
updateClustersWithoutNetwork()
|
private void |
updateDistance(CrowdAgent ca,
CrowdAgent ca2)
Updates the mean and variance of the measured distances between agents given a new distance of two agents. |
private void |
updateLifeHistory()
|
void |
updateSameBehaviour(CrowdAgent ca,
CrowdAgent ca2)
Checks whether two agents show the same behaviour. |
void |
updateSameBehaviourCnt(CrowdAgent ca,
CrowdAgent ca2)
Checks whether two agents show the same behaviour. |
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 |
---|
int d_crowdsize
int d_numEdges
int d_cntEdges
int d_n
double d_sumDistances
double d_meanAgentDistance
double d_varAgentDistance
double d_maxDensity
double[] d_distances
final int d_runlength
final int d_seed
final java.lang.String d_safety_dist
final int d_exp_dens
final int d_exp_safe
final int d_exp_leadership
CrowdAgent d_dummy1
CrowdAgent d_dummy2
CrowdAgent d_dummy3
public double d_x1
public double d_x2
public double d_x3
public double d_y1
public double d_y2
public double d_y3
public double d_arousal1
public double d_arousal2
public double d_arousal3
public double d_behaviour1
public double d_behaviour2
public double d_behaviour3
public double d_idDom1
public double d_idDom2
public double d_idDom3
public double d_socDom1
public double d_socDom2
public double d_socDom3
public double d_safeDom1
public double d_safeDom2
public double d_safeDom3
public double d_subsDom1
public double d_subsDom2
public double d_subsDom3
public double d_walkAct1
public double d_walkAct2
public double d_walkAct3
public double d_runAct1
public double d_runAct2
public double d_runAct3
public double d_danceAct1
public double d_danceAct2
public double d_danceAct3
public double d_walkExp1
public double d_walkExp2
public double d_walkExp3
public double d_runExp1
public double d_runExp2
public double d_runExp3
public double d_danceExp1
public double d_danceExp2
public double d_danceExp3
public double d_walkUtil1
public double d_walkUtil2
public double d_walkUtil3
public double d_runUtil1
public double d_runUtil2
public double d_runUtil3
public double d_danceUtil1
public double d_danceUtil2
public double d_danceUtil3
public double d_ci1
public double d_ci2
public double d_ci3
public double d_leadercnt1
public double d_leadercnt2
public double d_leadercnt3
public double d_walkingLeaders1
public double d_walkingLeaders2
public double d_walkingLeaders3
public double d_runningLeaders1
public double d_runningLeaders2
public double d_runningLeaders3
public double d_dancingLeaders1
public double d_dancingLeaders2
public double d_dancingLeaders3
Constructor Detail |
---|
public Cluster(int densityCondition, int safetyPrefCondition, int leadershipCondition)
Method Detail |
---|
public void setAgent4Tracking(CrowdAgent rndAgent1, CrowdAgent rndAgent2, CrowdAgent rndAgent3)
rndAgent1
- rndAgent2
- rndAgent3
- public void updateClusters()
crowdsize
- public void updateClustersWithoutNetwork()
public void resetCounters()
private void resetNetwork()
network
- public void updateBClustersWithoutNetwork()
public void updateBClusters()
agentContext
- behaviour
- public void updateSameBehaviour(CrowdAgent ca, CrowdAgent ca2)
ca
- ca2
- public void updateSameBehaviourCnt(CrowdAgent ca, CrowdAgent ca2)
ca
- ca2
- public void updateBSpecClusters(java.lang.String behaviour)
behaviour
- public void updateBSpecEvolvedClusters(java.lang.String behaviour)
behaviour
- public double getSynchronicity()
public int getSyncEdgeCnt()
public int testSynchronicity()
private void updateDistance(CrowdAgent ca, CrowdAgent ca2)
ca
- ca2
- private void calcDistanceIndicators()
private void updateLifeHistory()
public double getD_x1()
public double getD_x2()
public double getD_x3()
public double getD_y1()
public double getD_y2()
public double getD_walkingLeaders1()
public double getD_walkingLeaders2()
public double getD_walkingLeaders3()
public double getD_runningLeaders1()
public double getD_runningLeaders2()
public double getD_runningLeaders3()
public double getD_dancingLeaders1()
public double getD_dancingLeaders2()
public double getD_dancingLeaders3()
public double getD_y3()
public double getMeanAgentDistance()
public double getVarAgentDistance()
public double getRunLength()
public double getCrowdSize()
public double getSeed()
public java.lang.String getSafetyDist()
public int getDensityCondition()
public int getSafetyPrefCondition()
public int getLeadershipCondition()
public CrowdAgent getD_dummy1()
public CrowdAgent getD_dummy2()
public CrowdAgent getD_dummy3()
public double getD_arousal1()
public double getD_arousal2()
public double getD_arousal3()
public double getD_idDom1()
public double getD_idDom2()
public double getD_idDom3()
public double getD_socDom1()
public double getD_socDom2()
public double getD_socDom3()
public double getD_safeDom1()
public double getD_safeDom2()
public double getD_safeDom3()
public double getD_subsDom1()
public double getD_subsDom2()
public double getD_subsDom3()
public double getD_walk1()
public double getD_walk2()
public double getD_walk3()
public double getD_run1()
public double getD_run2()
public double getD_run3()
public double getD_dance1()
public double getD_dance2()
public double getD_dance3()
public double getD_ci1()
public double getD_ci2()
public double getD_ci3()
public double getBehaviour1()
public double getBehaviour2()
public double getBehaviour3()
public double getD_leadercnt1()
public double getD_leadercnt2()
public double getD_leadercnt3()
public double getD_walkExp1()
public double getD_walkExp2()
public double getD_walkExp3()
public double getD_walkUtil1()
public double getD_walkUtil2()
public double getD_walkUtil3()
public double getD_runExp1()
public double getD_runExp2()
public double getD_runExp3()
public double getD_danceExp1()
public double getD_danceExp2()
public double getD_danceExp3()
public double getD_runUtil1()
public double getD_runUtil2()
public double getD_runUtil3()
public double getD_danceUtil1()
public double getD_danceUtil2()
public double getD_danceUtil3()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |