This commit is contained in:
Loic Guegan 2021-05-20 07:20:34 +02:00
parent f7c6f8ad56
commit 390984c255
7 changed files with 9528 additions and 28712 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 KiB

After

Width:  |  Height:  |  Size: 261 KiB

View file

@ -21,7 +21,7 @@ run-simulation () {
[ $gen_log -eq 1 ] && echo -e "* seed=$seed simtime=$simtime wakeupevery=$wakeupevery wakeupfor=$wakeupfor n_nodes=$n_nodes extended=$extended hint=$hint poff=$poff pon=$pon prx=$prx ptx=$ptx datasize=$datasize bitrate=$bitrate \n" >> "${log_file}"
# Run simulations
if [ -e "$results" ]
if [ -e "$results" ]
then
# Create new result file
if [ $gen_log -eq 1 ]
@ -58,9 +58,11 @@ hintsize=8 # Integer
latency=0 # in Seconds
bitrate="100kbps"
run-scenarios() {
# Configure number of seed per scenarios
nseed=200
nseed=100
# Baseline
echo "Baseline..."

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

After

Width:  |  Height:  |  Size: 191 KiB

View file

@ -1,33 +1,33 @@
|simkey |wireless | wakeupfor| sd| energy|
|:---------------|:--------|---------:|---------:|--------:|
|baseline |lora | 60| 16.32262| 585.4111|
|extended |lora | 60| 112.35299| 644.3173|
|hint |lora | 60| 140.69738| 657.3728|
|hintandextended |lora | 60| 112.35377| 644.3179|
|simkey |wireless | wakeupfor| sd| energy|
|:---------------|:--------|---------:|--------:|--------:|
|baseline |nbiot | 60| 60.80770| 609.9383|
|extended |nbiot | 60| 58.96556| 608.3465|
|hint |nbiot | 60| 91.16175| 635.0423|
|hintandextended |nbiot | 60| 58.96269| 608.3498|
|baseline |lora | 60| 16.20624| 585.2851|
|extended |lora | 60| 109.79705| 642.1220|
|hint |lora | 60| 115.24739| 677.7382|
|hintandextended |lora | 60| 115.72213| 647.8962|
|simkey |wireless | wakeupfor| sd| energy|
|:---------------|:--------|---------:|---------:|--------:|
|baseline |lora | 180| 99.38926| 1793.214|
|extended |lora | 180| 115.82014| 1799.546|
|hint |lora | 180| 122.50058| 1881.829|
|hintandextended |lora | 180| 115.79631| 1799.530|
|baseline |nbiot | 60| 59.95363| 609.0216|
|extended |nbiot | 60| 57.72805| 607.4341|
|hint |nbiot | 60| 101.25284| 655.6117|
|hintandextended |nbiot | 60| 64.19932| 615.0110|
|simkey |wireless | wakeupfor| sd| energy|
|:---------------|:--------|---------:|---------:|--------:|
|baseline |lora | 180| 98.93141| 1792.672|
|extended |lora | 180| 116.13770| 1798.773|
|hint |lora | 180| 189.32297| 2053.598|
|hintandextended |lora | 180| 124.48825| 1833.621|
|simkey |wireless | wakeupfor| sd| energy|
|:---------------|:--------|---------:|--------:|--------:|
|baseline |nbiot | 180| 232.1779| 1833.526|
|extended |nbiot | 180| 196.7046| 1809.951|
|hint |nbiot | 180| 239.7566| 1848.624|
|hintandextended |nbiot | 180| 196.6927| 1809.954|
|baseline |nbiot | 180| 224.9604| 1829.501|
|extended |nbiot | 180| 193.2589| 1808.301|
|hint |nbiot | 180| 201.8152| 1894.886|
|hintandextended |nbiot | 180| 186.9534| 1856.142|

View file

@ -1,33 +1,33 @@
|simkey |wireless | wakeupfor| sd_success| success| senderEnergy| receiverEnergy| senderUptime| receiverUptime| nSendFail|
|:---------------|:--------|---------:|----------:|-------:|------------:|--------------:|------------:|--------------:|---------:|
|baseline |lora | 60| 0.000000| 0.00| 632.3280| 581.1460| 1440.000| 1439.923| 28.435|
|extended |lora | 60| 1.509468| 5.73| 982.5020| 613.5733| 2089.535| 1500.595| 18.270|
|hint |lora | 60| 0.000000| 0.00| 781.0494| 646.1295| 1440.000| 1568.298| 27.975|
|hintandextended |lora | 60| 1.509468| 5.73| 982.5048| 613.5736| 2089.542| 1500.596| 18.270|
|simkey |wireless | wakeupfor| sd_success| success| senderEnergy| receiverEnergy| senderUptime| receiverUptime| nSendFail|
|:---------------|:--------|---------:|----------:|-------:|------------:|--------------:|------------:|--------------:|---------:|
|baseline |nbiot | 60| 1.296148| 2.22| 788.3890| 593.7155| 1440.026| 1439.923| 26.955|
|extended |nbiot | 60| 1.594305| 6.03| 789.9963| 591.8329| 1483.200| 1443.941| 21.815|
|hint |nbiot | 60| 1.580153| 5.84| 895.9030| 611.3277| 1440.022| 1466.598| 26.245|
|hintandextended |nbiot | 60| 1.594305| 6.03| 789.9868| 591.8374| 1483.226| 1443.944| 21.815|
|baseline |lora | 60| 0.000000| 0.00| 631.6656| 581.0687| 1440.000| 1439.945| 28.41|
|extended |lora | 60| 1.591486| 5.55| 968.7520| 612.4284| 2066.680| 1498.780| 18.45|
|hint |lora | 60| 0.000000| 0.00| 780.8465| 668.3647| 1440.000| 1611.404| 27.74|
|hintandextended |lora | 60| 1.730621| 5.93| 992.2709| 616.5894| 2101.157| 1505.846| 18.07|
|simkey |wireless | wakeupfor| sd_success| success| senderEnergy| receiverEnergy| senderUptime| receiverUptime| nSendFail|
|:---------------|:--------|---------:|----------:|--------:|------------:|--------------:|------------:|--------------:|---------:|
|baseline |lora | 180| 1.2001256| 1.630000| 2104.267| 1764.936| 4319.945| 4317.934| 35.41000|
|extended |lora | 180| 0.9293588| 9.246269| 2134.104| 1779.762| 4713.291| 4372.638| 17.52000|
|hint |lora | 180| 0.9888787| 8.934911| 2144.054| 1861.965| 4319.935| 4539.564| 29.18000|
|hintandextended |lora | 180| 0.9326243| 9.248120| 2133.659| 1779.823| 4712.014| 4372.671| 17.51256|
|baseline |nbiot | 60| 1.290016| 2.150000| 784.6695| 593.0536| 1440.000| 1439.945| 27.01|
|extended |nbiot | 60| 1.639290| 5.860000| 783.9368| 591.3884| 1480.704| 1443.835| 21.93|
|hint |nbiot | 60| 1.890034| 6.789474| 911.1950| 633.6385| 1440.000| 1491.127| 29.55|
|hintandextended |nbiot | 60| 1.825550| 6.387755| 802.5863| 598.3300| 1480.357| 1449.962| 21.72|
|simkey |wireless | wakeupfor| sd_success| success| senderEnergy| receiverEnergy| senderUptime| receiverUptime| nSendFail|
|:---------------|:--------|---------:|----------:|--------:|------------:|--------------:|------------:|--------------:|---------:|
|baseline |nbiot | 180| 1.0855147| 8.880240| 2580.136| 1777.689| 4319.949| 4317.964| 24.380|
|extended |nbiot | 180| 0.8422925| 9.352459| 2445.260| 1775.927| 4339.151| 4320.981| 20.140|
|hint |nbiot | 180| 0.8408034| 9.344262| 2597.025| 1808.543| 4319.921| 4353.619| 22.545|
|hintandextended |nbiot | 180| 0.8422925| 9.352459| 2445.222| 1775.932| 4339.163| 4320.982| 20.140|
|baseline |lora | 180| 1.1761949| 1.480000| 2100.321| 1764.704| 4319.890| 4317.521| 35.53|
|extended |lora | 180| 1.0423436| 9.075758| 2126.921| 1779.674| 4706.697| 4372.409| 17.66|
|hint |lora | 180| 0.5010811| 9.818182| 2089.536| 2052.927| 4319.682| 4910.127| 18.06|
|hintandextended |lora | 180| 0.7537580| 9.435897| 2151.599| 1822.940| 4747.264| 4446.481| 14.61|
|simkey |wireless | wakeupfor| sd_success| success| senderEnergy| receiverEnergy| senderUptime| receiverUptime| nSendFail|
|:---------------|:--------|---------:|----------:|--------:|------------:|--------------:|------------:|--------------:|---------:|
|baseline |nbiot | 180| 1.0906597| 8.867470| 2545.600| 1776.291| 4319.867| 4317.559| 24.21|
|extended |nbiot | 180| 0.9353790| 9.241936| 2424.730| 1774.718| 4337.027| 4320.285| 20.34|
|hint |nbiot | 180| 0.6546537| 9.571429| 2459.351| 1877.927| 4320.000| 4418.140| 18.40|
|hintandextended |nbiot | 180| 0.7309960| 9.522727| 2392.297| 1835.735| 4332.407| 4379.637| 17.62|

View file

@ -42,7 +42,7 @@
TRACK_UPTIME(m->put(hint_forward,0,TRY_FORWARD_DURING)); \
simgrid::s4u::Mailbox *m_ded= simgrid::s4u::Mailbox::by_name(hint_forward->DedicatedMailbox); \
MODE_TX(); \
SEND(m_ded->put(hint_forward,0,uptime)); \
SEND(m_ded->put(hint_forward,i.hint_size,uptime)); \
} \
catch(...){ \
XBT_INFO("%s fail to forward a hint",CNAME); \
@ -97,7 +97,7 @@ int main(int argc, char **argv) {
std::vector<std::string> args;
std::ostringstream ss;
ss<< "on" <<i;
simgrid::s4u::Actor::create("ON", simgrid::s4u::Host::by_name(ss.str()), obs_node, args);
simgrid::s4u::Actor::create("obs_node", simgrid::s4u::Host::by_name(ss.str()), obs_node, args);
}
// Launch the simulation
@ -140,7 +140,7 @@ static void obs_node(std::vector<std::string> args) {
double upsince=simgrid::s4u::Engine::get_clock();
double upuntil=i.GetTS()+i.GetDuration();
bool forward_mode=false;
while(uptime>0)
while(uptime>0.00001) // Avoid dead lock with uptime since we handle it manually
{
if(i.is_sender){
Payload *p=new Payload();
@ -183,11 +183,13 @@ static void obs_node(std::vector<std::string> args) {
}
}
else if(!isObserver){
// Here we try to forward hint for 1 sec and try to receive data for 5 secs
double try_for=forward_mode ? 1 : 1;
try_for=try_for>uptime ? uptime : try_for; // Ensure we do not exceed uptime
// Here we try to forward hint for 0.1 sec and try to receive data for 1 secs
double try_for=forward_mode ? 0.1 : 1;
// Then we ensure we do not exceed uptime
try_for=try_for>uptime ? uptime : try_for;
try_for=i.use_hint ? try_for : uptime; // Ensure use should use hint
// Forward hint mode
if(forward_mode){
if(i.use_hint && forward_mode){
if(hint_forward!=NULL && CLOCK < hint_forward->hint){
FORWARD_HINT(try_for); // Try forward for 5 seconds then switch to received mode
}
@ -246,7 +248,7 @@ static void obs_node(std::vector<std::string> args) {
else {
XBT_INFO("%s is observing his environment...",CNAME);
MODE_ON();
if(hint_forward!=NULL && CLOCK < hint_forward->hint){
if(i.use_hint && hint_forward!=NULL && CLOCK < hint_forward->hint){
FORWARD_HINT(uptime);
}
else{