57 if(msg->isName(
"probeTimer")) {
65 double mnAverage = 0.0;
68 for(std::map<NodeHandle, SimpleGameClient*>::iterator itTopology =
Topology.begin(); itTopology !=
Topology.end(); ++itTopology) {
70 Vector2D pos = itTopology->second->getPosition();
71 double AOIWidth = itTopology->second->getAOI();
72 for(std::map<NodeHandle, SimpleGameClient*>::iterator itI =
Topology.begin(); itI !=
Topology.end(); ++itI) {
73 if(itI != itTopology && pos.
distanceSqr(itI->second->getPosition()) <= AOIWidth*AOIWidth) {
74 NeighborMap::iterator currentSite = itTopology->second->Neighbors.find(itI->second->getThisNode());
75 if(currentSite == itTopology->second->Neighbors.end()) {
79 drift += sqrt(currentSite->second.position.distanceSqr(itI->second->getPosition()));
93 mnAverage /= (double)
Topology.size();
95 drift /= (double)driftCount;
112 for(
int i=0; i<=simulation.getLastModuleId(); i++) {
113 cModule* module = simulation.getModule(i);
115 if((client = dynamic_cast<SimpleGameClient*>(module))) {