3. SENSOR’S POWER MANAGEMENT One of the most critical issues about WSN is the power issue. Power management techniques in WSN try to preserve network’s nodes’ powers and inc rease the lifetime of the network. In our previous research a new approach is described which is based on our agent-based architecture. To represent our approach, we describe a step-bystep scenario of a WSN deployment and setup [9]. When sensors are scattered in the sensing environment the lifetime of the network begins. The base-station sends a flooding message into the network; as this flooding message passes over different nodes it sets the gradients toward the base-station, thus each sensor that receives the flooding packet can reach the base-station based in its own link-state. After receiving the flooding message each sensor creates a message containing sensors neighbors IDs and sensor’s position and sends it back to the base-station. Having all the nodes neighbors state, base-station is able to create the adjacent matrix and find the shortest paths to each one of the sensors. For the weight of all the connections between sensor nodes it is assumed the same equal value of 1. After finding the shortest paths the base-station distributes the agents in the WSN using the algorithm described in the previous section and agents start their sensing operation. Here four thresholds for the sensor nodes such as power threshold, migration threshold, sensing threshold and routing threshold are defined and shown in Fig 1. It also defined the relation between these thresholds as power threshold < migration threshold < sensing threshold < routing threshold. As the sensors operate and use their power, they monitor their own power and whenever their remaining power meets each one of these thresholds the sensor runs a power preserving algorithm. These algorithms are described below. The highest threshold is the routing threshold. As a sensor is using its power this is the first threshold that it meets. When the power of a sensor meets the routing threshold it sends a message to the base-station requesting to remove that sensor from adjacency Matrix and update the routing paths. This means that the base-station removes it from routing paths and thus this node consumes less energy and continues to operate. If removing this node causes some other nodes to be unreachable, the base-station rejects the request and keep the routing paths as before [10]. When a node’s power reaches the sensing threshold it stops the sensing operation. This means that it only keeps on routing the data. Considering that only those nodes which contain an agent are sensing, this is obvious that this threshold only affects the agent-nodes. When a node’s power (which contains an agent) reaches the migration threshold it sends a migration message to the base-station, requesting to move the agent to another node. Base station would search the nodes to find the closest node to that agent and relocates the agent. This is operation is also only applicable to those nodes that contain an agent.