Research Article

Adaptive Fuzzy-Based Energy and Delay-Aware Routing Protocol for a Heterogeneous Sensor Network

Algorithm 2

Fuzzy_Logic_System ().
Output: Chance of becoming node j as the next node ()
(1)Empty the list
(2)Find membership values (, and ) and linguistic levels using Triangular membership function.
(3) {A rule set with all possible combinations of determined linguistic levels (from }
(4)for each rule in do
(5)if fit the membership levels of this rule
(6)  Add an entry to the list l with
(7)   maximum ()
(8)   output membership level of this rule
(9)end if
(10)end for
(11) Defuzzify (l)
(12)return