diff --git a/src/agents/slr-routing-agent.cpp b/src/agents/slr-routing-agent.cpp
index 7fc6f9a..fc25bd3 100644
--- a/src/agents/slr-routing-agent.cpp
+++ b/src/agents/slr-routing-agent.cpp
@@ -16,6 +16,13 @@
  * You should have received a copy of the GNU General Public License
  * along with BitSimulator.  If not, see <https://www.gnu.org/licenses/>.
  */
+//*********  this is for the initialization append code
+//+++++ normal append code for the new algo
+#include <bits/stdc++.h>
+#include <cassert>
+#include <stdlib.h>   
+#include <cstdlib>
+#include <chrono>
 
 
 #include <iostream>
@@ -34,12 +41,23 @@ using SLRSetupPacketEvent = CallMethodEvent<SLRRoutingAgent,
   &SLRRoutingAgent::processSetupPacketEvent,
   EventType::SLR_SETUP_PACKET_GENERATION>;
 
+//********************** create the setup event
+using IDSetupPacketEvent = CallMethodEvent<SLRRoutingAgent,
+   &SLRRoutingAgent::IDprocessSetupPacketEvent,
+   EventType::ID_SETUP_PACKET_GENERATION>;
+//***********************
 using SLRSendEvent = CallMethodArgEvent<SLRRoutingAgent,PacketPtr,
   &SLRRoutingAgent::processPacketRetransmission,EventType::SLR_PACKET_RETRANSMISSION_DEST_ZONE>;
+//+++++??????????????????????
+using IDSLRSendEvent = CallMethodArgEvent<SLRRoutingAgent,PacketPtr,
+  &SLRRoutingAgent::processPacketRetransmission,EventType::SLR_PACKET_RETRANSMISSION_DEST_ZONE>;
 
 using SLRBackoffSendEvent = CallMethodArgEvent<SLRRoutingAgent,int,
   &SLRRoutingAgent::processPacketBackoffRetransmission,EventType::SLR_BACKOFF_PACKET_RETRANSMISSION>;
-
+  
+//++++++++back off event 
+using IDBackoffSendEvent = CallMethodArgEvent<SLRRoutingAgent,int,
+  &SLRRoutingAgent::IDprocessPacketBackoffRetransmission,EventType::SLR_BACKOFF_PACKET_RETRANSMISSION>;
 //==============================================================================
 //
 //          SLRRoutingAgent  (class)
@@ -55,8 +73,10 @@ float SLRRoutingAgent::dataBackoffMultiplier;
 bool SLRRoutingAgent::useCounterBasedForwarding;
 bool SLRRoutingAgent::useDeviation;
 simulationTime_t SLRRoutingAgent::firstBeaconStartTime;
+simulationTime_t SLRRoutingAgent::SecondBeaconStartTime;
 simulationTime_t SLRRoutingAgent::intervalBetweenBeaconStart;
-
+mt19937_64 *assigneRNG = new mt19937_64(1);//+++++++
+auto start=std::chrono::system_clock::now();
 
 SLRRoutingAgent::SLRRoutingAgent(Node *_hostNode) : RoutingAgent(_hostNode) {
   SLRCoordX = -1;
@@ -64,6 +84,7 @@ SLRRoutingAgent::SLRRoutingAgent(Node *_hostNode) : RoutingAgent(_hostNode) {
   SLRCoordZ = -1;
 
   setupStarted = false;
+  IDsetupStarted= false;//**************************
 
   anchorID = -1;
   if (_hostNode->getId() == anchor1id)
@@ -78,11 +99,15 @@ SLRRoutingAgent::SLRRoutingAgent(Node *_hostNode) : RoutingAgent(_hostNode) {
     SLRCoordX = it->second.x;
     SLRCoordY = it->second.y;
     SLRCoordZ = it->second.z;
-  } else {
+  } else {  
     if ( anchorID == 0 ){
       setupStarted = true;
       Scheduler::getScheduler().schedule (new SLRSetupPacketEvent (Scheduler::now()+firstBeaconStartTime, this));
     }
+    //*****************************************************************************************
+    IDsetupStarted = true;
+    Scheduler::getScheduler().schedule (new IDSetupPacketEvent (Scheduler::now()+SecondBeaconStartTime, this));
+    //*****************************************************************************************
   }
 }
 
@@ -105,7 +130,7 @@ SLRRoutingAgent::~SLRRoutingAgent() {
 
 void SLRRoutingAgent::initializeAgent() {
   backoffRNG =  new mt19937_64( ScenarioParameters::getBackoffRNGSeed() );
-
+  
   if ( ScenarioParameters::getLoadSLRPositionsFromFile() ) {
     string filename = ScenarioParameters::getScenarioDirectory() + "/" + ScenarioParameters::getPrefix() + "SLRPositions" + ScenarioParameters::getDefaultExtension();
     std::ifstream infile(filename);
@@ -141,6 +166,16 @@ void SLRRoutingAgent::initializeAgent() {
 
 
 void SLRRoutingAgent::receivePacketFromNetwork(PacketPtr _packet) {
+//+++++++++++++++++++PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
+  if( (_packet->type == PacketType::Id_initailizationStart) )
+  {
+  	if(SLRCoordX==_packet->src_SLRX && SLRCoordY==_packet->src_SLRY){
+  		hostNode->increment_nb_id_In_list();
+  		/*int source_Node_identifier=_packet->getsource_Node_Identifier();
+		cout<<"Receive id :"<<source_Node_identifier<<", Received packet SLRX-Y: "<<packet->src_SLRX <<" , "<<_packet->src_SLRY<<endl;*/
+  		//cout<<"nb id in list"<< hostNode->getnb_id_In_list()<<endl;
+  	}  	
+  }
   LogSystem::EventsLogOutput.log( LogSystem::routingRCV, Scheduler::now(),hostNode->getId(),(int) _packet->type,_packet->flowId,_packet->flowSequenceNumber, _packet->modifiedBitsPositions.size());
 
   bool alreadySeen = false;
@@ -169,6 +204,17 @@ void SLRRoutingAgent::receivePacketFromNetwork(PacketPtr _packet) {
     return;
   }
   if (_packet->type == PacketType::SLR_BEACON ){
+  if(_packet->type == PacketType::SLR_BEACON && _packet->getsrc_SLRY()!=-1)
+      {
+	 if(_packet->getsrc_SLRX()==SLRCoordX && _packet->getsrc_SLRY()==SLRCoordY)
+			 {
+				 hostNode->incrementzonedensitytest(); //test SLRX and Y
+				 //print the way a node calculate its zone density (where it belong)
+				 if(SLRCoordX==31 && SLRCoordY==25 && hostNode->getId()==18315){
+					 cout<<"Host coordinate is: "<<SLRCoordX<<" , "<<SLRCoordY<<" ////// packet: "<<_packet->getsrc_SLRX()<<" , "<<_packet->getsrc_SLRY()<<" ///// count now is: "<<hostNode->getzonedensitytest()<<endl;
+				 }
+		      	 }
+         }
     update = SLRUpdate(_packet);
     if (update) forward = true;
     if ( anchorID != -1 &&  _packet->anchorID != anchorID && !setupStarted ){
@@ -226,8 +272,13 @@ void SLRRoutingAgent::receivePacketFromNetwork(PacketPtr _packet) {
   }
 
   if ( (!alreadySeen && _packet->type == PacketType::DATA)){
-    if ( SLRForward(_packet) && isCloser(_packet) ){
+    //++++++++++SSLR routing
+    int source_identifier= _packet->getsource_Node_Identifier(); //before retransmission
+    int node_identifier= hostNode->getIdentifier();//host identifier
+    bool transBool=(source_identifier==node_identifier); //node should retransmit or not
+    if ( SLRForward(_packet) && isCloser(_packet) && transBool==1){
       forward = true;
+      //cout << "ID of source: " << source_identifier<<",  ID of current Host: "<<node_identifier<<"///////source coordinates:"<<_packet->getsrc_SLRX()<<","<<_packet->getsrc_SLRY()<<endl; //++
       auto it =alreadyForwardedPackets.find(_packet->flowId);
       if (it != alreadyForwardedPackets.end()){
         it->second = _packet->flowSequenceNumber ;
@@ -260,6 +311,8 @@ void SLRRoutingAgent::receivePacketFromNetwork(PacketPtr _packet) {
       newPacket->tx_SLRX = SLRCoordX;
       newPacket->tx_SLRY = SLRCoordY;
       newPacket->tx_SLRZ = SLRCoordZ;
+      newPacket->src_SLRX=_packet->getsrc_SLRX();
+      newPacket->src_SLRY=_packet->getsrc_SLRY();
       if ( update ) {newPacket->anchorDist++;}
 
       if ( newPacket->type == PacketType::DATA) {
@@ -319,7 +372,7 @@ void SLRRoutingAgent::receivePacketFromNetwork(PacketPtr _packet) {
       if (newPacket->type == PacketType::DATA) {
         forwardedDataPackets++;
       }
-      else if (newPacket->type == PacketType::SLR_BEACON){
+      else if (newPacket->type == PacketType::SLR_BEACON){      
         forwardedSLRBeacons++;
       }
     }
@@ -489,7 +542,7 @@ bool SLRRoutingAgent::implicitAck(PacketPtr _packet) {
     //
     // current node is on the path of this packet
     //
-
+    
     if ( X == txX && Y == txY && Z == txZ ) {
       return true;
     }
@@ -635,7 +688,7 @@ bool SLRRoutingAgent::SLRForward(PacketPtr _packet, int m )
     printf("  txX %d  txY %d  txZ %d \n", txX,txY,txZ);
     printf("    X %d    Y %d Z    %d \n", X,Y,Z);
     getchar();
-  */
+  */      
   return onTheLine && onSegment;
 }
 
@@ -681,6 +734,8 @@ void SLRRoutingAgent::receivePacketFromApplication(PacketPtr _packet) {
   _packet->tx_SLRY = SLRCoordY;
   _packet->tx_SLRZ = SLRCoordZ;
 
+  _packet->setsource_Node_Identifier(hostNode->getIdentifier()); //+++++++++++++++++++++++
+  cout << " received packet from application hold source identifier:" << _packet->getsource_Node_Identifier() <<"+++ my identifier:"<< hostNode->getIdentifier() << endl; //+++++++++++++++++++++++
   //TODO : how to find values here?
   if (_packet->type == PacketType::DATA && _packet->dstId != -1 ){
     Node* dst = World::getNode(_packet->dstId);
@@ -703,7 +758,7 @@ void SLRRoutingAgent::receivePacketFromApplication(PacketPtr _packet) {
   hostNode->enqueueOutgoingPacket(_packet);
 }
 
-bool SLRRoutingAgent::SLRUpdate(PacketPtr _packet)
+bool SLRRoutingAgent::SLRUpdate(PacketPtr &_packet)
 {
   int anchorId = _packet->anchorID;
   int anchorDist =  _packet->anchorDist;
@@ -737,20 +792,23 @@ bool SLRRoutingAgent::SLRUpdate(PacketPtr _packet)
     cerr << " *** ERROR *** SLR_BEACON received from unknown anchor " << anchorId << endl;
     exit (EXIT_FAILURE);
   }
-
+  
+  _packet->src_SLRX=routing->getSLRX();
+  _packet->src_SLRY=routing->getSLRY();
   return update;
 }
 
 void SLRRoutingAgent::processSetupPacketEvent() {
+  //cout <<"SLR initialization has started"<< endl;
   cout << "SLR: anchor " << anchorID << " sent a beacon" << endl;
   // SLR beacons have a -1 flow id
   PacketPtr p(new Packet(PacketType::SLR_BEACON, 100, hostNode->getId(), -1, -1,-1, 0,anchorID,1));
   SLRUpdate(p);
-  hostNode->getRoutingAgent()->receivePacketFromApplication(p);
+  cout<<"Coordinate: ("<<p->getsrc_SLRX()<<" , "<<p->src_SLRY<<")"<<endl;  
+  hostNode->getRoutingAgent()->receivePacketFromApplication(p);  
 }
 
 void SLRRoutingAgent::processPacketRetransmission (PacketPtr packet){
-  //cout << "The packet is retransmitted with the node : " << " " << hostNode->getId() << " " << "\n";
 
   //cout << " Node " << hostNode->getId() << "(" << SLRCoordX << "," << SLRCoordY << "," << SLRCoordZ << ")" << " packet (flow) " << "(" << packet->flowId << ")"  <<" " << "current time " << " " << Scheduler::now() <<" "<< "Waiting Time " << " " << waitingTime << endl;
   hostNode->enqueueOutgoingPacket (packet);
@@ -799,4 +857,70 @@ void SLRRoutingAgent::readTimingAttributes() {
 
   ScenarioParameters::queryLongAttr(slrElement, "firstBeaconStartTime_fs", "firstBeaconStartTime_ns", firstBeaconStartTime, false, nullptr, 200000000000, "");
   ScenarioParameters::queryLongAttr(slrElement, "intervalBetweenBeaconStart_fs", "intervalBetweenBeaconStart_ns", intervalBetweenBeaconStart, false, nullptr, 100000000, "");
+  
+  //**************************************************************************************************** create the beacon of second phase
+  ScenarioParameters::queryLongAttr(slrElement, "SecondBeaconStartTime_fs", "SecondBeaconStartTime_ns", SecondBeaconStartTime, false, nullptr, 250000000000, "");
+  ScenarioParameters::queryLongAttr(slrElement, "intervalBetweenBeaconStart_fs", "intervalBetweenBeaconStart_ns", intervalBetweenBeaconStart, false, nullptr, 100000000, "");
+  //auto sendEvent = new SLRBackoffSendEvent(Scheduler::now() + backoff , this, newPacket->packetId);
+        //Scheduler::getScheduler().schedule (sendEvent);
+  //********************************************************************************************************************
 }
+//***************************** function of ID initialization
+void SLRRoutingAgent::IDprocessSetupPacketEvent() {
+
+	/*if(SLRCoordX==22 && SLRCoordY==25){ cout<<"ID initialization has start in zone "<<"  SLRX  "<<SLRCoordX<<"  , SLRY  "<<SLRCoordY<<" coutn: "<<hostNode->getNeighboursCount()<<endl;}*/
+   //initialize the backoff windows and function of Id assignment that will start in each node backoff time
+   PacketPtr packet(new Packet(PacketType::Id_initialization, 100, hostNode->getId(), -1, -1,-1, 0,anchorID,1));
+  simulationTime_t backoffWindow =
+    2 * ((Node::getPulseDuration() * (1 + packet->beta * (packet->size - 1)))
+    + ScenarioParameters::getCommunicationRange() / PROPAGATIONSPEED);
+  if (hostNode->getEstimatedNeighbours() != -1)
+    backoffWindow *= hostNode->getEstimatedNeighbours(); //deden
+  else
+    backoffWindow *= hostNode->getNeighboursCount(); //nodeden
+  uniform_int_distribution<unsigned long> distrib (0, backoffWindow*100);
+   simulationTime_t backoff=distrib (*assigneRNG);
+   hostNode->setused_backoff(backoff);//++++
+   /*if(SLRCoordX==22 && SLRCoordY==25){cout<<"the backoff calculated is "<<backoff<<endl;}*/
+   start = std::chrono::system_clock::now();
+   auto IDsendEvent = new IDBackoffSendEvent(Scheduler::now() + backoff+ 100, this, packet->packetId);
+	Scheduler::getScheduler().schedule (IDsendEvent);
+  }
+	
+void SLRRoutingAgent::IDprocessPacketBackoffRetransmission(int packetId){ //affect the identifier of node (each node within its identifier)
+	   	hostNode->calculate_modulonb();
+		hostNode->calculate_maximumTransmission();
+	   	if(hostNode->getnb_id_In_list() < hostNode->getmaximumTransmission())// && SLRCoordX==31 && SLRCoordY==25)
+	   	{
+	   		int id=hostNode->getnb_id_In_list()%hostNode->getmodulonb();
+  			if(SLRCoordX==31 && SLRCoordY==25)
+	  			{
+	  				//cout<<"max transmission: "<<hostNode->calculate_maximumTransmission()<<", modulo nb:"<<hostNode->calculate_modulonb()<<endl;  	
+	  				cout <<"nb of id in list:  "<<hostNode->getnb_id_In_list()<<",   sending packet holding id:  "<<id<<endl;		
+	  				//cout<<hostNode->getzonedensitytest()<<"??"<<hostNode->getnb_id_In_list()%hostNode->getmodulonb()<<endl;
+	  			}
+		  			PacketPtr p(new Packet(PacketType::Id_initailizationStart, 100, hostNode->getId(), -1, -1,-1, 0,anchorID,1));
+						  p->src_SLRX = SLRCoordX;
+						  p->src_SLRY = SLRCoordY;
+						  p->src_SLRZ = SLRCoordZ;
+						  p->setsource_Node_Identifier(id);
+						  hostNode->enqueueOutgoingPacket (p);
+		  	hostNode->increment_nb_id_In_list();
+			hostNode->setNodeIdentifier(id);
+	   	}
+	   	else{
+  				//cout<<"the backoff is "<<hostNode->getused_backoff()<<", the modulo of backoff is"<<hostNode->getused_backoff()%hostNode->getmodulonb()<<endl;
+  				int id=hostNode->getused_backoff()%hostNode->getmodulonb();
+  				hostNode->setNodeIdentifier(id);
+  				if(SLRCoordX==31 && SLRCoordY==25){
+  				cout<<"node have nb of id in list bigger than noted ";
+  				//cout<<", modulo nb:"<<hostNode->calculate_modulonb()<<"//";  	
+  				cout<<"choose id based on the random backoff:  "<<id<<endl;
+  				}
+  				/*auto end = std::chrono::system_clock::now();
+			    	std::chrono::duration<double> elapsed_seconds = end-start;
+			    	std::time_t end_time = std::chrono::system_clock::to_time_t(end);
+				std::cout << "elapsed time: " << elapsed_seconds.count() << "s"<< std::endl;*/
+  		}
+  }
+
diff --git a/src/agents/slr-routing-agent.h b/src/agents/slr-routing-agent.h
index 7ca3333..35aa223 100644
--- a/src/agents/slr-routing-agent.h
+++ b/src/agents/slr-routing-agent.h
@@ -45,7 +45,7 @@ protected:
   bool isCloser(PacketPtr _packet);
   bool implicitAck(PacketPtr _packet);
   bool isAck(PacketPtr _packet);
-  bool SLRUpdate(PacketPtr _packet);
+  bool SLRUpdate(PacketPtr &_packet);
 
   int SLRCoordX; // Anchor 0;
   int SLRCoordY; // Anchor 1;
@@ -53,7 +53,8 @@ protected:
 
   static mt19937_64 *backoffRNG;
   bool setupStarted;
-
+  
+  bool IDsetupStarted;//*********************
   static int forwardedSLRBeacons;
 
   static map<int,SLRPosition> SLRPositionsMapFromFile;
@@ -70,6 +71,7 @@ protected:
   static bool useCounterBasedForwarding;
   static bool useDeviation;
   static simulationTime_t firstBeaconStartTime;
+  static simulationTime_t SecondBeaconStartTime; //*************
   static simulationTime_t intervalBetweenBeaconStart;
 
 public:
@@ -83,6 +85,7 @@ public:
   virtual void receivePacketFromApplication(PacketPtr _packet);
   virtual void processPacketRetransmission (PacketPtr packet);
   virtual void processPacketBackoffRetransmission(int packetId);
+  virtual void IDprocessPacketBackoffRetransmission(int packetId);//++++++++++++++++++
 
   map<int,int> alreadyForwardedPackets;
   int anchorID;
@@ -95,6 +98,7 @@ public:
   void setSLRY(int val) { SLRCoordY = val; }
   void setSLRZ(int val) { SLRCoordZ = val; }
   void processSetupPacketEvent();
+  void IDprocessSetupPacketEvent(); //****************
 
   static void readBackoffAttributes();
   static void readTimingAttributes();
diff --git a/src/eventtypes.h b/src/eventtypes.h
index bf6840e..6ba6166 100644
--- a/src/eventtypes.h
+++ b/src/eventtypes.h
@@ -31,6 +31,7 @@ enum class EventType {
   NODE_LOG,
   CBR_PACKET_GENERATION,
   DENSITY_ESTIMATOR_PACKET_GENERATION,
+  ID_SETUP_PACKET_GENERATION, //event of ID initialisation algorithm
   SLR_SETUP_PACKET_GENERATION,
   SLR_PACKET_RETRANSMISSION_DEST_ZONE,
   HCD_INITIALISATION_PACKET_GENERATION,
diff --git a/src/node.cpp b/src/node.cpp
index df6ce28..e88657a 100644
--- a/src/node.cpp
+++ b/src/node.cpp
@@ -16,7 +16,8 @@
  * You should have received a copy of the GNU General Public License
  * along with BitSimulator.  If not, see <https://www.gnu.org/licenses/>.
  */
-
+ 
+#include <bits/stdc++.h>
 #include <cassert>
 #include <set>
 #include "utils.h"
@@ -61,7 +62,15 @@ Node::Node(int _id, distance_t _x, distance_t _y, distance_t _z) {
   x = _x;
   y = _y;
   z = _z;
-
+  
+  Identifier_Nb= -1; // //+++++++++++++++++++++++++++
+  nb_id_In_list=0; //+++++++++++++
+  r=5;
+  m=2;
+  zonedensity=50;
+  zonedensitytest=1;
+  modulonb=zonedensitytest/r;//  =n/r
+  maximumTransmission=m*modulonb;
   currentBeta = ScenarioParameters::getDefaultBeta();
   nodeSequenceNumber = 0;
   estimatedNeighbours = -1;
@@ -81,7 +90,7 @@ Node::~Node() {
     delete it->second;
   }
   for (auto it=vectApplications.begin(); it!=vectApplications.end(); it++) {
-    delete *it;
+    delete *it;    
   }
 }
 
@@ -89,6 +98,10 @@ void Node::setNeighboursCount(int count) {
   neighboursCount = count;
 }
 
+//++++++++++++++++++++++++++++++
+void Node::setNodeIdentifier(int id) {
+  Identifier_Nb = id;
+}
 int Node::getNeighboursCount() {
   if ( ScenarioParameters::getNeighboursList() )
     return (int)neighboursMap.size();
diff --git a/src/node.h b/src/node.h
index 8bd0f43..25d9da0 100644
--- a/src/node.h
+++ b/src/node.h
@@ -61,7 +61,16 @@ protected:
   static map<PacketType,backoffHelper_t> specificBackoffsMap;
 
   int id;
-
+  
+  int Identifier_Nb;  //+++++++++++++++++++++++++++
+  int nb_id_In_list; //++++++++++++
+  int modulonb;//+++++++++++
+  int maximumTransmission;//++++++++++++
+  simulationTime_t used_backoff;//++++++++++
+  int zonedensity;//++++++++++
+  int zonedensitytest;//++++
+  int r; //redundancy, expected number of forwarder
+  int m; //guarante
   distance_t x,y,z;
 
   RoutingAgent *routingAgent;
@@ -135,10 +144,37 @@ public:
   void addNeighbour(distance_t _distance, Node *_node) { neighboursMap.insert(pair<distance_t, Node*>(_distance, _node)); }
   int getNeighboursCount();
   void setNeighboursCount(int count);
+  void setNodeIdentifier(int id);
 
   int getRingNeighboursCount(distance_t _innerRadius);
   int getRingNeighboursCount(distance_t _innerRadius, distance_t outerRadius);
 
+  int getIdentifier(){return Identifier_Nb; }//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+  int getnb_id_In_list(){return nb_id_In_list;}//++++++++++++++++++++++++++
+  void increment_nb_id_In_list(){nb_id_In_list=nb_id_In_list+1;}//+++++++++++++++++++++
+  simulationTime_t getused_backoff(){return used_backoff;}
+  void setused_backoff(simulationTime_t b){used_backoff=b;}
+  int getr(){return r;}
+  int getm(){return m;}
+  void setr(int r2){r=r2;}
+  void setm(int m2){m=m2;}
+  int getzonedensity(){return zonedensity;}
+  void setzonedensity(int n){zonedensity=n;}
+  void incrementzonedensity(){zonedensity=zonedensity+1;}
+  int getzonedensitytest(){return zonedensitytest;}
+  void setzonedensitytest(int n){zonedensitytest=n;}
+  void incrementzonedensitytest(){zonedensitytest++;}
+  int getmodulonb(){return modulonb;}
+  void setmodulonb(int m){modulonb=m;}
+  int calculate_modulonb(){
+  			    modulonb=(int)zonedensitytest/r;
+  				if(modulonb==0){modulonb=1;}
+  				return modulonb;
+  			   }
+  int calculate_maximumTransmission(){maximumTransmission=m*modulonb;
+  					return maximumTransmission;}
+  int getmaximumTransmission(){return maximumTransmission;}
+  void setmaximumTransmission(int t){maximumTransmission=t;}
   int getId() { return id; }
   simulationTime_t getBeta() { return currentBeta; }
   int getNextSrcSequenceNumber() { return nodeSequenceNumber++; }
diff --git a/src/packet.cpp b/src/packet.cpp
index 44b5572..85cef65 100644
--- a/src/packet.cpp
+++ b/src/packet.cpp
@@ -54,7 +54,7 @@ Packet::Packet(PacketType _type, int _size, int _srcId, int _dstId, int _port, i
 
   anchorID = _anchorID;
   anchorDist = _anchorDist;
-
+  
   src_SLRX = -1;
   src_SLRY = -1;
   src_SLRZ = -1;
@@ -63,6 +63,7 @@ Packet::Packet(PacketType _type, int _size, int _srcId, int _dstId, int _port, i
   dst_SLRY = -1;
   dst_SLRZ = -1;
 
+  source_Node_Identifier=-1;//++++++++++++++++++++
   tx_SLRX = -1;
   tx_SLRY = -1;
   tx_SLRZ = -1;
@@ -97,6 +98,7 @@ PacketPtr Packet::clone() {
   clone->src_SLRY = src_SLRY;
   clone->src_SLRZ = src_SLRZ;
 
+  clone->source_Node_Identifier=source_Node_Identifier;//++++++++++++++++
   clone->dst_SLRX = dst_SLRX;
   clone->dst_SLRY = dst_SLRY;
   clone->dst_SLRZ = dst_SLRZ;
diff --git a/src/packet.h b/src/packet.h
index b40f35a..beba591 100644
--- a/src/packet.h
+++ b/src/packet.h
@@ -33,7 +33,9 @@ enum class PacketType {
   D2_DENSITY_PROBE,   //6
   HCD_BEACON,         //7
   CONTROL_1,	        //8
-  CONTROL_2           //9
+  CONTROL_2,           //9
+  Id_initialization, //+++++++++++++++++++++++++++++ in the initialization
+  Id_initailizationStart//++++++++++++++++++++ sending packet holding id
 };
 
 class DataSinkApplicationAgent;
@@ -159,6 +161,7 @@ public:
   int src_SLRX;
   int src_SLRY;
   int src_SLRZ;
+  int source_Node_Identifier; //++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
   int dst_SLRX;
   int dst_SLRY;
@@ -184,6 +187,11 @@ public:
   void setSrcSequenceNumber(int _srcSequenceNumber) { srcSequenceNumber = _srcSequenceNumber; }
   void setTransmitterId(int _transmitterId) { transmitterId = _transmitterId; }
 
+  void setsource_Node_Identifier(int _idd){source_Node_Identifier=_idd;} //++++++++++++++++
+  int getsource_Node_Identifier(){return source_Node_Identifier;}//+++++++++++++++++++++++++++++++++
+  int getsrc_SLRX(){return src_SLRX;}
+  int getsrc_SLRY(){return src_SLRY;}
+  
   void checkAndTagCollision(simulationTime_t _p1StartTime, PacketPtr _p2, simulationTime_t _p2StartTime);
 
   void setCommunicationRange( distance_t _range ) {
