
[General]
cmdenv-config-name = perftest
cmdenv-express-mode = true
ned-path = ../../../MiXiM/base;../../../MiXiM/modules;../../../MiXiM/examples;
network = baseSim


##########################################################
#			Simulation parameters                        #
##########################################################
num-rngs = 1
seed-0-mt = 1200
tkenv-default-config = 
baseSim.**.coreDebug = false
baseSim.playgroundSizeX = 1000m
baseSim.playgroundSizeY = 1000m
baseSim.playgroundSizeZ = 1000m
baseSim.numNodes = 100

##########################################################
#			WorldUtility parameters                      #
##########################################################
baseSim.world.use2D = true
baseSim.world.useTorus = false

baseSim.world.checkTime = 1.0 	# Check number of alive nodes
								# every X seconds

##########################################################
#			         channel parameters                  #
##########################################################
baseSim.connectionManager.sendDirect = false
baseSim.connectionManager.pMax = 10000mW
baseSim.connectionManager.sat = -91dBm
baseSim.connectionManager.alpha = 3.0
baseSim.connectionManager.carrierFrequency = 2.412e+9Hz


##########################################################
#      baseStation and node common module parameters     #
##########################################################


################ PhyLayer parameters #####################
baseSim.*.nic.phy.thermalNoise = -100dBm
        
baseSim.*.nic.phy.analogueModels = xmldoc("config.xml")
baseSim.*.nic.phy.decider = xmldoc("config.xml")

baseSim.*.nic.phy.timeRXToTX = 0.00021s
baseSim.*.nic.phy.timeRXToSleep = 0.000031s

baseSim.*.nic.phy.timeTXToRX = 0.00012s
baseSim.*.nic.phy.timeTXToSleep = 0.000032s

baseSim.*.nic.phy.timeSleepToRX = 0.000102s
baseSim.*.nic.phy.timeSleepToTX = 0.000203s

baseSim.*.nic.phy.sensitivity = -89dBm
baseSim.*.nic.phy.maxTXPower = 10000mW

baseSim.*.nic.phy.initialRadioState = 0


################ MAC layer parameters ####################
baseSim.*.nic.mac.queueLength = 5
baseSim.*.nic.mac.headerLength = 24
baseSim.*.nic.mac.slotDuration = 0.04s
baseSim.*.nic.mac.difs = 0.0005s
baseSim.*.nic.mac.maxTxAttempts = 14
baseSim.*.nic.mac.defaultChannel = 0
baseSim.*.nic.mac.bitrate = 15360bps		 #15kbps
baseSim.*.nic.mac.contentionWindow = 45


################ NETW layer parameters ####################
baseSim.*.net.headerLength = 32bit


################ APPL layer parameters ####################
baseSim.*.appl.headerLength = 1024bit


######### Layer-specific configuration parameters #########
baseSim.*.nic.phy.usePropagationDelay = false
baseSim.*.nic.phy.useThermalNoise = true

baseSim.*.net.debug = false
baseSim.*.net.stats = false

baseSim.*.appl.debug = false

baseSim.*.mobility.debug = false


##########################################################
#			   node-specific parameters                  #
##########################################################

################ PHY layer parameters ####################
baseSim.node[*].nic.phy.rxEnergy = 50e-9	#Transmitter consumption (J/bit)
baseSim.node[*].nic.phy.txEnergy = 50e-9	#Receiver comsumption (J/bit)
baseSim.node[*].nic.phy.amplifierEnergy = 0.1e-9	#Amplifier consumption (J/bit/m^2)


################ MAC layer parameters ####################
baseSim.node[*].nic.mac.txPower = 500mW  # [mW]
baseSim.node[*].nic.mac.highTxPower = 10000mW  # [mW]


################ NETW layer parameters ###################
baseSim.node[*].appl.sensingTime = 60


################ Mobility parameters #####################
baseSim.node[*].mobility.x = uniform(0,1000)
baseSim.node[*].mobility.y = uniform(0,1000)
baseSim.node[*].mobility.z = 10

baseSim.node[*].mobility.speed = 1mps
baseSim.node[*].mobility.updateInterval = 0.5s


################ battery parameters #################
baseSim.node[*].battery.capacity = 5 #in Joules
baseSim.node[*].battery.resolution = 0.5s
baseSim.node[*].battery.numDevices = 1

# publish to Stats every 5% change and every 1s (subject to resolution)
baseSim.node[*].battery.publishDelta = 0.05
baseSim.node[*].battery.publishTime = 1s


######### Layer-specific configuration parameters ########
baseSim.node[*].applType = "DataGeneratorLayer"
baseSim.node[*].mobType = "ExtendedConstSpeedMobility"
baseSim.node[*].netwType = "DirectTransmission"
baseSim.node[*].battery.debug = false 
baseSim.node[*].batteryStats.debug = false 	
baseSim.node[*].batteryStats.timeSeries = false 	



##########################################################
#			   node-specific parameters                  #
##########################################################

################ PhyLayer parameters #####################


################ MAC layer parameters ####################
baseSim.baseStation.nic.mac.txPower = 10000mW  # [mW]


################ NETW layer parameters ####################



################ APPL layer parameters ####################



################ Mobility parameters #####################
baseSim.baseStation.mobility.x = 10
baseSim.baseStation.mobility.y = 10
baseSim.baseStation.mobility.z = 10

baseSim.baseStation.mobility.speed = 0mps
baseSim.baseStation.mobility.updateInterval = 1s


######### Layer-specific configuration parameters #########
baseSim.baseStation.applType = "BSApplLayer"
baseSim.baseStation.mobType = "ExtendedConstSpeedMobility"
baseSim.baseStation.netwType = "BSNetwLayer"




# -------------------------------------------
# =    *************************			=
# =    ***       TESTS       ***			=
# =	   *************************			=
# -------------------------------------------



#[Config Packet128sensing30s]
#output-scalar-file = ${resultdir}/128bits/sensing=30s/v=${runnumber}s.sca
#output-vector-file = ${resultdir}/128bits/sensing=30s/v=${runnumber}s.vec
#baseSim.node[*].appl.headerLength = 128bit
#baseSim.node[*].appl.sensingTime = 30
#baseSim.node[*].mobility.speed = ${0, 1, 2, 4}mps
#
#[Config Packet128sensing60s]
#output-scalar-file = ${resultdir}/128bits/sensing=60s/v=${runnumber}s.sca
#output-vector-file = ${resultdir}/128bits/sensing=60s/v=${runnumber}s.vec
#baseSim.*.appl.headerLength = 128bit
#baseSim.*.appl.sensingTime = 60
#baseSim.node[*].mobility.speed = ${0, 1, 2, 4}mps
#
#[Config Packet128sensing120s]
#output-scalar-file = ${resultdir}/128bits/sensing=120s/v=${runnumber}s.sca
#output-vector-file = ${resultdir}/128bits/sensing=120s/v=${runnumber}s.vec
#baseSim.*.appl.headerLength = 128bit
#baseSim.*.appl.sensingTime = 120
#baseSim.node[*].mobility.speed = ${0, 1, 2, 4}mps
#
#[Config Packet128sensing240s]
#output-scalar-file = ${resultdir}/128bits/sensing=240s/v=${runnumber}s.sca
#output-vector-file = ${resultdir}/128bits/sensing=240s/v=${runnumber}s.vec
#baseSim.*.appl.headerLength = 128bit
#baseSim.*.appl.sensingTime = 240
#baseSim.node[*].mobility.speed = ${0, 1, 2, 3, 4, 5}mps

#-----------------------------------------------------------------------

[Config Packet256sensing30s]
output-scalar-file = ${resultdir}/256bits/sensing=30s/v=${runnumber}s.sca
output-vector-file = ${resultdir}/256bits/sensing=30s/v=${runnumber}s.vec
baseSim.*.appl.headerLength = 256bit
baseSim.node[*].appl.sensingTime = 30
baseSim.node[*].mobility.speed = ${0, 1, 2, 4}mps

[Config Packet256sensing60s]
output-scalar-file = ${resultdir}/256bits/sensing=60s/v=${runnumber}s.sca
output-vector-file = ${resultdir}/256bits/sensing=60s/v=${runnumber}s.vec
baseSim.*.appl.headerLength = 256bit
baseSim.node[*].appl.sensingTime = 60
baseSim.node[*].mobility.speed = ${0, 1, 2, 4}mps

[Config Packet256sensing120s]
output-scalar-file = ${resultdir}/256bits/sensing=120s/v=${runnumber}s.sca
output-vector-file = ${resultdir}/256bits/sensing=120s/v=${runnumber}s.vec
baseSim.*.appl.headerLength = 256bit
baseSim.node[*].appl.sensingTime = 120
baseSim.node[*].mobility.speed = ${0, 1, 2, 4}mps

#[Config Packet256sensing240s]
#output-scalar-file = ${resultdir}/256bits/sensing=240s/v=${runnumber}s.sca
#output-vector-file = ${resultdir}/256bits/sensing=240s/v=${runnumber}s.vec
#baseSim.*.appl.headerLength = 256bit
#baseSim.*.appl.sensingTime = 240
#baseSim.node[*].mobility.speed = ${0, 1, 2, 4}mps


#--------------------------------------------------------------------------------------



[Config Packet512sensing30s]
output-scalar-file = ${resultdir}/512bits/sensing=30s/v=${runnumber}s.sca
output-vector-file = ${resultdir}/512bits/sensing=30s/v=${runnumber}s.vec
baseSim.*.appl.headerLength = 512bit
baseSim.node[*].appl.sensingTime = 30
baseSim.node[*].mobility.speed = ${0, 1, 2, 4}mps

[Config Packet512sensing60s]
output-scalar-file = ${resultdir}/512bits/sensing=60s/v=${runnumber}s.sca
output-vector-file = ${resultdir}/512bits/sensing=60s/v=${runnumber}s.vec
baseSim.*.appl.headerLength = 512bit
baseSim.node[*].appl.sensingTime = 60
baseSim.node[*].mobility.speed = ${0, 1, 2, 4}mps

[Config Packet512sensing120s]
output-scalar-file = ${resultdir}/512bits/sensing=120s/v=${runnumber}s.sca
output-vector-file = ${resultdir}/512bits/sensing=120s/v=${runnumber}s.vec
baseSim.*.appl.headerLength = 512bit
baseSim.node[*].appl.sensingTime = 120
baseSim.node[*].mobility.speed = ${0, 1, 2, 4}mps

#[Config Packet512sensing240s]
#output-scalar-file = ${resultdir}/512bits/sensing=240s/v=${runnumber}s.sca
#output-vector-file = ${resultdir}/512bits/sensing=240s/v=${runnumber}s.vec
#baseSim.*.appl.headerLength = 512bit
#baseSim.*.appl.sensingTime = 240
#baseSim.node[*].mobility.speed = ${0, 1, 2, 3, 4, 5}mps


#------------------------------------------------------------------------


[Config Packet1024sensing30s]
output-scalar-file = ${resultdir}/1024bits/sensing=30s/v=${runnumber}s.sca
output-vector-file = ${resultdir}/1024bits/sensing=30s/v=${runnumber}s.vec
baseSim.*.appl.headerLength = 1024bit
baseSim.node[*].appl.sensingTime = 30
baseSim.node[*].mobility.speed = ${0, 1, 2, 4}mps

[Config Packet1024sensing60s]
output-scalar-file = ${resultdir}/1024bits/sensing=60s/v=${runnumber}s.sca
output-vector-file = ${resultdir}/1024bits/sensing=60s/v=${runnumber}s.vec
baseSim.*.appl.headerLength = 1024bit
baseSim.node[*].appl.sensingTime = 60
baseSim.node[*].mobility.speed = ${0, 1, 2, 4}mps

[Config Packet1024sensing120s]
output-scalar-file = ${resultdir}/1024bits/sensing=120s/v=${runnumber}s.sca
output-vector-file = ${resultdir}/1024bits/sensing=120s/v=${runnumber}s.vec
baseSim.*.appl.headerLength = 1024bit
baseSim.node[*].appl.sensingTime = 120
baseSim.node[*].mobility.speed = ${0, 1, 2, 4}mps

#[Config Packet1024sensing240s]
#output-scalar-file = ${resultdir}/1024bits/sensing=240s/v=${runnumber}s.sca
#output-vector-file = ${resultdir}/1024bits/sensing=240s/v=${runnumber}s.vec
#baseSim.*.appl.headerLength = 1024bit
#baseSim.*.appl.sensingTime = 240
#baseSim.node[*].mobility.speed = ${0, 1, 2, 3, 4, 5}mps






[Config Txrange]
baseSim.numNodes = 2
baseSim.node[*].nic.mac.txPower = 50W
baseSim.node[*].nic.mac.highTxPower = 50W  # [mW]
baseSim.connectionManager.pMax = 50W	# Unlimited power
baseSim.node[*].nic.phy.maxTXPower = 50W # Unlimited power

baseSim.node[0].mobility.x = 20
baseSim.node[0].mobility.y = 0
baseSim.node[0].mobility.z = 10

baseSim.node[1].mobility.x = 20
baseSim.node[1].mobility.y = 1000
baseSim.node[1].mobility.z = 10


[Config TestLEACH]
baseSim.playgroundSizeX = 100m
baseSim.playgroundSizeY = 100m
baseSim.playgroundSizeZ = 100m
baseSim.numNodes = 10

baseSim.node[*].appl.headerLength = 1024bit

baseSim.node[*].mobility.x = uniform(0,100)
baseSim.node[*].mobility.y = uniform(0,100)
baseSim.node[*].mobility.z = 10
baseSim.node[*].mobility.updateInterval = 1s
baseSim.node[*].battery.resolution = 1s

baseSim.node[*].netwType = "LEACH"			#LEACH Routing protocol
baseSim.node[*].net.maxTtl = 1
baseSim.node[*].net.P = 0.1 				#percentage of CHs [0-1]
baseSim.node[*].net.roundTime = 60s			#LEACH whole round time (in seconds)
baseSim.node[*].net.slotTime = 0.08s		#slot transmission time (in seconds)
baseSim.node[*].net.compressionIndex = 0.15	#Index of compression [0-1]
baseSim.node[*].net.watingTime = 0.02s	#Maximun packet waiting time to go to the next stage (in seconds)
baseSim.node[*].net.maxClusterSize = 3		#Maximum number of nodes per cluster

################ MAC layer parameters ####################
baseSim.node[*].nic.mac.queueLength = 5
baseSim.node[*].nic.mac.headerLength = 24
baseSim.node[*].nic.mac.slotDuration = 0.000050s #50 us
baseSim.node[*].nic.mac.difs = 0.000025s		 #25 us
baseSim.node[*].nic.mac.maxTxAttempts = 7
baseSim.node[*].nic.mac.defaultChannel = 0
baseSim.node[*].nic.mac.bitrate = 15360bps		 #15kbps
baseSim.node[*].nic.mac.contentionWindow = 45
baseSim.node[*].nic.mac.txPower = 0.5W  # [mW]
baseSim.node[*].nic.mac.highTxPower = 10W  # [mW]

################ MAC layer parameters ####################
baseSim.baseStation.nic.mac.queueLength = 5
baseSim.baseStation.nic.mac.headerLength = 24
baseSim.baseStation.nic.mac.slotDuration = 0.000050s #50 us
baseSim.baseStation.nic.mac.difs = 0.000025s		 #25 us
baseSim.baseStation.nic.mac.maxTxAttempts = 25
baseSim.baseStation.nic.mac.defaultChannel = 0
baseSim.baseStation.nic.mac.bitrate = 15360bps		 #15kbps
baseSim.baseStation.nic.mac.contentionWindow = 45
baseSim.baseStation.nic.mac.txPower = 10W  # [mW]





