#runs many repetititions of a TCP connection to get good statistics

# Run NAM?
set WithNAM false

# Estimation of one-way latecy of wireless link
set FixTtl -1.7
#number of TCP connections/UDP ADUs
set Nconn 100

#interval between handover and its length
#3
set ho_len_min 3
#15
set ho_len_max 15

#interval between TCP connections
set connect_int 3000

#link parameters
set line_rate 30Kb
set prop_delay 300ms

#first delay is scheduled after this many secs
set first_delay 1

#size of FTP transfer 536*200 214400 107200 321600
set send_size 321600

set test_names {easy medi diff} 

#set ho_int_mins {120 100 40} 
#set ho_int_maxs {180 150 100} 
#set ho_int_mins {80 50 30}
#set ho_int_maxs {100 70 40}
set ho_int_mins {80 40 20}
set ho_int_maxs {140 80 40} 

exec echo "\nName\tEifel\tBuf\tTime\tSegs" >>tcp_goodput.txt
#Agent/TCP set maxrto_ 30
Agent/TCP set bugFix_ true  
Agent/TCP set timestamps_ true
#Agent/TCP set window_ 30 

set tcp_rcv TCPSink/DelAck
set tcp_snd TCP/Reno
set traffic TCP
set expire none
set drop_front_on false

#foreach tcp_snd {TCP/Sack packet} {
 foreach eifel {false true} {
  foreach buf_size {10KB 100KB} { 
    foreach i {0 1 2} {
	Agent/TCP set eifel_ $eifel
	set ho_int_min [lindex $ho_int_mins $i]
	set ho_int_max [lindex $ho_int_maxs $i]
	exec echo -n  "[lindex $test_names $i]\t$eifel\t$buf_size\t" >>tcp_goodput.txt
	source atp.tcl 
	run_atp
	set fn [join [concat [lindex $test_names $i] $eifel $buf_size] "_"]
	exec mv out.tr $fn
	puts "starting new set\n"
    }
}
# }
#}

