Mohit Tahiliani has been working on Adaptive RED in ns-2, and has patched a few issues, including:
While the default values of some parameters (such as thresh_, maxthresh_, q_weight_) were changed in 2001 to make ARED as the default RED mechanism in ns-2, those of others parameters were
left unchanged. The resulting code defaults to something that is neither RED nor ARED; this patch will fix the default to ARED.
Attached patch will make various tests fail; need to re-validate them.
validate overall report: some tests failed:
./test-all-simple ./test-all-tcp ./test-all-sack-full ./test-all-tcp-init-win ./test-all-aimd ./test-all-tcpLinux ./test-all-tcpHighspeed ./test-all-friendly ./test-all-ecn ./test-all-ecn-ack ./test-all-ecn-full ./test-all-red ./test-all-adaptive-red ./test-all-red-pd ./test-all-schedule
Attached wireless2.tcl example can be used as an example (and is intended for tcl/ex directory).
After further investigation, it was discovered that there is a distinction between "adaptive RED" and "automatic configuration of RED", and that the latter was intended as the default ns-2 model (as described here:
http://www.icir.org/floyd/red.html#parameters)
The revised patch attached fixes the FPE issue with wireless adaptive RED, leaving other defaults unchanged.