Algorithm SelectOptimalTP(){

low_tp=P1; high_tp=Pth; P opt = -1;

while(low_tp< high_tp) do{

mid_tp=(low_tp+high_tp)/2;

//ā€˜nā€™ forwarders under Tp = mid_tp

i = 1

if (ATDe < ATDth and AECe< AECth and ADRe > ADRth) {

Popt ā† Pmid_tp

high_tp = mid_tp;

}

else

low_tp = mid_tp + 1;

return popt;

}