mac/ |
mobile/ |
common/ |
tools/ |
trace/ |
/ |
/dsdv |
mac-802_11.h mac-802_11.cc mac-timers.h mac-timers.cc mac.cc mac.h wireless-phy.cc arp.h arp.cc |
tworayground.cc |
scheduler.cc |
loss-monitor.cc loss-monitor.h |
cmu-trace.h |
autoconf.h Makefile |
dsdv.cc dsdv.h rtable.cc rtable.h |
udp.pl |
A test perl script to run udp traffic on
a star topology. it will call "ns run.tcl ....." |
run.tcl |
The mainl tcl script for a wireless simulaton. |
./topo/ |
topology tcl files such as star.tcl |
./traffic/ |
traffic generation tcl files such as udpstar.tcl |
./tmpres/ |
directory to store the analysis of trace |
./tmp/ |
store trace file ( not in cmu-trace format) |
./scripts/ |
other perl script |
grid.pl |
A test script to test grid topology |
nn.pl |
Anoter test script |
./results/ |
? |
numnodes |
? |
4 1 1536 640 0 0.85828125 0.817734375 0.0715234375which shows
$nn |
$triggerconstant |
$packetsize |
$control_len |
$angle |
$mm_thput |
$mac802_11_thput |
$mm_per_stream_thput |
4 |
1 |
1536 |
640 |
0 |
0.85 |
0.81 |
0.07152 |
struct part_list {A part_list is just a link table of nodes. Assign_goodness function is to set value based on the RTS request to neighbors, if it fails, a value 0 will be set. If it succeeds, a value 2 is set. Once a 2 is set, it is always regarded as "good". hashtable is just a double precision array. If the value is set to 2, it si always 2. Otherwise, it will forget with a gamma factor and the value will between (0,1). then a coin toss could make the node obey a neighbor's schedule with probability.
struct part_list *next;
u_int32_t nodeId;
};
void
BackoffTimer::faster(double constant) {
assert(paused_);// this is only called on immediately hearing an RTS. so backoff counter should have been paused right now.
else if (p->txinfo_.RxPr / pktRx_->txinfo_.RxPr > pktRx_->txinfo_.CPThresh && mhRecv_.age() < 1e+5) { ......The other suspicious lines related to 2nd capture is in IS_Idle_for_CTS:
//XXX : if we want second capture, only then should the followingStep 3.5 Find the fixed route of DSDV
//two lines be uncommented --sorav(7/7/02)
if (recvnav_ > Scheduler::instance().clock())
return 0;
// kick off periodic advertisments
periodic_callback_ = new Event ();
Scheduler::instance ().schedule (helper_,
periodic_callback_,
jitter (DSDV_STARTUP_JITTER, be_random_));
$ns_ at $opt(stopmonitor) "printnpkts_ $null_($i)"This is to print a numberof loss in one sink in the opt(trace) specifirf in run.tcl. After this, some perl scipts in udp.pl will calculate some results basen on this trace file stored like /tmp/trace-c640.mymac. The calculation is done by this way:
$mm_thput = 8*$packetsize*$mm_totalpkts/(($stopmonitor-$startmonitor)*1024*1024);From above, UDP throughput is measured as Mbps recorded in the /tmpres/outer.c640 file.
$mac802_11_thput = 8*$packetsize*$mac802_11_totalpkts/(($stopmonitor-$startmonitor)*1024*1024);
open (RESULTS,">>tmpres/outer.c640");
print RESULTS "$nn $triggerconstant $packetsize $control_len $angle $mm_thput $mac802_11_thput $mm_per_stream_thput\n";
close RESULTS;
Number of nodes |
802.11 Throughput Avg. |
Original |
MACA-P Througphut |
Original results |
2 |
0.8248828125 |
0.8221875 |
0.590625 |
0.5905078125 |
4 |
0.817734375 |
0.817734375 |
0.8574609375 |
0.85828125 |
6 |
0.81046875 |
0.8119921875 |
0.959296875 |
0.961640625 |
8 |
0.8199609375 |
0.8184375 |
1.6330078125 |
1.6339453125 |
10 |
0.813984375 |
0.8141015625 |
1.8010546875 |
1.806796875 |
12 |
0.8082421875 |
0.8096484375 |
0.7515234375 |
0.7365234375 |
14 |
0.8002734375 |
0.80484375 |
0.7812890625 |
0.783515625 |
16 |
0.808125 |
0.8115234375 |
1.0201171875 |
1.0098046875 |
18 |
0.8034375 |
0.8058984375 |
1.031015625 |
Number of nodes |
MACA-P Througphut (0us) |
4us |
40us |
400us |
4ms |
Original results |
2 |
0.590625 |
0.590625 |
0.590625 |
0.590625 |
0.590625 |
0.5905078125 |
4 |
0.4884375 |
0.4883203125 |
0.5501953125 |
0.8574609375 0 |
0.8574609375 |
0.8591015625 |
6 |
0.5724609375 |
0.5883984375 |
0.6167578125 |
0.959296875 |
0.959296875 |
0.7723828125 |
8 |
0.8279296875 |
0.8980078125 |
0.9945703125 |
1.621171875 |
1.621171875 |
0.9202734375 |
10 |
0.8712890625 |
1.021640625 |
1.08984375 |
1.80328125 |
1.80328125 |
0.8203125 |
12 |
0.6200390625 |
0.64546875 |
0.65332031 |
0.718125 |
0.7391015625 |
0.470859375 |
14 |
0.6219140625 |
0.66375 |
0.688359375 |
0.7529296875 |
0.7866796875 |
0.4810546875 |
16 |
0.622734375 |
0.708515625 |
0.720703125 |
0.983203125 |
1.01390625 |
0.526640625 |
18 |
0.5975390625 |
0.6891796875 |
0.7140234375 |
1.02234375 |
1.00921875 |
0.481171875 |
Number of nodes |
MACA-P Througphut (4us) |
2 |
0.590625 |
4 |
0.4883203125 |
6 |
0.5883984375 |
8 |
0.8963671875 |
10 |
1.026328125 |
12 |
0.465 |
14 |
0.5051953125 |
16 |
0.4946484375 |
18 |
0.5288671875 |
Grid Size |
MACA-P Througphut |
Original 802.11 results |
2 x 2 |
0.359765625 |
0.41484375 |
3 x 3 |
0.1470703125 |
0.1986328125 |
4 x 4 |
0.1248046875 |
0.16640625 0 |
5 x 5 |
0.097265625 |
0.1634765625 |
6 x 6 |
0.1083984375 |
0.15 |
7 x 7 |
0.092578125 |
0.1482421875 |
topology: |
670m x 670m |
nodes |
50 |
cbr cconnections |
10 ( start randomly from 10-150 sec) |
simulaiton time |
400 seconds |
awk '$5 ~ /^1$/ { print ($3,$4,$5) >> "new_adj"}' scen_godSimulation Results:
Results of each flow
( packets delivered) |
||
Flow |
Original 802.11 |
MACA-P |
1-35-2 1-3 2-35-3 8-35-9 8-10 9-10 9-11 10-11 11-16-12 11--1-13 |
npkts_ = 1027 npkts_ = 3407 npkts_ = 1279 npkts_ = 332 npkts_ = 1864 npkts_ = 2507 npkts_ = 3490 npkts_ = 3549 npkts_ = 840 npkts_ = 820 |
npkts_ = 1857 npkts_ = 3503 npkts_ = 1800 npkts_ = 312 npkts_ = 1433 npkts_ = 2171 npkts_ = 3151 npkts_ = 3554 npkts_ = 648 npkts_ = 700 |
19115 packets |
19129 packets |
Flow 1(14-3-2) |
Flow 2(0-1-4-7-10) |
Flow 3(13-8) |
Flow 4(12-9-5) |
Total (Mbps) |
|
80 |
772 |
673 |
356 |
251 |
0.08015625 |
90 |
773 |
648 |
344 |
253 |
0.078828125 |
100kbps |
757 |
631 |
317 |
265 |
0.076953125 |
110 |
812 |
641 |
299 |
237 |
0.0776953125 |
120 |
770 |
677 |
345 |
223 |
0.0787109375 |
130 |
807 |
643 |
332 |
247 |
0.0792578125 |
Flow 1(14-3-2) |
Flow 2(0-1-4-7-10) |
Flow 3(13-8) |
Flow 4(12-9-5) |
Total (Mbps) |
|
80 |
npkts_ = 2014 |
1923 |
1910 |
817 |
0.2603125 |
90 |
npkts_ = 2253 |
1845 |
1939 |
749 |
0.265078125 |
100kbps |
npkts_ = 2467 |
1782 |
1751 |
793 |
0.2653515625 |
110 |
npkts_ = 2732 |
1704 |
1818 |
730 |
0.2728125 |
120 |
npkts_ = 2970 |
1645 |
1807 |
644 |
0.276015625 |
130 |
npkts_ = 3152 |
1618 |
1770 |
609 |
0.2792578125 |
Control len= 640 |
Control-len = 128 |
|
Each column |
npkts_ = 1629 npkts_ = 1014 npkts_ = 931 npkts_ = 1621 |
npkts_ = 2025 npkts_ = 677 npkts_ = 670 npkts_ = 2031 |
Total (Mbps ) |
0.405859375 |
0.422109375 |
Control len= 640 |
Control-len = 128 |
|
Each column |
npkts_ = 1318 npkts_ = 666 npkts_ = 644 npkts_ = 1244 |
npkts_ = 2027 npkts_ = 338 npkts_ = 304 npkts_ = 2078 |
Total (Mbps ) |
0.3025 |
0.370859375 |