crowdmodel.test
Class BehaveTest

java.lang.Object
  extended by crowdmodel.CObject
      extended by crowdmodel.test.BehaveTest

public class BehaveTest
extends CObject


Field Summary
(package private)  java.util.HashMap<CrowdAgent,java.lang.Integer> d_agent2index
           
(package private)  java.util.Iterator<CrowdAgent> d_agents
           
(package private)  int d_crowdsize
           
(package private)  double[][] d_distanceMatrix
           
(package private)  java.util.HashMap<java.lang.Integer,CrowdAgent> d_index2agent
           
(package private)  CrowdAgent d_testDummy
           
 
Fields inherited from class crowdmodel.CObject
d_id, d_world_context
 
Constructor Summary
BehaveTest(CrowdAgent agent, int crowdsize, java.util.Iterator<CrowdAgent> agents)
           
 
Method Summary
 void initDistanceMatrix()
          Initialises the distance matrix and the variables that are involved with it
 void testBselection()
           
 void testHeading2Point()
           
 void testIt()
           
 void testNearestAgent()
          Function that checks whether an agent will head towards the nearest agent.
 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.
 
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_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
Constructor Detail

BehaveTest

public BehaveTest(CrowdAgent agent,
                  int crowdsize,
                  java.util.Iterator<CrowdAgent> agents)
Method Detail

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()