#!/usr/bin/perl 

# Multiple Bottlenecks experiment (Section IV-E, Figure 10a DropTail)

@bkgflowset = (100,128,160,180,192);
$bnqueuetype = 0; # DropTail Bottleneck
$bnqueuetype2 = 0; # DropTail Bottleneck
$bnbw = "15Mb";
$bnbw2 = "15Mb";
$bnqueue = 150;
$bnqueue2 = 150;
$simtime = 1000.0;


qx!rm -f sim.data!;
foreach $bkgflows (@bkgflowset) {
	$httpflows = ( 75 * $bkgflows ) / 100;
	$ftpflows = ( 25 * $bkgflows ) / 100;
	$time = qx!date!; print("\nStart time: $time"); 
	print "\n>./ns httpm.tcl -fgrtt 0.07499 -bnqueuetype $bnqueuetype -bnbw $bnbw -bnqueue $bnqueue  -bnqueuetype2 $bnqueuetype2 -bnbw2 $bnbw2 -bnqueue2 $bnqueue2  -ftpbkgflows $ftpflows -httpbkgflows $httpflows -simtime $simtime ";
	qx!rm bnlink.data!;
	$output = qx!./ns httpm.tcl -fgrtt 0.07499 -bnqueuetype $bnqueuetype -bnbw $bnbw -bnqueue $bnqueue  -bnqueuetype2 $bnqueuetype2 -bnbw2 $bnbw2 -bnqueue2 $bnqueue2  -ftpbkgflows $ftpflows -httpbkgflows $httpflows -simtime $simtime !;
	print "\n$output\n";
	qx!cat bnlink.data >> sim.data !;
	$time = qx!date!; print("\nEnd time: $time"); 
}
