# Adapted Diffusion for Energy-Efficient Routing in Wireless Sensor Networks
## 3 What We Have Investigated
### Simulation/Test Environment  
The adaptation that occurs within our network is the changing source gradient.  
The idea is to create something quite different to the previous three models. The first model was DD in a NetLogo environment. We created this model for comparison purposes. The second model, lazy diffusion, uses random transmission of interest and random retrieval of data.  
Our model description is shown in Figure 1 and Algorithm 1: Setting up the search for the event and return to sink.  
In each case, when a new source is generated an interest packet is generated to search for the source using the gradient generated from the source, as explained in Figure 2.  
This LD model statistically provides energy savings in the early searches, but the energy usage is dependent on the likelihood of reaching the source. The third model, GD uses a gradient from the sink for returning the event packet. Less energy is used with this model but not all runs reach the source. The challenge in the previous models is modeling a changing source location for optimizing the search for the source. In adapted diffusion, we created a gradient from the source that changes for each run, achieving significant energy savings and increasing the number of messages retrieved. We are working on the idea of creating gradients from both the sink and each of the sources. There is no reason to not have multiple gradients. That is, each node has a value for each gradient, which is the hop count from that source or sink.  
The nodes adapt to learn the distances of their neighbors from the sink and the source. This saves energy while searching but uses energy in creating the gradients (trade-offs).  
We know that nodes can discover the energy levels of neighbors. Interest packets traverse by moving up the gradient that is the shortest distance from the source, and then, moving event packets down the gradient that is the shortest distance to the sink from the appropriate source.  
When information is requested the generated interest packet approaches the source using the distance from source and selects one of the neighboring nodes closest to the source until the source is reached.  
Figure 1: Setting up the search for the event and return to sink.  
Figure 2: Repeat search for data.  
When the interest reaches the source, the event packet with the required information returns the requested data to the sink by moving to a neighbor closer to the sink until the sink is reached.  
In Figure 2, we describe the process for repeating the transmission with a new source to search for and retrieve the data. In each case, when a new source is generated an interest packet is generated to search for the source using the new gradient generated from the source, as explained in Figure 2.  
When the information reaches the sink, a new source is created with new information, with a new gradient from the new source. When a new request is generated, the process is repeated.  
Each time data are transferred as interest packet energy of transmission is depleted from the node used. Higher energy is used to return the data as the event packet has more data.  
The gradient we develop is the distance from the source and sink of the nodes in the system.