Function calculates the area of a triangle
Calculates the opposite, given the angle and Adjacent side
opposite = tan(angle/2) * adjacent
area = 2(opposite * adjacent)
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)
Calculates what the heading(angle) is given a position and the heading to the new heading should be, given a point it should be directed to
In repast the coordinate system allows mixed ranges:
- from 0 (top), 90 (right), 180/-180 (bottom), -90 (left)
Function that checks whether the perception of other agents (that are supposed to be seen)
have their correct impact on the personFacts in terms of being primed.
This function returns whether an agent is standing close to one of its friends
This is done by checking the distance between the agent and all of its friends.
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..
Function that checks whether a MemoryElement is stored in Memory
This overloads the contains function of AbstractContext, which isn't suitable here
as an abstractContext stores its objects in a Collections, whereas we do so in a Map.
Creates the internal representation of
a behaviour (= a behaviourRule)
There are 3 general types of behaviour: locomotion, manipulation and communication