ns-allinone-2.35/ns-2.35/diffserv/ew.cc
void TBrateLimitor::adjustRate() {
  // pay the penalty
  adjustScore(-1);

  double rate = token_rate;
  if (p_score >= n_score)
    rate = token_rate * (1 + 0.2);
  else 
    rate = token_rate * (1 - 0.2);

  setRate(rate);
}
// adjust the rate limit to approaching an optimal rate limit
adjust the rate limit to approaching an optimal rate limit
adjust the rate limit to approaching an optimal rate limit
void TBrateLimitor::adjustRate() {
  adjustScore(-1);
  double rate = token_rate;
  if (p_score >= n_score)
    rate = token_rate * (1 + 0.2);
  else 
    rate = token_rate * (1 - 0.2);
  setRate(rate);
}
void TBrateLimitor :: adjustRate ( ) { adjustScore ( -1 ) ; double rate = token_rate ; if ( p_score >= n_score ) rate = token_rate * ( 1 + 0.2 ) ; else rate = token_rate * ( 1 - 0.2 ) ; setRate ( rate ) ; }
adjust the rate limit to approaching an optimal rate limit
adjust the rate limit to approaching an optimal rate limit
// pay the penalty