User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 423,648 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,143 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 1801 | Replies: 4
Reply
Join Date: Jan 2005
Posts: 1
Reputation: leelingling630 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
leelingling630 leelingling630 is offline Offline
Newbie Poster

Solution Having problem in writting simulation on Random Early Detection (RED) using C++

  #1  
Jan 8th, 2005
Hello:

I am writting a simulation code on Random Early Detection (RED) and when i run the simulation , the average delay is too high. Does anybody have some idea on it.I really can't get along with it now withouth any help . :cry: Please help me!!!!!!!!!!!!!

I have upload the coding of mine. The file name called sim12.cpp.

Hope will get reply soon... through my email - email removed by moderator
Last edited by alc6379 : Jan 8th, 2005 at 11:19 am.
Attached Files
File Type: cpp sim12.CPP (8.5 KB, 38 views)
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2008
Posts: 1
Reputation: taptanh is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
taptanh taptanh is offline Offline
Newbie Poster

Re: Having problem in writting simulation on Random Early Detection (RED) using C++

  #2  
Aug 27th, 2008
hi!
i also do that. you can send it to me, ok? modified simulation code or code!
thank!
<email snipped>
Last edited by Ancient Dragon : Aug 27th, 2008 at 4:48 pm. Reason: snipped email
Reply With Quote  
Join Date: Jul 2008
Posts: 582
Reputation: ArkM is just really nice ArkM is just really nice ArkM is just really nice ArkM is just really nice 
Rep Power: 5
Solved Threads: 87
ArkM's Avatar
ArkM ArkM is offline Offline
Posting Pro

Re: Having problem in writting simulation on Random Early Detection (RED) using C++

  #3  
Aug 27th, 2008
You have a rather strange code to generate exponential distribution. Use RAND_MAX macros from <stdlib.h> (it's not equal to the funny pow expression).
  1. const double max_rand = RAND_MAX;
  2. ...
  3. ... log (x/max_rand) ...
With 32-bit compilers you have huge intervals because of (usually) RAND_MAX is equal 32767 only (rand() is a very bad pseudorandom numbers generator )...

Alas, I have no time to inspect your code more carefully now.
Reply With Quote  
Join Date: Dec 2005
Posts: 3,603
Reputation: Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of 
Rep Power: 22
Solved Threads: 414
Colleague
Salem's Avatar
Salem Salem is offline Offline
void main'ers are DOOMed

Re: Having problem in writting simulation on Random Early Detection (RED) using C++

  #4  
Aug 28th, 2008
> Alas, I have no time to inspect your code more carefully now.
Take your time, it was posted (and abandoned) on 8th Jan 2005
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
Do not PM me for help; You'll be ignored, or told to learn to read.
Do not ask me if I'm muslim - I'm not. Nor do I care about yours or anyone else's mysticism. Religion is a matrix, take the RED PILL.
Reply With Quote  
Join Date: Jul 2008
Posts: 582
Reputation: ArkM is just really nice ArkM is just really nice ArkM is just really nice ArkM is just really nice 
Rep Power: 5
Solved Threads: 87
ArkM's Avatar
ArkM ArkM is offline Offline
Posting Pro

Re: Having problem in writting simulation on Random Early Detection (RED) using C++

  #5  
Aug 28th, 2008
What's a nightmare!..
Thank you, Salem
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C++ Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C++ Forum

All times are GMT -4. The time now is 10:37 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC