@@ -61,20 +61,39 @@ RttFairness::~RttFairness ()
61
61
EvaluationTopology
62
62
RttFairness::CreateScenario (std::string aqm, bool isBql)
63
63
{
64
- uint32_t reqDelay = (delay[m_run] - 4 ) / 4 ;
64
+ double bottleneck;
65
+ double reqDelayConstRtt;
66
+ double reqDelay;
65
67
char OWD[20 ];
66
68
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);
68
86
sprintf (scenario, " %d" , m_run + 1 );
87
+ sprintf (bottleneckStr, " %fms" , bottleneck);
69
88
std::string scenarioName = std::string (" RttFairness" ) + std::string (scenario);
70
89
PointToPointHelper pointToPoint;
71
90
pointToPoint.SetDeviceAttribute (" DataRate" , StringValue (" 1Mbps" ));
72
- pointToPoint.SetChannelAttribute (" Delay" , StringValue (" 2ms " ));
91
+ pointToPoint.SetChannelAttribute (" Delay" , StringValue (bottleneckStr ));
73
92
uint32_t nflow = 2 ;
74
93
75
94
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 ),
78
97
StringValue (" 10Mbps" ),
79
98
StringValue (" 10Mbps" ),
80
99
" ns3::TcpNewReno" , 0 , DataRate (" 10Mb/s" ), 3 );
0 commit comments