2525#include < map>
2626#include < iostream>
2727#include < fstream>
28+ #include < algorithm>
2829#include " ns3/core-module.h"
2930#include < sys/stat.h>
3031
@@ -43,6 +44,13 @@ std::string queueDisc = "QueueDisc";
4344uint32_t nAQM = 7 ;
4445std::string AggressiveTcp = " " ;
4546std::string QueueDiscMode = " QUEUE_DISC_MODE_PACKETS" ;
47+ std::string isBql = " false" ;
48+
49+ void RemoveAqm (std::string aqm)
50+ {
51+ AQM.erase (std::remove (AQM.begin (), AQM.end (), aqm), AQM.end ());
52+ nAQM--;
53+ }
4654
4755void RunOneScenario (std::string scenarioName)
4856{
@@ -52,11 +60,11 @@ void RunOneScenario (std::string scenarioName)
5260 std::string commandToRun;
5361 if (AggressiveTcp != " " && scenarioName == " AggressiveTransportSender" )
5462 {
55- commandToRun = std::string (" ./waf --run \" " ) + scenarioName + std::string (" --TcpVariant=ns3::" ) + AggressiveTcp + std::string (" --QueueDiscMode=" ) + QueueDiscMode + std::string (" \" " );
63+ commandToRun = std::string (" ./waf --run \" " ) + scenarioName + std::string (" --TcpVariant=ns3::" ) + AggressiveTcp + std::string (" --QueueDiscMode=" ) + QueueDiscMode + std::string (" --isBql= " ) + isBql + std::string ( " \" " );
5664 }
5765 else
5866 {
59- commandToRun = std::string (" ./waf --run \" " ) + scenarioName + std::string (" --QueueDiscMode=" ) + QueueDiscMode + std::string (" \" " );
67+ commandToRun = std::string (" ./waf --run \" " ) + scenarioName + std::string (" --QueueDiscMode=" ) + QueueDiscMode + std::string (" --isBql= " ) + isBql + std::string ( " \" " );
6068 }
6169 system (commandToRun.c_str ());
6270 std::ofstream outfile;
@@ -72,7 +80,7 @@ void RunOneScenario (std::string scenarioName)
7280 for (uint32_t i = 0 ; i < nAQM; i++)
7381 {
7482 std::string proQdelThr = std::string (" python src/aqm-eval-suite/utils/generate-ellipseinput.py " ) + scenarioName + " " + AQM[i] + queueDisc;
75- std::string proEllipse = std::string (" python src/aqm-eval-suite/utils/ellipsemaker " ) + scenarioName + " " + AQM[i] + queueDisc;
83+ std::string proEllipse = std::string (" python src/aqm-eval-suite/utils/ellipsemaker " ) + scenarioName + " " + AQM[i] + queueDisc + " " + std::to_string (i + 1 ) ;
7684 std::string plotGoodput = std::string (" python src/aqm-eval-suite/utils/goodput_process.py " ) + scenarioName + " " + AQM[i] + queueDisc;
7785 std::string plotDelay = std::string (" python src/aqm-eval-suite/utils/delay_process.py " ) + scenarioName + " " + AQM[i] + queueDisc;
7886 system (proQdelThr.c_str ());
@@ -109,7 +117,7 @@ void RunRttFairness (std::string scenarioName)
109117 mkdir ((std::string (" aqm-eval-output/" ) + scenarioName + std::string (" /data" )).c_str (), 0700 );
110118 mkdir ((std::string (" aqm-eval-output/" ) + scenarioName + std::string (" /graph" )).c_str (), 0700 );
111119 }
112- std::string commandToRun = std::string (" ./waf --run \" RttFairness" ) + std::string (" --QueueDiscMode=" ) + QueueDiscMode + std::string (" \" " );
120+ std::string commandToRun = std::string (" ./waf --run \" RttFairness" ) + std::string (" --QueueDiscMode=" ) + QueueDiscMode + std::string (" --isBql= " ) + isBql + std::string ( " \" " );
113121 system (commandToRun.c_str ());
114122 for (uint32_t i = 1 ; i <= 15 ; i++)
115123 {
@@ -129,7 +137,7 @@ void RunRttFairness (std::string scenarioName)
129137 for (uint32_t i = 0 ; i < nAQM; i++)
130138 {
131139 std::string proQdelThr = std::string (" python src/aqm-eval-suite/utils/generate-ellipseinput.py " ) + scenarioName + " " + AQM[i] + queueDisc;
132- std::string proEllipse = std::string (" python src/aqm-eval-suite/utils/ellipsemaker " ) + scenarioName + " " + AQM[i] + queueDisc;
140+ std::string proEllipse = std::string (" python src/aqm-eval-suite/utils/ellipsemaker " ) + scenarioName + " " + AQM[i] + queueDisc + " " + std::to_string (i + 1 ) ;
133141 std::string plotGoodput = std::string (" python src/aqm-eval-suite/utils/goodput_process.py " ) + scenarioName + " " + AQM[i] + queueDisc;
134142 std::string plotDelay = std::string (" python src/aqm-eval-suite/utils/delay_process.py " ) + scenarioName + " " + AQM[i] + queueDisc;
135143 std::string plotDrop = std::string (" python src/aqm-eval-suite/utils/drop_process.py " ) + scenarioName + " " + AQM[i] + queueDisc;
@@ -184,6 +192,7 @@ int main (int argc, char *argv[])
184192 cmd.AddValue (" name" , " Name of the scenario (eg: TCPFriendlySameInitCwnd)" , scenarioName);
185193 cmd.AddValue (" AggressiveTcp" , " Variant of the Aggressive TCP" , AggressiveTcp);
186194 cmd.AddValue (" QueueDiscMode" , " Determines the unit for QueueLimit" , QueueDiscMode);
195+ cmd.AddValue (" isBql" , " Enables/Disables Byte Queue Limits" , isBql);
187196
188197 cmd.Parse (argc, argv);
189198
0 commit comments