> > Hi again, > > On Fri, Nov 9, 2012 at 1:41 PM, <[email protected]> wrote: >>> ns-3 has no notion of processing delay as of now. >> >> Thanks Lalith for the information. >> My problem is that an element with the following code (for testing purposes) >> influences my simulation results. If I comment the lines for scheduling, the >> simulation results are ok. >> How can the following code influence the simulation result? The only thing >> the code does is configuring the scheduler for the next event. But the code >> does not produce packets for the simulation. >> Could someone explanin me how a code that only schedules itself can >> influence the simulation? >> >> >> int Foo::initialize( ErrorHandler * ) >> { >> _timer.initialize( this ); >> uint32_t start = ( random() % _period ); >> _timer.schedule_after_msec( start ); >> return 0; >> } >> >> void Foo::run_timer(Timer *) >> { >> int period = ( int ) ( _period * .95 + ( random() % ( _period / 10 ) >> ) ); >> _timer.reschedule_after_msec( period ); }
>The above snippet of code can end up changing the sequence of events that >arrive at ns-3's scheduler. >What I meant when I said that ns-3 does not model processing delay, is that >every packet is processed by an ns-3 node in 0.0 nanoseconds in simulation >time. If my scheduled dummy events (which do nothing) change the sequence of events arriving in the ns-3 scheduler and an event is processed in 0.0 nanoseconds in ns-3, then the other events are not delayed, aren't they? If I have three events A, B, and C and my code snippet will produce the events Y and Z. All events will be scheduled to the same time, e.g. 150 seconds. Could this change the processing order of A,B,C to C,A,B for example? I also recognized that if I add some dummy-events at 150 seconds of simulation time, also the simulation results before 150 seconds will change. How can this be? _______________________________________________ click mailing list [email protected] https://amsterdam.lcs.mit.edu/mailman/listinfo/click
