Research Article

A Novel OBDD-Based Reliability Evaluation Algorithm for Wireless Sensor Networks on the Multicast Model

Pseudocode 5

Pseudocode for computing the reliability with the OBDD obtained by Construct_OBDD_Reliability_WSN.
Compute_Reliability_WSN(OBDD relBDD){
Queue.insert(relBDD); // Queue is a queue which is used to store the visited nodes of the relBDD
(relBDD) = 1;
 while (Queue is not empty){
   node  = Queue.getHead();
    low(node); // is the 0-node of node
   if ( is the terminal node which is 1)
    reliability = reliability + ; // is the operational probability of node
   else
    ;
   Queue.insert();
    = high(node); // is the 1-node of node
   if ( is the terminal node which is 1)
    reliability = reliability(node);
   else
    (node);
   Queue.insert();
 }
 return reliability;
}