Skip to content

Commit 3325868

Browse files
committed
Bug fixes and feature extensions
1 parent be78e2d commit 3325868

21 files changed

+215
-84
lines changed

README.md renamed to README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ type the command
5252
./waf configure --enable-examples
5353
followed by
5454
./waf
55-
in the the directory which contains
55+
in the directory which contains
5656
this README file. The files built will be copied in the
5757
build/ directory.
5858

src/aqm-eval-suite/examples/LBE-transport-sender.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ LbeTransportSender::CreateScenario (std::string aqm)
5959
pointToPoint.SetChannelAttribute ("Delay", StringValue ("48ms"));
6060
uint32_t nflow = 2;
6161

62-
EvaluationTopology et ("LbeTransportSender", nflow, pointToPoint, aqm, 1460);
62+
EvaluationTopology et ("LbeTransportSender", nflow, pointToPoint, aqm, 698);
6363
ApplicationContainer ac1 = et.CreateFlow (StringValue ("1ms"),
6464
StringValue ("1ms"),
6565
StringValue ("10Mbps"),
@@ -83,10 +83,12 @@ LbeTransportSender::CreateScenario (std::string aqm)
8383
int
8484
main (int argc, char *argv[])
8585
{
86+
std::string QueueDiscMode = "";
8687
CommandLine cmd;
88+
cmd.AddValue ("QueueDiscMode", "Determines the unit for QueueLimit", QueueDiscMode);
8789
cmd.Parse (argc, argv);
8890

8991
LbeTransportSender sce;
90-
sce.ConfigureQueueDisc (45, 1460, "1Mbps", "48ms");
92+
sce.ConfigureQueueDisc (45, 750, "1Mbps", "48ms", QueueDiscMode);
9193
sce.RunSimulation (Seconds (310));
9294
}

src/aqm-eval-suite/examples/aggressive-transport-sender.cc

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class AggressiveTransportSender : public ScenarioImpl
4343
protected:
4444
virtual EvaluationTopology CreateScenario (std::string aqm);
4545
};
46+
std::string AggressiveTcpVariant = "ns3::TcpBic";
4647

4748
AggressiveTransportSender::AggressiveTransportSender ()
4849
{
@@ -60,12 +61,12 @@ AggressiveTransportSender::CreateScenario (std::string aqm)
6061
pointToPoint.SetChannelAttribute ("Delay", StringValue ("48ms"));
6162
uint32_t nflow = 1;
6263

63-
EvaluationTopology et ("AggressiveTransportSender", nflow, pointToPoint, aqm, 1460);
64+
EvaluationTopology et ("AggressiveTransportSender", nflow, pointToPoint, aqm, 698);
6465
ApplicationContainer ac = et.CreateFlow (StringValue ("1ms"),
6566
StringValue ("1ms"),
6667
StringValue ("10Mbps"),
6768
StringValue ("10Mbps"),
68-
"ns3::TcpBic", 0, DataRate ("10Mb/s"), 3);
69+
AggressiveTcpVariant, 0, DataRate ("10Mb/s"), 3);
6970

7071
ac.Start (Seconds (0));
7172
ac.Stop (Seconds (300));
@@ -75,10 +76,17 @@ AggressiveTransportSender::CreateScenario (std::string aqm)
7576
int
7677
main (int argc, char *argv[])
7778
{
79+
std::string QueueDiscMode = "";
80+
std::string TcpVariant = "";
7881
CommandLine cmd;
82+
cmd.AddValue ("QueueDiscMode", "Determines the unit for QueueLimit", QueueDiscMode);
83+
cmd.AddValue ("TcpVariant", "Aggressive TCP variant", TcpVariant);
7984
cmd.Parse (argc, argv);
80-
85+
if ((TcpVariant == "ns3::TcpYeah") || (TcpVariant == "ns3::TcpBic") || (TcpVariant == "ns3::TcpHighSpeed") || (TcpVariant == "ns3::TcpIllinois") || (TcpVariant == "ns3::TcpScalable") || (TcpVariant == "ns3::TcpHtcp"))
86+
{
87+
AggressiveTcpVariant = TcpVariant;
88+
}
8189
AggressiveTransportSender sce;
82-
sce.ConfigureQueueDisc (45, 1460, "1Mbps", "48ms");
90+
sce.ConfigureQueueDisc (45, 750, "1Mbps", "48ms", QueueDiscMode);
8391
sce.RunSimulation (Seconds (310));
8492
}

src/aqm-eval-suite/examples/aqm-eval-suite-runner.cc

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,34 @@ std::vector<std::string> AQM = {
3535
"CoDel",
3636
"Pie",
3737
"Red",
38-
"AdaptiveRed"
38+
"AdaptiveRed",
39+
"FengAdaptiveRed",
40+
"NonLinearRed"
3941
};
4042
std::string queueDisc = "QueueDisc";
41-
uint32_t nAQM = 5;
43+
uint32_t nAQM = 7;
44+
std::string AggressiveTcp = "";
45+
std::string QueueDiscMode = "QUEUE_DISC_MODE_PACKETS";
4246

4347
void RunOneScenario (std::string scenarioName)
4448
{
4549
mkdir ((std::string ("aqm-eval-output/") + scenarioName).c_str (), 0700);
4650
mkdir ((std::string ("aqm-eval-output/") + scenarioName + (std::string ("/data"))).c_str (), 0700);
4751
mkdir ((std::string ("aqm-eval-output/") + scenarioName + (std::string ("/graph"))).c_str (), 0700);
48-
std::string commandToRun = std::string ("./waf --run ") + scenarioName;
52+
std::string commandToRun;
53+
if (AggressiveTcp != "" && scenarioName == "AggressiveTransportSender")
54+
{
55+
commandToRun = std::string ("./waf --run \"") + scenarioName + std::string (" --TcpVariant=ns3::") + AggressiveTcp + std::string (" --QueueDiscMode=") + QueueDiscMode + std::string ("\"");
56+
}
57+
else
58+
{
59+
commandToRun = std::string ("./waf --run \"") + scenarioName + std::string (" --QueueDiscMode=") + QueueDiscMode + std::string ("\"");
60+
}
4961
system (commandToRun.c_str ());
5062
std::ofstream outfile;
5163
outfile.open ((std::string ("aqm-eval-output/") + scenarioName + std::string ("/data/plot-shell")).c_str (), std::ios::out | std::ios::trunc);
52-
outfile << "set terminal png size 500, 350\n";
64+
outfile << "set terminal png size 600, 350\n";
65+
outfile << "set size .9, 1\n";
5366
outfile << "set output \"aqm-eval-output/" << scenarioName.c_str () << "/graph/qdel-goodput.png\"\n set xlabel \"Queue Delay (ms)\" font \"Verdana\"\nset ylabel \"Goodput (Mbps)\" font \"Verdana\"\n";
5467
outfile << "set xrange[] reverse\nset grid\nshow grid\n";
5568
outfile.close ();
@@ -61,9 +74,11 @@ void RunOneScenario (std::string scenarioName)
6174
std::string proQdelThr = std::string ("python src/aqm-eval-suite/utils/generate-ellipseinput.py ") + scenarioName + " " + AQM[i] + queueDisc;
6275
std::string proEllipse = std::string ("python src/aqm-eval-suite/utils/ellipsemaker ") + scenarioName + " " + AQM[i] + queueDisc;
6376
std::string plotGoodput = std::string ("python src/aqm-eval-suite/utils/goodput_process.py ") + scenarioName + " " + AQM[i] + queueDisc;
77+
std::string plotDelay = std::string ("python src/aqm-eval-suite/utils/delay_process.py ") + scenarioName + " " + AQM[i] + queueDisc;
6478
system (proQdelThr.c_str ());
6579
system (proEllipse.c_str ());
6680
system (plotGoodput.c_str ());
81+
system (plotDelay.c_str ());
6782
std::string graphName = std::string ("\"aqm-eval-output/") + scenarioName + std::string ("/data/") + AQM[i] + queueDisc + std::string ("-ellipse.dat\" notitle with lines");
6883
if (i != nAQM - 1)
6984
{
@@ -93,8 +108,8 @@ void RunRttFairness (std::string scenarioName)
93108
mkdir ((std::string ("aqm-eval-output/") + scenarioName).c_str (), 0700);
94109
mkdir ((std::string ("aqm-eval-output/") + scenarioName + std::string ("/data")).c_str (), 0700);
95110
mkdir ((std::string ("aqm-eval-output/") + scenarioName + std::string ("/graph")).c_str (), 0700);
96-
}
97-
std::string commandToRun = std::string ("./waf --run RttFairness");
111+
}
112+
std::string commandToRun = std::string ("./waf --run \"RttFairness") + std::string (" --QueueDiscMode=") + QueueDiscMode + std::string ("\"");
98113
system (commandToRun.c_str ());
99114
for (uint32_t i = 1; i <= 15; i++)
100115
{
@@ -103,7 +118,8 @@ void RunRttFairness (std::string scenarioName)
103118
scenarioName = orig + std::string (sce);
104119
std::ofstream outfile;
105120
outfile.open ((std::string ("aqm-eval-output/") + scenarioName + std::string ("/data/plot-shell")).c_str (), std::ios::out | std::ios::trunc);
106-
outfile << "set terminal png size 500, 350\n";
121+
outfile << "set terminal png size 600, 350\n";
122+
outfile << "set size .9, 1\n";
107123
outfile << "set output \"aqm-eval-output/" << scenarioName.c_str () << "/graph/qdel-goodput.png\"\n set xlabel \"Queue Delay (ms)\" font \"Verdana\"\nset ylabel \"Goodput (Mbps)\" font \"Verdana\"\n";
108124
outfile << "set xrange[] reverse\nset grid\nshow grid\n";
109125
outfile.close ();
@@ -115,10 +131,12 @@ void RunRttFairness (std::string scenarioName)
115131
std::string proQdelThr = std::string ("python src/aqm-eval-suite/utils/generate-ellipseinput.py ") + scenarioName + " " + AQM[i] + queueDisc;
116132
std::string proEllipse = std::string ("python src/aqm-eval-suite/utils/ellipsemaker ") + scenarioName + " " + AQM[i] + queueDisc;
117133
std::string plotGoodput = std::string ("python src/aqm-eval-suite/utils/goodput_process.py ") + scenarioName + " " + AQM[i] + queueDisc;
134+
std::string plotDelay = std::string ("python src/aqm-eval-suite/utils/delay_process.py ") + scenarioName + " " + AQM[i] + queueDisc;
118135
std::string plotDrop = std::string ("python src/aqm-eval-suite/utils/drop_process.py ") + scenarioName + " " + AQM[i] + queueDisc;
119136
system (proQdelThr.c_str ());
120137
system (proEllipse.c_str ());
121138
system (plotGoodput.c_str ());
139+
system (plotDelay.c_str ());
122140
system (plotDrop.c_str ());
123141
std::string graphName = std::string ("\"aqm-eval-output/") + scenarioName + std::string ("/data/") + AQM[i] + queueDisc + std::string ("-ellipse.dat\" notitle with lines");
124142
if (i != nAQM - 1)
@@ -164,6 +182,8 @@ int main (int argc, char *argv[])
164182
CommandLine cmd;
165183
cmd.AddValue ("number", "Scenario number from RFC", scenarioNumber);
166184
cmd.AddValue ("name", "Name of the scenario (eg: TCPFriendlySameInitCwnd)", scenarioName);
185+
cmd.AddValue ("AggressiveTcp", "Variant of the Aggressive TCP", AggressiveTcp);
186+
cmd.AddValue ("QueueDiscMode", "Determines the unit for QueueLimit", QueueDiscMode);
167187

168188
cmd.Parse (argc, argv);
169189

src/aqm-eval-suite/examples/bidirectional-traffic.cc

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ BiDirectional::CreateScenario (std::string aqm)
5656
pointToPoint.SetChannelAttribute ("Delay", StringValue ("45ms"));
5757
uint32_t nflow = 0.036 * 90;
5858

59-
EvaluationTopology et ("BiDirectional", nflow, pointToPoint, aqm);
59+
EvaluationTopology et ("BiDirectional", nflow, pointToPoint, aqm, 698);
6060
for (uint32_t i = 0; i < nflow; i++)
6161
{
6262
if ( i >= (nflow / 2))
@@ -65,19 +65,19 @@ BiDirectional::CreateScenario (std::string aqm)
6565
StringValue ("1ms"),
6666
StringValue ("10Mbps"),
6767
StringValue ("10Mbps"),
68-
"ns3::TcpNewReno", 0, DataRate("10Mb/s"), 3);
69-
ac.Start (Seconds ((i*nflow)/nflow));
70-
ac.Stop (Seconds (300 + (i*nflow)/nflow));
68+
"ns3::TcpNewReno", 0, DataRate ("10Mb/s"), 3);
69+
ac.Start (Seconds ((i * nflow) / nflow));
70+
ac.Stop (Seconds (300 + (i * nflow) / nflow));
7171
}
7272
else
7373
{
7474
ApplicationContainer ac = et.CreateFlow (StringValue ("1ms"),
7575
StringValue ("1ms"),
7676
StringValue ("10Mbps"),
7777
StringValue ("10Mbps"),
78-
"ns3::TcpNewReno", 0, DataRate("10Mb/s"), 3, true);
79-
ac.Start (Seconds ((i*nflow)/nflow));
80-
ac.Stop (Seconds (300 + (i*nflow)/nflow));
78+
"ns3::TcpNewReno", 0, DataRate ("10Mb/s"), 3, true);
79+
ac.Start (Seconds ((i * nflow) / nflow));
80+
ac.Stop (Seconds (300 + (i * nflow) / nflow));
8181
}
8282

8383
}
@@ -87,10 +87,12 @@ BiDirectional::CreateScenario (std::string aqm)
8787
int
8888
main (int argc, char *argv[])
8989
{
90+
std::string QueueDiscMode = "";
9091
CommandLine cmd;
92+
cmd.AddValue ("QueueDiscMode", "Determines the unit for QueueLimit", QueueDiscMode);
9193
cmd.Parse (argc, argv);
9294

9395
BiDirectional sce;
94-
sce.ConfigureQueueDisc (45, 1460, "1Mbps", "48ms");
96+
sce.ConfigureQueueDisc (45, 750, "1Mbps", "48ms", QueueDiscMode);
9597
sce.RunSimulation (Seconds (310));
9698
}

src/aqm-eval-suite/examples/heavy-congestion.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ HeavyCongestion::CreateScenario (std::string aqm)
5959
pointToPoint.SetChannelAttribute ("Delay", StringValue ("48ms"));
6060
uint32_t nflow = 0.114 * 90;
6161

62-
EvaluationTopology et ("HeavyCongestion", nflow, pointToPoint, aqm, 1460);
62+
EvaluationTopology et ("HeavyCongestion", nflow, pointToPoint, aqm, 698);
6363
for (uint32_t i = 0; i < nflow; i++)
6464
{
6565
ApplicationContainer ac = et.CreateFlow (StringValue ("1ms"),
@@ -77,10 +77,12 @@ HeavyCongestion::CreateScenario (std::string aqm)
7777
int
7878
main (int argc, char *argv[])
7979
{
80+
std::string QueueDiscMode = "";
8081
CommandLine cmd;
82+
cmd.AddValue ("QueueDiscMode", "Determines the unit for QueueLimit", QueueDiscMode);
8183
cmd.Parse (argc, argv);
8284

8385
HeavyCongestion sce;
84-
sce.ConfigureQueueDisc (45, 1460, "1Mbps", "48ms");
86+
sce.ConfigureQueueDisc (45, 750, "1Mbps", "48ms", QueueDiscMode);
8587
sce.RunSimulation (Seconds (310));
8688
}

src/aqm-eval-suite/examples/medium-congestion.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ MediumCongestion::CreateScenario (std::string aqm)
5959
pointToPoint.SetChannelAttribute ("Delay", StringValue ("48ms"));
6060
uint32_t nflow = 0.081 * 90;
6161

62-
EvaluationTopology et ("MediumCongestion", nflow, pointToPoint, aqm, 1460);
62+
EvaluationTopology et ("MediumCongestion", nflow, pointToPoint, aqm, 698);
6363
for (uint32_t i = 0; i < nflow; i++)
6464
{
6565
ApplicationContainer ac = et.CreateFlow (StringValue ("1ms"),
@@ -77,10 +77,12 @@ MediumCongestion::CreateScenario (std::string aqm)
7777
int
7878
main (int argc, char *argv[])
7979
{
80+
std::string QueueDiscMode = "";
8081
CommandLine cmd;
82+
cmd.AddValue ("QueueDiscMode", "Determines the unit for QueueLimit", QueueDiscMode);
8183
cmd.Parse (argc, argv);
8284

8385
MediumCongestion sce;
84-
sce.ConfigureQueueDisc (45, 1460, "1Mbps", "48ms");
86+
sce.ConfigureQueueDisc (45, 750, "1Mbps", "48ms", QueueDiscMode);
8587
sce.RunSimulation (Seconds (310));
8688
}

src/aqm-eval-suite/examples/mild-congestion.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ MildCongestion::CreateScenario (std::string aqm)
5959
pointToPoint.SetChannelAttribute ("Delay", StringValue ("45ms"));
6060
uint32_t nflow = 0.036 * 90;
6161

62-
EvaluationTopology et ("MildCongestion", nflow, pointToPoint, aqm);
62+
EvaluationTopology et ("MildCongestion", nflow, pointToPoint, aqm, 698);
6363
for (uint32_t i = 0; i < nflow; i++)
6464
{
6565
ApplicationContainer ac = et.CreateFlow (StringValue ("1ms"),
@@ -77,10 +77,12 @@ MildCongestion::CreateScenario (std::string aqm)
7777
int
7878
main (int argc, char *argv[])
7979
{
80+
std::string QueueDiscMode = "";
8081
CommandLine cmd;
82+
cmd.AddValue ("QueueDiscMode", "Determines the unit for QueueLimit", QueueDiscMode);
8183
cmd.Parse (argc, argv);
8284

8385
MildCongestion sce;
84-
sce.ConfigureQueueDisc (45, 1460, "1Mbps", "48ms");
86+
sce.ConfigureQueueDisc (45, 750, "1Mbps", "48ms", QueueDiscMode);
8587
sce.RunSimulation (Seconds (310));
8688
}

src/aqm-eval-suite/examples/rtt-fairness.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ RttFairness::CreateScenario (std::string aqm)
7272
pointToPoint.SetChannelAttribute ("Delay", StringValue ("2ms"));
7373
uint32_t nflow = 2;
7474

75-
EvaluationTopology et (scenarioName, nflow, pointToPoint, aqm, 1460);
75+
EvaluationTopology et (scenarioName, nflow, pointToPoint, aqm, 698);
7676
ApplicationContainer ac1 = et.CreateFlow (StringValue ("24ms"),
7777
StringValue ("24ms"),
7878
StringValue ("10Mbps"),
@@ -96,13 +96,15 @@ RttFairness::CreateScenario (std::string aqm)
9696
int
9797
main (int argc, char *argv[])
9898
{
99+
std::string QueueDiscMode = "";
99100
CommandLine cmd;
101+
cmd.AddValue ("QueueDiscMode", "Determines the unit for QueueLimit", QueueDiscMode);
100102
cmd.Parse (argc, argv);
101103

102104
for (uint32_t i = 0; i < 15; i++)
103105
{
104106
RttFairness rf (i);
105-
rf.ConfigureQueueDisc (45, 1460, "1Mbps", "2ms");
107+
rf.ConfigureQueueDisc (45, 750, "1Mbps", "2ms", QueueDiscMode);
106108
rf.RunSimulation (Seconds (610));
107109
}
108110
}

src/aqm-eval-suite/examples/single-unresponsive-transport.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ UnresponsiveTransport::CreateScenario (std::string aqm)
5959
pointToPoint.SetChannelAttribute ("Delay", StringValue ("48ms"));
6060
uint32_t nflow = 1;
6161

62-
EvaluationTopology et ("UnresponsiveTransport", nflow, pointToPoint, aqm, 1460);
62+
EvaluationTopology et ("UnresponsiveTransport", nflow, pointToPoint, aqm, 698);
6363
ApplicationContainer ac = et.CreateFlow (StringValue ("1ms"),
6464
StringValue ("1ms"),
6565
StringValue ("10Mbps"),
@@ -74,10 +74,12 @@ UnresponsiveTransport::CreateScenario (std::string aqm)
7474
int
7575
main (int argc, char *argv[])
7676
{
77+
std::string QueueDiscMode = "";
7778
CommandLine cmd;
79+
cmd.AddValue ("QueueDiscMode", "Determines the unit for QueueLimit", QueueDiscMode);
7880
cmd.Parse (argc, argv);
7981

8082
UnresponsiveTransport sce;
81-
sce.ConfigureQueueDisc (45, 1460, "1Mbps", "48ms");
83+
sce.ConfigureQueueDisc (45, 750, "1Mbps", "48ms", QueueDiscMode);
8284
sce.RunSimulation (Seconds (310));
8385
}

0 commit comments

Comments
 (0)