crowdmodel.test
Class BehaveTest
java.lang.Object
crowdmodel.CObject
crowdmodel.test.BehaveTest
public class BehaveTest
- extends CObject
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
d_testDummy
CrowdAgent d_testDummy
d_crowdsize
int d_crowdsize
d_agents
java.util.Iterator<CrowdAgent> d_agents
d_distanceMatrix
double[][] d_distanceMatrix
d_index2agent
java.util.HashMap<java.lang.Integer,CrowdAgent> d_index2agent
d_agent2index
java.util.HashMap<CrowdAgent,java.lang.Integer> d_agent2index
BehaveTest
public BehaveTest(CrowdAgent agent,
int crowdsize,
java.util.Iterator<CrowdAgent> agents)
testIt
public void testIt()
initDistanceMatrix
public void initDistanceMatrix()
- Initialises the distance matrix and the variables
that are involved with it
updateDistanceMatrix
public void updateDistanceMatrix()
- Sets the distances between every agent in the network
This way we can check whether the calculation of the nearest
agent is performing correctly.
testNearestAgent
public void testNearestAgent()
- Function that checks whether an agent will head towards
the nearest agent. This is done in two ways:
1) the distance found is also found by the test (matrix of distances between agents)
2) whether the nearestAgent found by the matrix matches with the one the agent has found.
testHeading2Point
public void testHeading2Point()
testBselection
public void testBselection()