###### Abstract  
Internet of things (IoT) is one of the leading technologies that have been used in many fields, such as environmental monitoring, healthcare, and smart cities. The core of IoT technologies is sensors; sensors in IoT form an autonomous network that is able to route messages from one place to another to the base station or the sink. Recently, due to the rapid technological development of sensors, wireless sensor networks (WSNs) have become an important part of IoT. However, in applications such as smart cities, WSNs with one sink might not be suitable due to the limited communication range of sensors and the wide area to be covered. Therefore, multi-sink WSN solutions seem to be suitable for such applications. The multi-sink WSNs are gaining popularity because they increase network throughput, network lifetime, and energy usage. At the same time, multi-hop routing is essential for the WSNs to collect data from sensor nodes and route it to the sink node for decision-making. Many routing algorithms developed for multi-sink WSNs focus on being energy efficient to extend the network lifetime, but the delay was not the main concern. However, these algorithms are unable to deal with such applications in which the data packets have to reach sink nodes within predefined real-time information. On the other hand, in the most existing routing schemes, the effects of the external environmental factors such as temperature and humidity and the reliability of real-time data delivery have largely been ignored. These issues can dramatically influence the network performance. Therefore, this paper designs a routing algorithm that satisfies three critical conditions: energy-efficient, real-time, environment-aware, and reliable routing. Therefore, the routing decisions are made according to different parameters. Such parameters include environmental impact metrics, energy balance metrics to balance the energy consumption among sensor nodes and sink nodes, desired deadline time (required delivery time), and wireless link quality. The problem is formed in integer linear programming (ILP) for optimal solution. The problem formulation is designed to fully understand the problem with its major constraints by the sensor networks research community. In addition, the optimal solution for small-scale problems could be used to measure the quality of any given heuristic that might be used to solve the same problem. Then, the paper proposes swarm intelligence to solve the optimization problem for large-scale multi-sink WSNs as a heuristic algorithm. The proposed algorithm is evaluated and analyzed compared with two recent algorithms, which are the most related to our proposal, SMRP and EERP protocols using an extensive set of experiments. The obtained results prove the superiority of the proposed algorithm over the compared algorithms in terms of packet delivery ratio, deadline miss ratio, average end-to-end delay, network lifetime, and energy imbalance factor under different aspects. In particular, the proposed algorithm requires more computational energy compared to comparison algorithms.  
multi-sink wireless sensor networks; environment-aware routing; swarm intelligence; reliability; energy efficient routing