[General]
network = DiffservNetwork
sim-time-limit = 1250s
#cmdenv-express-mode = false

**.result-recording-modes =
**.scalar-recording = false
debug-statistics-recording = true

# default queues
**.queueType = "DropTailQueue"
**.queue.frameCapacity = 100
**.queue.dataQueue.frameCapacity = 100

[Config Apps]
**.H{1..8}.numUdpApps = 2 # 0 = voice, 1 = video

# voice streaming
**.H{1..4}.udpApp[0].typename = "UDPBasicBurst"
**.H1.udpApp[0].destAddresses = "H5"
**.H2.udpApp[0].destAddresses = "H6"
**.H3.udpApp[0].destAddresses = "H7"
**.H4.udpApp[0].destAddresses = "H8"
**.H{1..4}.udpApp[0].chooseDestAddrMode = "once"
**.H{1..4}.udpApp[0].destPort = 2000
**.H{1..4}.udpApp[0].startTime = uniform(1s,2s)
**.H{1..4}.udpApp[0].stopTime = 1200s
**.H{1..4}.udpApp[0].messageLength = 172B # 160B voice + 12B RTP header
**.H{1..4}.udpApp[0].burstDuration = exponential(0.352s)
**.H{1..4}.udpApp[0].sleepDuration = exponential(0.650s)
**.H{1..4}.udpApp[0].sendInterval = 20ms

**.H{5..8}.udpApp[0].typename = "UDPBasicBurst"
**.H{5..8}.udpApp[0].localPort = 2000
**.H{5..8}.udpApp[0].delayLimit = 0ms

**.H{5..8}.udpApp[0].destAddresses = ""
**.H{5..8}.udpApp[0].chooseDestAddrMode = "once"
**.H{5..8}.udpApp[0].destPort = 0
**.H{5..8}.udpApp[0].messageLength = 0B
**.H{5..8}.udpApp[0].burstDuration = 0s
**.H{5..8}.udpApp[0].sleepDuration = 0s
**.H{5..8}.udpApp[0].sendInterval = 0ms

# video streaming
**.H{1..4}.udpApp[1].typename = "UDPBasicApp"
**.H{1..4}.udpApp[1].destPort = 1000
**.H{1..4}.udpApp[1].startTime = uniform(1s,2s)
**.H{1..4}.udpApp[1].stopTime = 1200s
**.H{1..4}.udpApp[1].sendInterval = 40ms
**.H{1..4}.udpApp[1].messageLength = 500B
**.H1.udpApp[1].destAddresses = "H5"
**.H2.udpApp[1].destAddresses = "H6"
**.H3.udpApp[1].destAddresses = "H7"
**.H4.udpApp[1].destAddresses = "H8"

**.H{5..8}.udpApp[1].typename = "UDPSink"
**.H{5..8}.udpApp[1].localPort = 1000

#
# Experiment 1
#

[Config Exp1]
**.edgeDatarate = 500kbps
**.coreDatarate = 500kbps

**.R?.eth[*].ingressTCType = "TC1"
**.ingressTC.numClasses = 4
**.ingressTC.classifier.filters = xmldoc("filters.xml", "//experiment[@id='default']")
**.ingressTC.marker.dscps = "AF11 AF21 AF31 AF41 BE"

**.R?.ppp[*].queueType = "DSQueue1"
**.R?.ppp[*].queue.frameCapacity = 100

# statistics
**.H{1..4}.udpApp[*].sentPk.result-recording-modes = count
**.H{5..8}.udpApp[*].rcvdPk.result-recording-modes = count
**.H{5..8}.udpApp[*].endToEndDelay.result-recording-modes = vector # for computing median
**.R2.ppp[2].**Queue.rcvdPk.result-recording-modes = count
**.R2.ppp[2].**Queue.dropPk.result-recording-modes = count
**.R2.ppp[2].**Queue.queueLength.result-recording-modes = timeavg
**.R2.ppp[2].**Queue.queueingTime.result-recording-modes = vector # for computing median
**.udpApp[*].sentPk*.scalar-recording = true
**.udpApp[*].rcvdPk*.scalar-recording = true
**.udpApp[*].endToEndDelay*.scalar-recording = true
**.R2.ppp[2].**Queue.*.scalar-recording = true
**.afQueue.*.scalar-recording = true

[Config Exp11]
extends = Apps, Exp1
**.R?.ppp[*].queue.wrr.weights = "10 9 8 7 0"

[Config Exp12]
extends = Apps, Exp1
**.R?.ppp[*].queue.wrr.weights = "9 8 7 6 0"

[Config Exp13]
extends = Apps, Exp1
**.R?.ppp[*].queue.wrr.weights = "8 7 6 5 0"

[Config Exp14]
extends = Apps, Exp1
**.R?.ppp[*].queue.wrr.weights = "7 6 5 4 0"

[Config Exp15]
extends = Apps, Exp1
**.R?.ppp[*].queue.wrr.weights = "1 1 1 1 0"

[Config Exp16]
extends = Apps, Exp1
**.ingressTC.marker.dscps = "AF11 AF21 AF31 EF BE"
**.R?.ppp[*].queue.wrr.weights = "1 1 1 0 0"

[Config Exp17]
extends = Apps, Exp1

**.queueType = "DropTailQueue"
**.queue.frameCapacity = 400

#
# Experiment 2
#
[Config Exp2]
**.edgeDatarate = 10Mbps
**.coreDatarate = 500kbps

**.H4.numUdpApps = 1
**.H4.udpApp[0].typename = "UDPBasicApp"
**.H4.udpApp[0].destPort = 1000
**.H4.udpApp[0].startTime = uniform(1s,2s)
**.H4.udpApp[0].stopTime = 1200s
**.H4.udpApp[0].sendInterval = ${iaTime=400ms,200ms,133ms,100ms,80ms,67ms,57ms,50ms,44ms,40ms} #  rates: 10kbps,20kbps,...100kpbs
**.H4.udpApp[0].messageLength = 500B-20B-8B
**.H4.udpApp[0].destAddresses = "H8"

**.H8.numUdpApps = 1
**.H8.udpApp[0].typename = "UDPSink"
**.H8.udpApp[0].localPort = 1000

**.R?.eth[*].ingressTCType = "TC1"
**.ingressTC.numClasses = 4
**.ingressTC.classifier.filters = xmldoc("filters.xml", "//experiment[@id='default']")

**.R?.ppp[*].queueType = "DSQueue2"
**.R?.**.beQueue.frameCapacity = 100
**.R?.**.red.minths = "60 30 10"
**.R?.**.red.maxths = "100 70 40"
**.R?.**.red.maxps = "0.40 0.70 1.00"
**.R?.**.wrr.weights = "1 1"

# statistics
**.H{1..3}.udpApp[*].sentPk.result-recording-modes = count
**.H{5..7}.udpApp[*].rcvdPk.result-recording-modes = count
**.R2.ppp[2].queue.afQueue.queueLength.result-recording-modes = timeavg,vector
**.udpApp[*].sentPk*.scalar-recording = true
**.udpApp[*].rcvdPk*.scalar-recording = true
**.afQueue.*.scalar-recording = true

[Config Exp21]
extends = Exp2, Apps
**.ingressTC.marker.dscps = "AF11 AF12 AF13 AF11 BE"

[Config Exp22]
extends = Exp2, Apps
**.ingressTC.marker.dscps = "AF11 AF12 AF13 AF12 BE"

[Config Exp23]
extends = Exp2, Apps
**.ingressTC.marker.dscps = "AF11 AF12 AF13 AF13 BE"

[Config Exp24]
extends = Exp2, Apps
**.R?.eth[*].ingressTCType = ""
**.R?.ppp[*].queueType = "DropTailQueue"
**.R?.ppp[*].queue.frameCapacity = 100

#
# Experiment 3
#
[Config Exp3]
repeat = 3

**.edgeDatarate = 300kbps # TODO was 350kbps
**.coreDatarate = 300kbps # TODO was 350kbps

**.H2.numUdpApps = 0
**.H4.numUdpApps = 0

**.H1.numUdpApps = 3
**.H1.udpApp[2].typename = "UDPBasicApp"
**.H1.udpApp[2].destPort = 3000
**.H1.udpApp[2].startTime = uniform(1s,2s)
**.H1.udpApp[2].stopTime = 1200s
**.H1.udpApp[2].sendInterval = ${iaTime=400ms,200ms,133ms,100ms,80ms} #  rates: 10kbps,20kbps,...50kpbs
**.H1.udpApp[2].messageLength = 500B-20B-8B
**.H1.udpApp[2].destAddresses = "H5"

**.H5.numUdpApps = 3
**.H5.udpApp[2].typename = "UDPSink"
**.H5.udpApp[2].localPort = 3000

# statistics
**.H{1}.udpApp[*].sentPk.result-recording-modes = count
**.H{3}.udpApp[*].sentPk.result-recording-modes = count
**.H{5}.udpApp[*].rcvdPk.result-recording-modes = count
**.H{7}.udpApp[*].rcvdPk.result-recording-modes = count
**.udpApp[*].sentPk*.scalar-recording = true
**.udpApp[*].rcvdPk*.scalar-recording = true

[Config Exp31]
extends = Exp3, Apps

**.R?.eth[*].ingressTCType = "TC2"
**.ingressTC.meter.cir = "150kbps"
**.ingressTC.meter.cbs = 30000B
**.ingressTC.marker.dscps = "AF11 AF12"

**.R?.ppp[*].queueType = "DSQueue2"
**.R?.**.beQueue.frameCapacity = 100
**.R?.**.red.minths = "0 10 10"
**.R?.**.red.maxths = "100 50 50"
**.R?.**.red.maxps = "0.0 1.0 1.0"
**.R?.**.wrr.weights = "1 1"

[Config Exp32]
extends = Exp3, Apps

**.R?.eth[*].ingressTCType = "TC3"
**.ingressTC.meter.cir = "150kbps"
**.ingressTC.meter.cbs = 30000B

**.R?.ppp[*].queueType = "DropTailQueue"
**.R?.ppp[*].queue.frameCapacity = 200

[Config Exp33]
extends = Exp3, Apps
**.R?.ppp[*].queueType = "DropTailQueue"
**.R?.ppp[*].queue.frameCapacity = 200

[Config Exp5]
repeat = 3

**.edgeDatarate = 500kbps # XXX 600kbps
**.coreDatarate = 500kbps # XXX 600kbps

# statistics
**.H{1..4}.udpApp[*].sentPk.result-recording-modes = count
**.H{5..8}.udpApp[*].rcvdPk.result-recording-modes = count
**.H{5..8}.udpApp[*].endToEndDelay.result-recording-modes = vector # for computing median
**.R2.ppp[2].**Queue.rcvdPk.result-recording-modes = count
**.R2.ppp[2].**Queue.dropPk.result-recording-modes = count
**.R2.ppp[2].**Queue.queueLength.result-recording-modes = timeavg
**.R2.ppp[2].**Queue.queueingTime.result-recording-modes = vector # for computing median
**.udpApp[*].sentPk*.scalar-recording = true
**.udpApp[*].rcvdPk*.scalar-recording = true
**.udpApp[*].endToEndDelay*.scalar-recording = true
**.R2.ppp[2].**Queue.*.scalar-recording = true

[Config Exp51]
extends = Exp5, Apps

**.R?.eth[*].ingressTCType = "TC1"
**.ingressTC.numClasses = 3
**.ingressTC.classifier.filters = xmldoc("filters.xml", "//experiment[@id='5.1']")
**.ingressTC.marker.dscps = "EF AF11 AF21 BE" # BE is for ARP

**.R?.ppp[*].queueType = "DSQueue1"
**.R?.ppp[*].queue.frameCapacity = 100
**.R?.**.wrr.weights = "4 3 0 0 1"

[Config Exp52]
extends = Exp5, Apps

**.R?.ppp[*].egressTCType = ""
**.R?.ppp[*].queueType = "DropTailQueue"
**.R?.ppp[*].queue.frameCapacity = 200
