hi to all!

 


I'm making simulation on multicast. In some sources, there is a functi=
on: assert(), such as in smcc.cc.


void TfmccAgent::increase_rate() {
 double now =3D Scheduler::=
instance().clock();
 double mult =3D (now - last_change_) / max_rtt=
_;
 if (mult > 2) mult =3D 2;
 
 //printf("stmp =
%f | %f -> ", now, rate_*8.0/1000.0);
 rate_ =3D MIN(expected_ra=
te, rate_ + (fairsize_/max_rtt_)*mult);
 //printf("%f step %f (min =
%f)\n", expected_rate*8.0/1000.0, rate_*8.0/1000.0, fairsize_/max_rtt_*8.0/=
1000.0);


 if (rate_ < fairsize_/max_rtt_)
  rate_ =3D fair=
size_/max_rtt_;


        last_change_ =3D now;


 if (packetrate_ =3D=3D 0) {
  // check if rate incr=
ease should impact send timer
  double next =3D size_/rate_;  if (inter_packet >=3D 2 * next) {
   ass=
ert(next > SMALLFLOAT);
   send_timer_.resched(next);<=
BR>  }
 }
}    


My question is what's the function of this assert()? Where can I find =
the defination, and when have i to use this function?

Reply via email to