mirror of
https://gitlab.com/manzerbredes/loosely-coupled-dss.git
synced 2025-04-05 11:06:25 +02:00
Debug and add scenarios in paper
This commit is contained in:
parent
69e8818642
commit
51d0c256a3
6 changed files with 492 additions and 121 deletions
|
@ -8,29 +8,29 @@ inputs="${wai}/../inputs.json"
|
|||
simulator="make -C ${wai}/../ run"
|
||||
parser="${wai}/../parser.awk"
|
||||
results="${wai}/results.csv"
|
||||
nseed=10
|
||||
nseed=20
|
||||
|
||||
run-simulation () {
|
||||
# Generate inputs
|
||||
$scenarios $seed $simtime $maxstartupdelay $wakeupevery $wakeupfor $n_nodes $extended $hint $poff $pon $prx $ptx $datasize $simkey > "$inputs"
|
||||
$scenarios $seed $simtime $wakeupsd $wakeupevery $wakeupfor $n_nodes $extended $hint $poff $pon $prx $ptx $datasize $simkey > "$inputs"
|
||||
# Run simulations
|
||||
[ -e "$results" ] && { $simulator 2>&1 | $parser | sed 1d >> "$results"; } || { $simulator 2>&1 | $parser > "$results"; }
|
||||
}
|
||||
|
||||
# Default Parameters
|
||||
seed=0
|
||||
simtime=100
|
||||
maxstartupdelay=1
|
||||
wakeupevery=10
|
||||
wakeupfor=10
|
||||
n_nodes=1
|
||||
simtime=7200
|
||||
wakeupsd=180
|
||||
wakeupevery=600
|
||||
wakeupfor=180
|
||||
n_nodes=5
|
||||
extended="false"
|
||||
hint="false"
|
||||
poff=0
|
||||
pon=1
|
||||
prx=1
|
||||
ptx=2
|
||||
datasize=1
|
||||
pon=0.4
|
||||
prx=0.16
|
||||
ptx=0.16
|
||||
datasize=1000000
|
||||
simkey=0
|
||||
|
||||
# Baseline
|
||||
|
|
|
@ -1,41 +1,401 @@
|
|||
node,nWakeUp,nDataRcv,nSendFail,nRcvFail,simkey,seed,energy
|
||||
on0,1,0,1,0,baseline,1,180.000000
|
||||
on0,1,0,1,0,baseline,2,180.000000
|
||||
on0,1,0,1,0,baseline,3,180.000000
|
||||
on0,1,0,1,0,baseline,4,180.000000
|
||||
on0,1,0,1,0,baseline,5,180.000000
|
||||
on0,1,0,1,0,baseline,6,180.000000
|
||||
on0,1,0,1,0,baseline,7,180.000000
|
||||
on0,1,0,1,0,baseline,8,180.000000
|
||||
on0,1,0,1,0,baseline,9,180.000000
|
||||
on0,1,0,1,0,baseline,10,180.000000
|
||||
on0,1,0,1,0,hint,1,180.000000
|
||||
on0,1,0,1,0,hint,2,180.000000
|
||||
on0,1,0,1,0,hint,3,180.000000
|
||||
on0,1,0,1,0,hint,4,180.000000
|
||||
on0,1,0,1,0,hint,5,180.000000
|
||||
on0,1,0,1,0,hint,6,180.000000
|
||||
on0,1,0,1,0,hint,7,180.000000
|
||||
on0,1,0,1,0,hint,8,180.000000
|
||||
on0,1,0,1,0,hint,9,180.000000
|
||||
on0,1,0,1,0,hint,10,180.000000
|
||||
on0,1,0,1,0,extended,1,90.000000
|
||||
on0,1,0,1,0,extended,2,90.000000
|
||||
on0,1,0,1,0,extended,3,90.000000
|
||||
on0,1,0,1,0,extended,4,90.000000
|
||||
on0,1,0,1,0,extended,5,90.000000
|
||||
on0,1,0,1,0,extended,6,90.000000
|
||||
on0,1,0,1,0,extended,7,90.000000
|
||||
on0,1,0,1,0,extended,8,90.000000
|
||||
on0,1,0,1,0,extended,9,90.000000
|
||||
on0,1,0,1,0,extended,10,90.000000
|
||||
on0,1,0,1,0,hintandextended,1,90.000000
|
||||
on0,1,0,1,0,hintandextended,2,90.000000
|
||||
on0,1,0,1,0,hintandextended,3,90.000000
|
||||
on0,1,0,1,0,hintandextended,4,90.000000
|
||||
on0,1,0,1,0,hintandextended,5,90.000000
|
||||
on0,1,0,1,0,hintandextended,6,90.000000
|
||||
on0,1,0,1,0,hintandextended,7,90.000000
|
||||
on0,1,0,1,0,hintandextended,8,90.000000
|
||||
on0,1,0,1,0,hintandextended,9,90.000000
|
||||
on0,1,0,1,0,hintandextended,10,90.000000
|
||||
node,nSend,nWakeUp,nDataRcv,nSendFail,nRcvFail,simkey,seed,energy
|
||||
on4,0,12,1,0,0,baseline,1,848.640000
|
||||
on2,0,12,1,0,0,baseline,1,856.320000
|
||||
on1,0,13,1,0,0,baseline,1,932.160000
|
||||
on0,4,12,0,0,0,baseline,1,848.640000
|
||||
on3,0,12,1,0,0,baseline,1,852.480000
|
||||
on0,4,12,0,0,0,baseline,2,848.640000
|
||||
on1,0,11,1,0,0,baseline,2,788.160000
|
||||
on4,0,13,1,0,0,baseline,2,920.640000
|
||||
on2,0,13,1,0,0,baseline,2,928.320000
|
||||
on3,0,13,1,0,0,baseline,2,924.480000
|
||||
on3,0,11,1,0,0,baseline,3,780.480000
|
||||
on4,0,12,1,0,0,baseline,3,848.640000
|
||||
on1,0,12,1,0,0,baseline,3,860.160000
|
||||
on0,4,13,0,0,0,baseline,3,920.640000
|
||||
on2,0,12,1,0,0,baseline,3,856.320000
|
||||
on2,0,11,1,0,0,baseline,4,784.320000
|
||||
on1,0,12,1,0,0,baseline,4,860.160000
|
||||
on0,4,12,0,0,0,baseline,4,848.640000
|
||||
on4,0,13,1,0,0,baseline,4,920.640000
|
||||
on3,0,13,1,0,0,baseline,4,924.480000
|
||||
on3,0,12,1,0,0,baseline,5,852.480000
|
||||
on0,4,12,0,0,0,baseline,5,848.640000
|
||||
on2,0,11,1,0,0,baseline,5,784.320000
|
||||
on4,0,12,1,0,0,baseline,5,848.640000
|
||||
on1,0,13,1,0,0,baseline,5,932.160000
|
||||
on1,0,12,1,0,0,baseline,6,860.160000
|
||||
on2,0,12,1,0,0,baseline,6,856.320000
|
||||
on0,4,12,0,0,0,baseline,6,848.640000
|
||||
on3,0,13,1,0,0,baseline,6,924.480000
|
||||
on4,0,13,1,0,0,baseline,6,920.640000
|
||||
on3,0,13,1,0,0,baseline,7,924.480000
|
||||
on0,4,13,0,0,0,baseline,7,920.640000
|
||||
on1,0,12,1,0,0,baseline,7,860.160000
|
||||
on2,0,13,1,0,0,baseline,7,928.320000
|
||||
on4,0,14,1,0,0,baseline,7,992.640000
|
||||
on1,0,13,1,0,0,baseline,8,932.160000
|
||||
on2,0,12,1,0,0,baseline,8,856.320000
|
||||
on4,0,12,1,0,0,baseline,8,848.640000
|
||||
on0,4,12,0,0,0,baseline,8,848.640000
|
||||
on3,0,12,1,0,0,baseline,8,852.480000
|
||||
on1,0,12,1,0,0,baseline,9,860.160000
|
||||
on3,0,12,1,0,0,baseline,9,852.480000
|
||||
on0,4,12,0,0,0,baseline,9,848.640000
|
||||
on4,0,12,1,0,0,baseline,9,848.640000
|
||||
on2,0,13,1,0,0,baseline,9,928.320000
|
||||
on4,0,12,1,0,0,baseline,10,848.640000
|
||||
on2,0,12,1,0,0,baseline,10,856.320000
|
||||
on0,4,12,0,0,0,baseline,10,848.640000
|
||||
on1,0,12,1,0,0,baseline,10,860.160000
|
||||
on3,0,12,1,0,0,baseline,10,852.480000
|
||||
on2,0,12,1,0,0,baseline,11,856.320000
|
||||
on1,0,12,1,0,0,baseline,11,860.160000
|
||||
on4,0,14,1,0,0,baseline,11,992.640000
|
||||
on3,0,12,1,0,0,baseline,11,852.480000
|
||||
on0,4,12,0,0,0,baseline,11,848.640000
|
||||
on3,0,11,1,0,0,baseline,12,780.480000
|
||||
on2,0,11,1,0,0,baseline,12,784.320000
|
||||
on1,0,12,1,0,0,baseline,12,860.160000
|
||||
on0,4,12,0,0,0,baseline,12,848.640000
|
||||
on4,0,13,1,0,0,baseline,12,920.640000
|
||||
on1,0,11,1,0,0,baseline,13,788.160000
|
||||
on2,0,12,1,0,0,baseline,13,856.320000
|
||||
on3,0,12,1,0,0,baseline,13,852.480000
|
||||
on0,4,13,0,0,0,baseline,13,920.640000
|
||||
on4,0,12,1,0,0,baseline,13,848.640000
|
||||
on0,4,11,0,0,0,baseline,14,776.640000
|
||||
on2,0,11,1,0,0,baseline,14,784.320000
|
||||
on1,0,13,1,0,0,baseline,14,932.160000
|
||||
on3,0,13,1,0,0,baseline,14,924.480000
|
||||
on4,0,12,1,0,0,baseline,14,848.640000
|
||||
on4,0,12,1,0,0,baseline,15,848.640000
|
||||
on3,0,11,1,0,0,baseline,15,780.480000
|
||||
on2,0,12,1,0,0,baseline,15,856.320000
|
||||
on1,0,13,1,0,0,baseline,15,932.160000
|
||||
on0,4,13,0,0,0,baseline,15,920.640000
|
||||
on2,0,14,1,0,0,baseline,16,1000.320000
|
||||
on4,0,12,1,0,0,baseline,16,848.640000
|
||||
on0,4,13,0,0,0,baseline,16,920.640000
|
||||
on1,0,12,1,0,0,baseline,16,860.160000
|
||||
on3,0,12,1,0,0,baseline,16,852.480000
|
||||
on4,0,11,1,0,0,baseline,17,776.640000
|
||||
on1,0,13,1,0,0,baseline,17,932.160000
|
||||
on2,0,11,1,0,0,baseline,17,784.320000
|
||||
on0,4,12,0,0,0,baseline,17,848.640000
|
||||
on3,0,13,1,0,0,baseline,17,924.480000
|
||||
on1,0,11,1,0,0,baseline,18,788.160000
|
||||
on2,0,12,1,0,0,baseline,18,856.320000
|
||||
on3,0,12,1,0,0,baseline,18,852.480000
|
||||
on0,4,13,0,0,0,baseline,18,920.640000
|
||||
on4,0,12,1,0,0,baseline,18,848.640000
|
||||
on4,0,12,1,0,0,baseline,19,848.640000
|
||||
on3,0,13,1,0,0,baseline,19,924.480000
|
||||
on0,4,12,0,0,0,baseline,19,848.640000
|
||||
on2,0,12,1,0,0,baseline,19,856.320000
|
||||
on1,0,12,1,0,0,baseline,19,860.160000
|
||||
on0,4,12,0,0,0,baseline,20,848.640000
|
||||
on2,0,12,1,0,0,baseline,20,856.320000
|
||||
on1,0,13,1,0,0,baseline,20,932.160000
|
||||
on4,0,12,1,0,0,baseline,20,848.640000
|
||||
on3,0,13,1,0,0,baseline,20,924.480000
|
||||
on4,0,12,1,0,0,hint,1,876.240000
|
||||
on2,0,12,1,0,0,hint,1,905.520000
|
||||
on1,0,13,1,0,0,hint,1,955.360000
|
||||
on0,4,12,0,0,0,hint,1,848.640000
|
||||
on3,0,12,1,0,0,hint,1,880.480000
|
||||
on0,4,12,0,0,0,hint,2,848.640000
|
||||
on1,0,11,1,0,0,hint,2,796.160000
|
||||
on4,0,13,1,0,0,hint,2,985.040000
|
||||
on2,0,14,1,0,0,hint,2,1000.320000
|
||||
on3,0,14,1,0,0,hint,2,996.480000
|
||||
on3,0,11,1,0,0,hint,3,837.280000
|
||||
on4,0,13,1,0,0,hint,3,920.640000
|
||||
on1,0,13,1,0,0,hint,3,932.160000
|
||||
on0,4,13,0,0,0,hint,3,920.640000
|
||||
on2,0,12,1,0,0,hint,3,863.920000
|
||||
on2,0,11,1,0,0,hint,4,831.120000
|
||||
on1,0,12,1,0,0,hint,4,865.760000
|
||||
on0,4,12,0,0,0,hint,4,848.640000
|
||||
on4,0,13,1,0,0,hint,4,953.040000
|
||||
on3,0,13,1,0,0,hint,4,945.280000
|
||||
on3,0,12,1,0,0,hint,5,882.080000
|
||||
on0,4,12,0,0,0,hint,5,848.640000
|
||||
on2,0,11,1,0,0,hint,5,794.720000
|
||||
on4,0,12,1,0,0,hint,5,889.040000
|
||||
on1,0,13,1,0,0,hint,5,964.160000
|
||||
on1,0,12,1,0,0,hint,6,930.560000
|
||||
on2,0,12,1,0,0,hint,6,858.720000
|
||||
on0,4,12,0,0,0,hint,6,848.640000
|
||||
on3,0,13,1,0,0,hint,6,972.480000
|
||||
on4,0,13,1,0,0,hint,6,933.440000
|
||||
on3,0,13,1,0,0,hint,7,995.680000
|
||||
on0,4,13,0,0,0,hint,7,920.640000
|
||||
on1,0,12,1,0,0,hint,7,901.760000
|
||||
on2,0,14,1,0,0,hint,7,1000.320000
|
||||
on4,0,14,1,0,0,hint,7,1015.040000
|
||||
on1,0,13,1,0,0,hint,8,950.960000
|
||||
on2,0,12,1,0,0,hint,8,892.720000
|
||||
on4,0,12,1,0,0,hint,8,895.440000
|
||||
on0,4,12,0,0,0,hint,8,848.640000
|
||||
on3,0,12,1,0,0,hint,8,881.280000
|
||||
on1,0,12,1,0,0,hint,9,862.560000
|
||||
on3,0,12,1,0,0,hint,9,902.480000
|
||||
on0,4,12,0,0,0,hint,9,848.640000
|
||||
on4,0,12,1,0,0,hint,9,908.240000
|
||||
on2,0,13,1,0,0,hint,9,931.520000
|
||||
on4,0,13,1,0,0,hint,10,920.640000
|
||||
on2,0,12,1,0,0,hint,10,889.520000
|
||||
on0,4,12,0,0,0,hint,10,848.640000
|
||||
on1,0,13,1,0,0,hint,10,932.160000
|
||||
on3,0,12,1,0,0,hint,10,859.280000
|
||||
on2,0,12,1,0,0,hint,11,861.120000
|
||||
on1,0,12,1,0,0,hint,11,903.360000
|
||||
on4,0,14,1,0,0,hint,11,1055.840000
|
||||
on3,0,13,1,0,0,hint,11,924.480000
|
||||
on0,4,12,0,0,0,hint,11,848.640000
|
||||
on3,0,11,1,0,0,hint,12,832.480000
|
||||
on2,0,11,1,0,0,hint,12,787.920000
|
||||
on1,0,12,1,0,0,hint,12,871.760000
|
||||
on0,4,12,0,0,0,hint,12,848.640000
|
||||
on4,0,13,1,0,0,hint,12,945.840000
|
||||
on1,0,11,1,0,0,hint,13,833.360000
|
||||
on2,0,12,1,0,0,hint,13,875.920000
|
||||
on3,0,13,1,0,0,hint,13,924.480000
|
||||
on0,4,13,0,0,0,hint,13,920.640000
|
||||
on4,0,12,1,0,0,hint,13,895.040000
|
||||
on0,4,11,0,0,0,hint,14,776.640000
|
||||
on2,0,11,1,0,0,hint,14,813.920000
|
||||
on1,0,13,1,0,0,hint,14,936.160000
|
||||
on3,0,13,1,0,0,hint,14,987.680000
|
||||
on4,0,12,1,0,0,hint,14,854.640000
|
||||
on4,0,12,1,0,0,hint,15,879.440000
|
||||
on3,0,11,1,0,0,hint,15,818.480000
|
||||
on2,0,12,1,0,0,hint,15,901.120000
|
||||
on1,0,13,1,0,0,hint,15,995.760000
|
||||
on0,4,13,0,0,0,hint,15,920.640000
|
||||
on2,0,14,1,0,0,hint,16,1051.920000
|
||||
on4,0,12,1,0,0,hint,16,881.840000
|
||||
on0,4,13,0,0,0,hint,16,920.640000
|
||||
on1,0,12,1,0,0,hint,16,904.160000
|
||||
on3,0,12,1,0,0,hint,16,899.280000
|
||||
on4,0,11,1,0,0,hint,17,782.240000
|
||||
on1,0,13,1,0,0,hint,17,989.360000
|
||||
on2,0,11,1,0,0,hint,17,829.120000
|
||||
on0,4,12,0,0,0,hint,17,848.640000
|
||||
on3,0,13,1,0,0,hint,17,968.080000
|
||||
on1,0,12,1,0,0,hint,18,860.160000
|
||||
on2,0,13,1,0,0,hint,18,928.320000
|
||||
on3,0,12,1,0,0,hint,18,865.280000
|
||||
on0,4,13,0,0,0,hint,18,920.640000
|
||||
on4,0,13,1,0,0,hint,18,920.640000
|
||||
on4,0,12,1,0,0,hint,19,890.240000
|
||||
on3,0,13,1,0,0,hint,19,987.280000
|
||||
on0,4,12,0,0,0,hint,19,848.640000
|
||||
on2,0,12,1,0,0,hint,19,865.520000
|
||||
on1,0,12,1,0,0,hint,19,884.160000
|
||||
on0,4,12,0,0,0,hint,20,848.640000
|
||||
on2,0,13,1,0,0,hint,20,928.320000
|
||||
on1,0,13,1,0,0,hint,20,962.560000
|
||||
on4,0,12,1,0,0,hint,20,887.840000
|
||||
on3,0,13,1,0,0,hint,20,936.080000
|
||||
on4,0,12,1,0,0,extended,1,860.160000
|
||||
on2,0,12,1,0,0,extended,1,860.160000
|
||||
on1,0,13,1,0,0,extended,1,932.160000
|
||||
on0,4,12,0,0,0,extended,1,848.640000
|
||||
on3,0,12,1,0,0,extended,1,860.160000
|
||||
on0,4,12,0,0,0,extended,2,848.640000
|
||||
on1,0,11,1,0,0,extended,2,788.160000
|
||||
on4,0,13,1,0,0,extended,2,932.160000
|
||||
on2,0,13,1,0,0,extended,2,932.160000
|
||||
on3,0,13,1,0,0,extended,2,932.160000
|
||||
on3,0,11,1,0,0,extended,3,788.160000
|
||||
on4,0,12,1,0,0,extended,3,860.160000
|
||||
on1,0,12,1,0,0,extended,3,860.160000
|
||||
on0,4,13,0,0,0,extended,3,920.640000
|
||||
on2,0,12,1,0,0,extended,3,860.160000
|
||||
on2,0,11,1,0,0,extended,4,788.160000
|
||||
on1,0,12,1,0,0,extended,4,860.160000
|
||||
on0,4,12,0,0,0,extended,4,848.640000
|
||||
on4,0,13,1,0,0,extended,4,932.160000
|
||||
on3,0,13,1,0,0,extended,4,932.160000
|
||||
on3,0,12,1,0,0,extended,5,860.160000
|
||||
on0,4,12,0,0,0,extended,5,848.640000
|
||||
on2,0,11,1,0,0,extended,5,788.160000
|
||||
on4,0,12,1,0,0,extended,5,860.160000
|
||||
on1,0,13,1,0,0,extended,5,932.160000
|
||||
on1,0,12,1,0,0,extended,6,860.160000
|
||||
on2,0,12,1,0,0,extended,6,860.160000
|
||||
on0,4,12,0,0,0,extended,6,848.640000
|
||||
on3,0,13,1,0,0,extended,6,932.160000
|
||||
on4,0,13,1,0,0,extended,6,932.160000
|
||||
on3,0,13,1,0,0,extended,7,932.160000
|
||||
on0,4,13,0,0,0,extended,7,920.640000
|
||||
on1,0,12,1,0,0,extended,7,860.160000
|
||||
on2,0,13,1,0,0,extended,7,932.160000
|
||||
on4,0,14,1,0,0,extended,7,1004.160000
|
||||
on1,0,13,1,0,0,extended,8,932.160000
|
||||
on2,0,12,1,0,0,extended,8,860.160000
|
||||
on4,0,12,1,0,0,extended,8,860.160000
|
||||
on0,4,12,0,0,0,extended,8,848.640000
|
||||
on3,0,12,1,0,0,extended,8,860.160000
|
||||
on1,0,12,1,0,0,extended,9,860.160000
|
||||
on3,0,12,1,0,0,extended,9,860.160000
|
||||
on0,4,12,0,0,0,extended,9,848.640000
|
||||
on4,0,12,1,0,0,extended,9,860.160000
|
||||
on2,0,13,1,0,0,extended,9,932.160000
|
||||
on4,0,12,1,0,0,extended,10,860.160000
|
||||
on2,0,12,1,0,0,extended,10,860.160000
|
||||
on0,4,12,0,0,0,extended,10,848.640000
|
||||
on1,0,12,1,0,0,extended,10,860.160000
|
||||
on3,0,12,1,0,0,extended,10,860.160000
|
||||
on2,0,12,1,0,0,extended,11,860.160000
|
||||
on1,0,12,1,0,0,extended,11,860.160000
|
||||
on4,0,14,1,0,0,extended,11,1004.160000
|
||||
on3,0,12,1,0,0,extended,11,860.160000
|
||||
on0,4,12,0,0,0,extended,11,848.640000
|
||||
on3,0,11,1,0,0,extended,12,788.160000
|
||||
on2,0,11,1,0,0,extended,12,788.160000
|
||||
on1,0,12,1,0,0,extended,12,860.160000
|
||||
on0,4,12,0,0,0,extended,12,848.640000
|
||||
on4,0,13,1,0,0,extended,12,932.160000
|
||||
on1,0,11,1,0,0,extended,13,788.160000
|
||||
on2,0,12,1,0,0,extended,13,860.160000
|
||||
on3,0,12,1,0,0,extended,13,860.160000
|
||||
on0,4,13,0,0,0,extended,13,920.640000
|
||||
on4,0,12,1,0,0,extended,13,860.160000
|
||||
on0,4,11,0,0,0,extended,14,776.640000
|
||||
on2,0,11,1,0,0,extended,14,788.160000
|
||||
on1,0,13,1,0,0,extended,14,932.160000
|
||||
on3,0,13,1,0,0,extended,14,932.160000
|
||||
on4,0,12,1,0,0,extended,14,860.160000
|
||||
on4,0,12,1,0,0,extended,15,860.160000
|
||||
on3,0,11,1,0,0,extended,15,788.160000
|
||||
on2,0,12,1,0,0,extended,15,860.160000
|
||||
on1,0,13,1,0,0,extended,15,932.160000
|
||||
on0,4,13,0,0,0,extended,15,920.640000
|
||||
on2,0,14,1,0,0,extended,16,1004.160000
|
||||
on4,0,12,1,0,0,extended,16,860.160000
|
||||
on0,4,13,0,0,0,extended,16,920.640000
|
||||
on1,0,12,1,0,0,extended,16,860.160000
|
||||
on3,0,12,1,0,0,extended,16,860.160000
|
||||
on4,0,11,1,0,0,extended,17,788.160000
|
||||
on1,0,13,1,0,0,extended,17,932.160000
|
||||
on2,0,11,1,0,0,extended,17,788.160000
|
||||
on0,4,12,0,0,0,extended,17,848.640000
|
||||
on3,0,13,1,0,0,extended,17,932.160000
|
||||
on1,0,11,1,0,0,extended,18,788.160000
|
||||
on2,0,12,1,0,0,extended,18,860.160000
|
||||
on3,0,12,1,0,0,extended,18,860.160000
|
||||
on0,4,13,0,0,0,extended,18,920.640000
|
||||
on4,0,12,1,0,0,extended,18,860.160000
|
||||
on4,0,12,1,0,0,extended,19,860.160000
|
||||
on3,0,13,1,0,0,extended,19,932.160000
|
||||
on0,4,12,0,0,0,extended,19,848.640000
|
||||
on2,0,12,1,0,0,extended,19,860.160000
|
||||
on1,0,12,1,0,0,extended,19,860.160000
|
||||
on0,4,12,0,0,0,extended,20,848.640000
|
||||
on2,0,12,1,0,0,extended,20,860.160000
|
||||
on1,0,13,1,0,0,extended,20,932.160000
|
||||
on4,0,12,1,0,0,extended,20,860.160000
|
||||
on3,0,13,1,0,0,extended,20,932.160000
|
||||
on4,0,12,1,0,0,hintandextended,1,887.760000
|
||||
on2,0,12,1,0,0,hintandextended,1,909.360000
|
||||
on1,0,13,1,0,0,hintandextended,1,955.360000
|
||||
on0,4,12,0,0,0,hintandextended,1,848.640000
|
||||
on3,0,12,1,0,0,hintandextended,1,888.160000
|
||||
on0,4,12,0,0,0,hintandextended,2,848.640000
|
||||
on1,0,11,1,0,0,hintandextended,2,796.160000
|
||||
on4,0,13,1,0,0,hintandextended,2,996.560000
|
||||
on2,0,14,1,0,0,hintandextended,2,1004.160000
|
||||
on3,0,14,1,0,0,hintandextended,2,1004.160000
|
||||
on3,0,11,1,0,0,hintandextended,3,844.960000
|
||||
on4,0,13,1,0,0,hintandextended,3,932.160000
|
||||
on1,0,13,1,0,0,hintandextended,3,932.160000
|
||||
on0,4,13,0,0,0,hintandextended,3,920.640000
|
||||
on2,0,12,1,0,0,hintandextended,3,867.760000
|
||||
on2,0,11,1,0,0,hintandextended,4,834.960000
|
||||
on1,0,12,1,0,0,hintandextended,4,865.760000
|
||||
on0,4,12,0,0,0,hintandextended,4,848.640000
|
||||
on4,0,13,1,0,0,hintandextended,4,964.560000
|
||||
on3,0,13,1,0,0,hintandextended,4,952.960000
|
||||
on3,0,12,1,0,0,hintandextended,5,889.760000
|
||||
on0,4,12,0,0,0,hintandextended,5,848.640000
|
||||
on2,0,11,1,0,0,hintandextended,5,798.560000
|
||||
on4,0,12,1,0,0,hintandextended,5,900.560000
|
||||
on1,0,13,1,0,0,hintandextended,5,964.160000
|
||||
on1,0,12,1,0,0,hintandextended,6,930.560000
|
||||
on2,0,12,1,0,0,hintandextended,6,862.560000
|
||||
on0,4,12,0,0,0,hintandextended,6,848.640000
|
||||
on3,0,13,1,0,0,hintandextended,6,980.160000
|
||||
on4,0,13,1,0,0,hintandextended,6,944.960000
|
||||
on3,0,13,1,0,0,hintandextended,7,1003.360000
|
||||
on0,4,13,0,0,0,hintandextended,7,920.640000
|
||||
on1,0,12,1,0,0,hintandextended,7,901.760000
|
||||
on2,0,14,1,0,0,hintandextended,7,1004.160000
|
||||
on4,0,14,1,0,0,hintandextended,7,1026.560000
|
||||
on1,0,13,1,0,0,hintandextended,8,950.960000
|
||||
on2,0,12,1,0,0,hintandextended,8,896.560000
|
||||
on4,0,12,1,0,0,hintandextended,8,906.960000
|
||||
on0,4,12,0,0,0,hintandextended,8,848.640000
|
||||
on3,0,12,1,0,0,hintandextended,8,888.960000
|
||||
on1,0,12,1,0,0,hintandextended,9,862.560000
|
||||
on3,0,12,1,0,0,hintandextended,9,910.160000
|
||||
on0,4,12,0,0,0,hintandextended,9,848.640000
|
||||
on4,0,12,1,0,0,hintandextended,9,919.760000
|
||||
on2,0,13,1,0,0,hintandextended,9,935.360000
|
||||
on4,0,13,1,0,0,hintandextended,10,932.160000
|
||||
on2,0,12,1,0,0,hintandextended,10,893.360000
|
||||
on0,4,12,0,0,0,hintandextended,10,848.640000
|
||||
on1,0,13,1,0,0,hintandextended,10,932.160000
|
||||
on3,0,12,1,0,0,hintandextended,10,866.960000
|
||||
on2,0,12,1,0,0,hintandextended,11,864.960000
|
||||
on1,0,12,1,0,0,hintandextended,11,903.360000
|
||||
on4,0,14,1,0,0,hintandextended,11,1067.360000
|
||||
on3,0,13,1,0,0,hintandextended,11,932.160000
|
||||
on0,4,12,0,0,0,hintandextended,11,848.640000
|
||||
on3,0,11,1,0,0,hintandextended,12,840.160000
|
||||
on2,0,11,1,0,0,hintandextended,12,791.760000
|
||||
on1,0,12,1,0,0,hintandextended,12,871.760000
|
||||
on0,4,12,0,0,0,hintandextended,12,848.640000
|
||||
on4,0,13,1,0,0,hintandextended,12,957.360000
|
||||
on1,0,11,1,0,0,hintandextended,13,833.360000
|
||||
on2,0,12,1,0,0,hintandextended,13,879.760000
|
||||
on3,0,13,1,0,0,hintandextended,13,932.160000
|
||||
on0,4,13,0,0,0,hintandextended,13,920.640000
|
||||
on4,0,12,1,0,0,hintandextended,13,906.560000
|
||||
on0,4,11,0,0,0,hintandextended,14,776.640000
|
||||
on2,0,11,1,0,0,hintandextended,14,817.760000
|
||||
on1,0,13,1,0,0,hintandextended,14,936.160000
|
||||
on3,0,13,1,0,0,hintandextended,14,995.360000
|
||||
on4,0,12,1,0,0,hintandextended,14,866.160000
|
||||
on4,0,12,1,0,0,hintandextended,15,890.960000
|
||||
on3,0,11,1,0,0,hintandextended,15,826.160000
|
||||
on2,0,12,1,0,0,hintandextended,15,904.960000
|
||||
on1,0,13,1,0,0,hintandextended,15,995.760000
|
||||
on0,4,13,0,0,0,hintandextended,15,920.640000
|
||||
on2,0,14,1,0,0,hintandextended,16,1055.760000
|
||||
on4,0,12,1,0,0,hintandextended,16,893.360000
|
||||
on0,4,13,0,0,0,hintandextended,16,920.640000
|
||||
on1,0,12,1,0,0,hintandextended,16,904.160000
|
||||
on3,0,12,1,0,0,hintandextended,16,906.960000
|
||||
on4,0,11,1,0,0,hintandextended,17,793.760000
|
||||
on1,0,13,1,0,0,hintandextended,17,989.360000
|
||||
on2,0,11,1,0,0,hintandextended,17,832.960000
|
||||
on0,4,12,0,0,0,hintandextended,17,848.640000
|
||||
on3,0,13,1,0,0,hintandextended,17,975.760000
|
||||
on1,0,12,1,0,0,hintandextended,18,860.160000
|
||||
on2,0,13,1,0,0,hintandextended,18,932.160000
|
||||
on3,0,12,1,0,0,hintandextended,18,872.960000
|
||||
on0,4,13,0,0,0,hintandextended,18,920.640000
|
||||
on4,0,13,1,0,0,hintandextended,18,932.160000
|
||||
on4,0,12,1,0,0,hintandextended,19,901.760000
|
||||
on3,0,13,1,0,0,hintandextended,19,994.960000
|
||||
on0,4,12,0,0,0,hintandextended,19,848.640000
|
||||
on2,0,12,1,0,0,hintandextended,19,869.360000
|
||||
on1,0,12,1,0,0,hintandextended,19,884.160000
|
||||
on0,4,12,0,0,0,hintandextended,20,848.640000
|
||||
on2,0,13,1,0,0,hintandextended,20,932.160000
|
||||
on1,0,13,1,0,0,hintandextended,20,962.560000
|
||||
on4,0,12,1,0,0,hintandextended,20,899.360000
|
||||
on3,0,13,1,0,0,hintandextended,20,943.760000
|
||||
|
|
|
|
@ -19,6 +19,7 @@ Inputs::Inputs(std::string node_name){
|
|||
extended=d["extended"].GetBool();
|
||||
simkey=d["simkey"].GetString();
|
||||
seed=d["seed"].GetInt();
|
||||
n_nodes=d["nodes"].MemberCount();
|
||||
|
||||
// Instantiate wake_ts
|
||||
for(auto& v:d["nodes"][node_name.c_str()]["wake_ts"].GetArray()){
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
/**
|
||||
* Is there another event to process ?
|
||||
*/
|
||||
bool HasNext(){return(wake_ts.size()>1);}
|
||||
bool HasNext(){return wake_ts.size()>1 ;}
|
||||
/**
|
||||
* Get current event timestamp
|
||||
*/
|
||||
|
@ -78,6 +78,7 @@ public:
|
|||
bool extended;
|
||||
int data_size;
|
||||
int seed;
|
||||
int n_nodes;
|
||||
std::string simkey;
|
||||
|
||||
};
|
|
@ -10,7 +10,7 @@
|
|||
#include <sstream>
|
||||
|
||||
|
||||
#define RAND(min,max) (rand()%(max-min+1)+min)
|
||||
#define RAND(min,max) (rand()%((max)-(min)+1)+(min))
|
||||
|
||||
using namespace std;
|
||||
using namespace rapidjson;
|
||||
|
@ -19,7 +19,7 @@ int main(int argc, char **argv){
|
|||
// Setup seed
|
||||
if(argc!=15){
|
||||
cerr << "Usage: " << argv[0] <<
|
||||
" <seed> <simtime> <maxstartupdelay> <wakeupevery> <wakeupfor> <n_nodes>" <<
|
||||
" <seed> <simtime> <wakeupsd> <wakeupevery> <wakeupfor> <n_nodes>" <<
|
||||
" <extended> <hint> <poff> <pon> <prx> <ptx> <datasize> <simkey>" <<
|
||||
endl;
|
||||
exit(1);
|
||||
|
@ -28,8 +28,8 @@ int main(int argc, char **argv){
|
|||
// Init parameters
|
||||
int seed=atoi(argv[1]);
|
||||
double simtime=stod(argv[2]);
|
||||
unsigned int maxstartupdelay=atoi(argv[3]);
|
||||
double wakeupevery=stod(argv[4]);
|
||||
unsigned int wakeupsd=atoi(argv[3]);
|
||||
unsigned int wakeupevery=atoi(argv[4]);
|
||||
double wakeupfor=stod(argv[5]);
|
||||
unsigned int n_nodes=atoi(argv[6]);
|
||||
bool extended=!strcmp("true",argv[7]);
|
||||
|
@ -69,7 +69,7 @@ int main(int argc, char **argv){
|
|||
// Setup ts and durations
|
||||
Value ts(kArrayType);
|
||||
Value duration(kArrayType);
|
||||
for(unsigned int i=maxstartupdelay;(i+wakeupfor)<simtime;i+=wakeupevery){
|
||||
for(unsigned int i=0;(i+wakeupfor)<simtime;i+=RAND(wakeupevery-wakeupsd,wakeupevery+wakeupsd)){
|
||||
ts.PushBack(Value().SetDouble(i),d.GetAllocator());
|
||||
duration.PushBack(Value().SetDouble(wakeupfor),d.GetAllocator());
|
||||
}
|
||||
|
|
135
src/simulator.cc
135
src/simulator.cc
|
@ -92,6 +92,7 @@ static void obs_node(std::vector<std::string> args) {
|
|||
u32 nDataRcv=0;
|
||||
u32 nSendFail=0;
|
||||
u32 nRcvFail=0;
|
||||
u32 nSend=0;
|
||||
while(i.ShouldContinue()){
|
||||
XBT_INFO("%s is spleeping",selfName.c_str());
|
||||
MODE_OFF();
|
||||
|
@ -100,73 +101,81 @@ static void obs_node(std::vector<std::string> args) {
|
|||
XBT_INFO("%s wakes up",selfName.c_str());
|
||||
|
||||
// Doing wake up stuff
|
||||
try {
|
||||
if(isSender){ // If I am a sender
|
||||
Payload *p=new Payload();
|
||||
p->node=selfName;
|
||||
if(useHint&&i.HasNext()){
|
||||
p->containsHint=true;
|
||||
p->hint=i.GetNextTS();
|
||||
p->duration=i.GetNextDuration();
|
||||
double uptime=i.GetDuration();
|
||||
while(uptime>0.00001){ // Ensure not infinite loop even if it should not happend (we loose accuracy here but just in case)
|
||||
try {
|
||||
if(isSender){ // If I am a sender
|
||||
Payload *p=new Payload();
|
||||
p->node=selfName;
|
||||
if(useHint&&i.HasNext()){
|
||||
p->containsHint=true;
|
||||
p->hint=i.GetNextTS();
|
||||
p->duration=i.GetNextDuration();
|
||||
}
|
||||
if(i.extended){
|
||||
// We use a trick here
|
||||
// First we send an instantaneous message (size=0) with the usual timeout
|
||||
// to check whether there is a receiver!
|
||||
// If there is one, we are sure that a put in the "medium"+selfName
|
||||
// will not lead to a deadlock (cf anchor:5623) and we are using a exclusive
|
||||
// channel (to avoid other receivers to get the message)
|
||||
m->put(p,0,uptime);
|
||||
simgrid::s4u::Mailbox *m_ext= simgrid::s4u::Mailbox::by_name("medium"+selfName);
|
||||
MODE_TX();
|
||||
m_ext->put(p,data_size);
|
||||
}
|
||||
else{
|
||||
MODE_TX();
|
||||
m->put(p,data_size,uptime);
|
||||
}
|
||||
nSend++;
|
||||
isSender=(nSend<(i.n_nodes-1));
|
||||
isObserver=!isSender;
|
||||
XBT_INFO("%s sent data successfully",selfName.c_str());
|
||||
}
|
||||
if(i.extended){
|
||||
// We use a trick here
|
||||
// First we send an instantaneous message (size=0) with the usual timeout
|
||||
// to check whether there is a receiver!
|
||||
// If there is one, we are sure that a put in the "medium"+selfName
|
||||
// will not lead to a deadlock (cf anchor:5623) and we are using a exclusive
|
||||
// channel (to avoid other receivers to get the message)
|
||||
m->put(p,0,i.GetDuration());
|
||||
simgrid::s4u::Mailbox *m_ext= simgrid::s4u::Mailbox::by_name("medium"+selfName);
|
||||
MODE_TX();
|
||||
m_ext->put(p,data_size);
|
||||
else if (!isObserver){
|
||||
Payload* p;
|
||||
if(i.extended){
|
||||
// anchor:5623 We can see here that
|
||||
// we first receive the instantaneous message
|
||||
// and then we use a mailbox specific to the sender (to have an exclusive channel)
|
||||
p=m->get<Payload>(uptime);
|
||||
simgrid::s4u::Mailbox *m_ext_sender = simgrid::s4u::Mailbox::by_name("medium"+p->node);
|
||||
MODE_RX();
|
||||
p=m_ext_sender->get<Payload>();
|
||||
}
|
||||
else{
|
||||
MODE_RX();
|
||||
p=m->get<Payload>(uptime);
|
||||
}
|
||||
nDataRcv++; // New data received
|
||||
if(p->containsHint){
|
||||
XBT_INFO("%s received and hint of %f",selfName.c_str(),p->hint);
|
||||
i.AddEvent(p->hint, p->duration); // Schedule a new wake up time
|
||||
}
|
||||
else{
|
||||
XBT_INFO("%s received data successfully",selfName.c_str());
|
||||
}
|
||||
isObserver=true; // Now we received the data we switch to observer
|
||||
}
|
||||
else{
|
||||
MODE_TX();
|
||||
m->put(p,data_size,i.GetDuration());
|
||||
else {
|
||||
XBT_INFO("%s is observing his environment...",selfName.c_str());
|
||||
MODE_ON();
|
||||
simgrid::s4u::this_actor::sleep_for(uptime);
|
||||
}
|
||||
XBT_INFO("%s sent data successfully",selfName.c_str());
|
||||
}
|
||||
else if (!isObserver){
|
||||
Payload* p;
|
||||
if(i.extended){
|
||||
// anchor:5623 We can see here that
|
||||
// we first receive the instantaneous message
|
||||
// and then we use a mailbox specific to the sender (to have an exclusive channel)
|
||||
p=m->get<Payload>(i.GetDuration());
|
||||
simgrid::s4u::Mailbox *m_ext_sender = simgrid::s4u::Mailbox::by_name("medium"+p->node);
|
||||
MODE_RX();
|
||||
p=m_ext_sender->get<Payload>();
|
||||
}
|
||||
else{
|
||||
MODE_RX();
|
||||
p=m->get<Payload>(i.GetDuration());
|
||||
}
|
||||
nDataRcv++; // New data received
|
||||
if(p->containsHint){
|
||||
XBT_INFO("%s received and hint of %f",selfName.c_str(),p->hint);
|
||||
i.AddEvent(p->hint, p->duration); // Schedule a new wake up time
|
||||
}
|
||||
else{
|
||||
XBT_INFO("%s received data successfully and switch to forwarding mode",selfName.c_str());
|
||||
}
|
||||
isObserver=true; // Now we received the data we switch to observer
|
||||
catch (...)
|
||||
{
|
||||
if(isSender){
|
||||
XBT_INFO("%s could not send any data",selfName.c_str());
|
||||
nSendFail++;
|
||||
}
|
||||
else{
|
||||
XBT_INFO("%s could not receive any data",selfName.c_str());
|
||||
nRcvFail++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
XBT_INFO("%s is observing his environment...",selfName.c_str());
|
||||
simgrid::s4u::this_actor::sleep_until(i.GetDuration());
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
if(isSender){
|
||||
XBT_INFO("%s could not send any data",selfName.c_str());
|
||||
nSendFail++;
|
||||
}
|
||||
else{
|
||||
XBT_INFO("%s could not receive any data",selfName.c_str());
|
||||
nRcvFail++;
|
||||
}
|
||||
uptime=(i.GetTS()+i.GetDuration())-simgrid::s4u::Engine::get_clock();
|
||||
}
|
||||
// Load next event
|
||||
i.GotoNextEvent();
|
||||
|
@ -174,5 +183,5 @@ static void obs_node(std::vector<std::string> args) {
|
|||
}
|
||||
// Done
|
||||
MODE_OFF()
|
||||
XBT_INFO("Observation node %s finished [LOG2PARSE](node:%s|nWakeUp:%d|nDataRcv:%d|nSendFail:%d|nRcvFail:%d|simkey:%s|seed:%d)",selfName.c_str(),selfName.c_str(),nWakeUp,nDataRcv,nSendFail,nRcvFail,i.simkey.c_str(),i.seed);
|
||||
XBT_INFO("Observation node %s finished [LOG2PARSE](node:%s|nSend:%d|nWakeUp:%d|nDataRcv:%d|nSendFail:%d|nRcvFail:%d|simkey:%s|seed:%d)",selfName.c_str(),selfName.c_str(),nSend,nWakeUp,nDataRcv,nSendFail,nRcvFail,i.simkey.c_str(),i.seed);
|
||||
}
|
Loading…
Add table
Reference in a new issue