Skip to content

Commit ab65694

Browse files
AparnaR16Viyom
authored andcommitted
Modify bottleneck delay in Rtt-fairness scenario
1 parent de1b540 commit ab65694

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

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

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,39 @@ RttFairness::~RttFairness ()
6161
EvaluationTopology
6262
RttFairness::CreateScenario (std::string aqm, bool isBql)
6363
{
64-
uint32_t reqDelay = (delay[m_run] - 4) / 4;
64+
double bottleneck;
65+
double reqDelayConstRtt;
66+
double reqDelay;
6567
char OWD[20];
6668
char scenario[20];
67-
sprintf (OWD, "%dms", reqDelay);
69+
char OWDConst[20];
70+
char bottleneckStr[20];
71+
if (delay[m_run] < 100)
72+
{
73+
bottleneck = delay[m_run] * 0.8 / 2;
74+
reqDelay = delay[m_run] * 0.2 / 4;
75+
reqDelayConstRtt = (50 - bottleneck) / 2;
76+
}
77+
else
78+
{
79+
bottleneck = 40;
80+
reqDelay = (delay[m_run] - 80) / 4;
81+
reqDelayConstRtt = 5;
82+
}
83+
84+
sprintf (OWD, "%fms", reqDelay);
85+
sprintf (OWDConst, "%fms", reqDelayConstRtt);
6886
sprintf (scenario, "%d", m_run + 1);
87+
sprintf (bottleneckStr, "%fms", bottleneck);
6988
std::string scenarioName = std::string ("RttFairness") + std::string (scenario);
7089
PointToPointHelper pointToPoint;
7190
pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("1Mbps"));
72-
pointToPoint.SetChannelAttribute ("Delay", StringValue ("2ms"));
91+
pointToPoint.SetChannelAttribute ("Delay", StringValue (bottleneckStr));
7392
uint32_t nflow = 2;
7493

7594
EvaluationTopology et (scenarioName, nflow, pointToPoint, aqm, 698, isBql);
76-
ApplicationContainer ac1 = et.CreateFlow (StringValue ("24ms"),
77-
StringValue ("24ms"),
95+
ApplicationContainer ac1 = et.CreateFlow (StringValue (OWDConst),
96+
StringValue (OWDConst),
7897
StringValue ("10Mbps"),
7998
StringValue ("10Mbps"),
8099
"ns3::TcpNewReno", 0, DataRate ("10Mb/s"), 3);

0 commit comments

Comments
 (0)