You are on page 1of 2

private: void void Ant* void

generateForwardAnts(int mode); forwardAntHandler(cMessage *msg); convertToBackwardAnt(Ant *forward_ant,int mode); backwardAntHandler(cMessage *msg);

void displayRoutingTable(); double getPheromone(int destination,int neighbor); double getPnd(int destination, int neighbor); void displayAntDetails(Ant *ant); void routeDataPacket(DataPacket *data_packet); void routeForwardAnt(Ant *forward_ant); void routeBackwardAnt(Ant *backward_ant); double calculateR(double observed_time, int destination); void increasePheromone(double r,int destination,int neighbor); void decreasePheromone(double r,int destination,int neighbor); void updateNeighborsBufferFreeSpace(cMessage *msg); void updatePnd(int destination); int node_id; int num_of_interfaces; int window_size; cMessage *unleash_forward_ants; //neighbor & interface mapping structure struct Neighbor{ int neighbor_id; int interface_id; double buffer_free_space; bool reachable; }; //routing table structure struct Route { int destination; int neighbor_id; double pheromone; double Pnd; }; //traffic model structure struct TM_Entry{ int destination; double mean; double variance; double least_time; int num_of_observations; Admissions and Student Records Office, Lim Fat Engineering Tower, University of Mauritius, Rduit

}; /*Data structures*/ vector <Route> routingTable; vector <TM_Entry> traffic_model; vector <Neighbor> neighborsTable; }; //end of Router class

You might also like