# Joint Energy Supply and Routing Path Selection for
## 3 A Joint Algorithm of Energy Supply and Routing Selection
### Two-Stage Energy Replenishment Strategy  
In rechargeable WSNs, for the sake of achieving satisfactory performances and sufficient network lifetime, it is necessary for the researchers to consider the related problems and design a reasonable energy replenishment strategy which cooperates with the routing. Firstly, the existing approaches mostly adopt mobile devices that can be applied to charge wirelessly all sensor nodes by moving along a certain path. However, the energy that the mobile device can carry at a single time has a certain ceiling in practical applications, that is, the energy supply capacity is limited, and so it is usually impossible and inappropriate to charge the entire network. When forcing the energy of all nodes to be replenished, it is likely that only a small amount of energy is obtained by each node, but it is hard to effectively delay the rapid energy decay of those dying nodes. Here, we consider nodes with low battery energy and/or high energy consumption as those dying nodes, or more precisely, these nodes are more likely to die from exhaustion. Secondly, after a period of operation of the network, the residual energy of each node can reflect the energy consumption rate of the node to a large extent, that is, generally speaking, the lower the residual energy is, the greater the energy consumption of the node, and vice versa. And when a node has many descendants, the remaining energy is usually lower due to the large amount of data forwarded, which means that there is a higher probability of death at the node during subsequent operations. Therefore, this subset of nodes should be the primary targets when considering the network energy supplement, and the remaining energy of sensor nodes will also affect how much energy each node obtains. Therefore, an energy replenishment strategy based on limited energy supply capacity of the WCD is proposed in this section. The strategy uses a single WCD to recharge the nodes from the start to the end of the sensor network operations, so that the network can get more energy. What's more, for the sake of replenishing the network as much as possible, the WCD should transfer all the limited energy it carries to the network, namely, there is a constant charging duration \(T_{c}\) under a fixed charging speed in this work. Firstly, taking into account the remaining energy of each node and the capacity of WCD, the charging time is allocated according to the proportion of the maximum chargeable time of each node (i.e., the time it takes to fully charge the battery). Secondly, according to a defined time update strategy, the charging time of each node is readjusted so that more energy is concentrated on the nodes with the most serious energy consumption, and the effectiveness of energy replenishment and energy utilization are improved. It should be noted that we do not consider the one-to-many charging scenario, and the wireless charging device can only charge one node at the same time. Specifically, our charging scheme is as follows. The initial energy of node \(i\) is \(E_{0}\), the current remaining energy is \(e_{i,t}\), and the charging speed of WCD is \(\Lambda_{c}\eta\), then the theoretically maximum charging time can be denoted as:  
\[t_{i}=\left(E_{0}-e_{i,t}\right)/\Lambda_{c}\eta \tag{4}\]  
where \(\Lambda_{c}\) is the energy consumption of WCD's charging operation, \(\eta\) represents the efficiency of converting and storing wireless energy, so \(\Lambda_{c}\eta\) denotes WCD's charging rate. Next, as mentioned above, the current energy level of node \(i\), which is equivalent to the maximum chargeable time, should play an important role in allocating the charging time.