Debug simulator and add paper scenarios

This commit is contained in:
Loic Guegan 2021-05-19 16:45:04 +02:00
parent c757315893
commit f7c6f8ad56
13 changed files with 3608 additions and 3282 deletions

View file

@ -0,0 +1,58 @@
{
"seed": 200,
"bitrate": "0.5MBps",
"latency": 0.01,
"extended": false,
"hint_size": 8,
"nodes": {
"on0": {
"use_hint": false,
"power_off": 0.0,
"power_on": 0.4,
"power_rx": 0.65,
"power_tx": 0.65,
"is_sender": true,
"data_size": 1000000,
"wake_ts": [
5,
50
],
"wake_duration": [
10,
10
]
},
"on1": {
"use_hint": true,
"power_off": 0.0,
"power_on": 0.4,
"power_rx": 0.65,
"power_tx": 0.65,
"is_sender": false,
"data_size": 1000000,
"wake_ts": [
0,
20
],
"wake_duration": [
10,
10
]
},
"on2": {
"use_hint": true,
"power_off": 0.0,
"power_on": 0.4,
"power_rx": 0.65,
"power_tx": 0.65,
"is_sender": false,
"data_size": 1000000,
"wake_ts": [
25
],
"wake_duration": [
10
]
}
}
}

View file

@ -0,0 +1,58 @@
{
"seed": 200,
"bitrate": "0.2MBps",
"latency": 0.01,
"extended": true,
"hint_size": 8,
"nodes": {
"on0": {
"use_hint": false,
"power_off": 0.0,
"power_on": 0.4,
"power_rx": 0.65,
"power_tx": 0.65,
"is_sender": true,
"data_size": 1000000,
"wake_ts": [
5,
50
],
"wake_duration": [
10,
10
]
},
"on1": {
"use_hint": true,
"power_off": 0.0,
"power_on": 0.4,
"power_rx": 0.65,
"power_tx": 0.65,
"is_sender": false,
"data_size": 1000000,
"wake_ts": [
0,
20
],
"wake_duration": [
10,
10
]
},
"on2": {
"use_hint": true,
"power_off": 0.0,
"power_on": 0.4,
"power_rx": 0.65,
"power_tx": 0.65,
"is_sender": false,
"data_size": 1000000,
"wake_ts": [
25
],
"wake_duration": [
10
]
}
}
}

View file

@ -0,0 +1,58 @@
{
"seed": 200,
"bitrate": "0.5MBps",
"latency": 0.01,
"extended": false,
"hint_size": 8,
"nodes": {
"on0": {
"use_hint": true,
"power_off": 0.0,
"power_on": 0.4,
"power_rx": 0.65,
"power_tx": 0.65,
"is_sender": true,
"data_size": 1000000,
"wake_ts": [
5,
50
],
"wake_duration": [
10,
10
]
},
"on1": {
"use_hint": true,
"power_off": 0.0,
"power_on": 0.4,
"power_rx": 0.65,
"power_tx": 0.65,
"is_sender": false,
"data_size": 1000000,
"wake_ts": [
0,
20
],
"wake_duration": [
10,
10
]
},
"on2": {
"use_hint": true,
"power_off": 0.0,
"power_on": 0.4,
"power_rx": 0.65,
"power_tx": 0.65,
"is_sender": false,
"data_size": 1000000,
"wake_ts": [
25
],
"wake_duration": [
10
]
}
}
}

View file

@ -0,0 +1,58 @@
{
"seed": 200,
"bitrate": "0.2MBps",
"latency": 0.01,
"extended": true,
"hint_size": 8,
"nodes": {
"on0": {
"use_hint": true,
"power_off": 0.0,
"power_on": 0.4,
"power_rx": 0.65,
"power_tx": 0.65,
"is_sender": true,
"data_size": 1000000,
"wake_ts": [
5,
50
],
"wake_duration": [
10,
10
]
},
"on1": {
"use_hint": true,
"power_off": 0.0,
"power_on": 0.4,
"power_rx": 0.65,
"power_tx": 0.65,
"is_sender": false,
"data_size": 1000000,
"wake_ts": [
0,
20
],
"wake_duration": [
10,
10
]
},
"on2": {
"use_hint": true,
"power_off": 0.0,
"power_on": 0.4,
"power_rx": 0.65,
"power_tx": 0.65,
"is_sender": false,
"data_size": 1000000,
"wake_ts": [
25
],
"wake_duration": [
10
]
}
}
}

52
results/scenarios/scenario.sh Executable file
View file

@ -0,0 +1,52 @@
#!/usr/bin/env bash
set -e
wai=$(dirname $(readlink -f "$0"))
inputs="${wai}/../../inputs.json"
simulator="make -C ${wai}/../../ run"
run-simulation () {
# Run simulations
$simulator 2>&1
}
echo "Which scenario to run:"
echo "(a) Baseline"
echo "(b) Extended"
echo "(c) Hint"
echo "(d) Hint+Extended"
read -p "> " -n 1 -r
echo
case $REPLY in
a)
echo "Run baseline scenarios (a)"
cp ${wai}/baseline.json $inputs
run-simulation
;;
b)
echo "Run extended scenarios (b)"
cp ${wai}/extended.json $inputs
run-simulation
;;
c)
echo "Run hint scenarios (c)"
cp ${wai}/hint.json $inputs
run-simulation
;;
d)
echo "Run hint+extended scenarios (d)"
cp ${wai}/hint_extended.json $inputs
run-simulation
;;
*)
echo "Unknown choice"
exit 1
;;
esac