mirror of
https://gitlab.com/manzerbredes/loosely-coupled-dss-extended.git
synced 2025-04-05 19:16:26 +02:00
Update scenario
This commit is contained in:
parent
390984c255
commit
4476e5c7b1
6 changed files with 13731 additions and 14076 deletions
Binary file not shown.
Before Width: | Height: | Size: 261 KiB After Width: | Height: | Size: 256 KiB |
27638
results/results.csv
27638
results/results.csv
File diff suppressed because it is too large
Load diff
Binary file not shown.
Before Width: | Height: | Size: 191 KiB After Width: | Height: | Size: 188 KiB |
|
@ -1,33 +1,33 @@
|
|||
|
||||
|simkey |wireless | wakeupfor| sd| energy|
|
||||
|:---------------|:--------|---------:|---------:|--------:|
|
||||
|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 | 60| 7.069153| 581.6244|
|
||||
|extended |lora | 60| 5121.863625| 3618.6843|
|
||||
|hint |lora | 60| 80.469264| 638.0569|
|
||||
|hintandextended |lora | 60| 4363.990545| 3035.4251|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd| energy|
|
||||
|:---------------|:--------|---------:|----------:|---------:|
|
||||
|baseline |nbiot | 60| 28.38168| 598.7582|
|
||||
|extended |nbiot | 60| 9663.82085| 6192.0457|
|
||||
|hint |nbiot | 60| 102.65535| 660.4632|
|
||||
|hintandextended |nbiot | 60| 209.15857| 634.9603|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd| energy|
|
||||
|:---------------|:--------|---------:|----------:|--------:|
|
||||
|baseline |lora | 180| 42.82688| 1783.037|
|
||||
|extended |lora | 180| 3894.56500| 4976.255|
|
||||
|hint |lora | 180| 115.94509| 1899.600|
|
||||
|hintandextended |lora | 180| 1908.12484| 3064.590|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd| energy|
|
||||
|:---------------|:--------|---------:|---------:|--------:|
|
||||
|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| 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|
|
||||
|baseline |nbiot | 180| 141.6811| 1899.670|
|
||||
|extended |nbiot | 180| 7612.2701| 7512.737|
|
||||
|hint |nbiot | 180| 202.4829| 1972.868|
|
||||
|hintandextended |nbiot | 180| 201.6532| 1938.547|
|
||||
|
||||
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
|
||||
|simkey |wireless | wakeupfor| sd_success| success| senderEnergy| receiverEnergy| senderUptime| receiverUptime| nSendFail|
|
||||
|:---------------|:--------|---------:|----------:|-------:|------------:|--------------:|------------:|--------------:|---------:|
|
||||
|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|
|
||||
|baseline |lora | 60| 0.0000000| 0.00| 582.4480| 581.5495| 1440.000| 1439.945| 24.76|
|
||||
|extended |lora | 60| 1.6378108| 4.62| 903.3720| 3885.1526| 1962.750| 7343.283| 19.38|
|
||||
|hint |lora | 60| 0.0000000| 0.00| 623.8270| 639.3505| 1440.000| 1541.151| 25.40|
|
||||
|hintandextended |lora | 60| 0.4163332| 0.22| 635.5733| 3261.8263| 1499.103| 6208.472| 24.15|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd_success| success| senderEnergy| receiverEnergy| senderUptime| receiverUptime| nSendFail|
|
||||
|:---------------|:--------|---------:|----------:|--------:|------------:|--------------:|------------:|--------------:|---------:|
|
||||
|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|
|
||||
|baseline |nbiot | 60| 0.3379977| 0.130000| 601.8050| 598.4813| 1440.000| 1439.945| 24.66|
|
||||
|extended |nbiot | 60| 1.6446731| 4.890000| 750.4207| 6726.5865| 1474.320| 7284.242| 22.27|
|
||||
|hint |nbiot | 60| 1.8409332| 6.854167| 910.9654| 638.6804| 1440.000| 1492.287| 29.73|
|
||||
|hintandextended |nbiot | 60| 1.8177249| 6.357143| 800.6855| 620.2224| 1480.645| 1469.025| 21.69|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd_success| success| senderEnergy| receiverEnergy| senderUptime| receiverUptime| nSendFail|
|
||||
|:---------------|:--------|---------:|----------:|-------:|------------:|--------------:|------------:|--------------:|---------:|
|
||||
|baseline |lora | 180| 0.3265986| 0.12| 1852.154| 1776.754| 4319.890| 4317.521| 29.18|
|
||||
|extended |lora | 180| 1.2257754| 8.75| 2123.377| 5258.998| 4721.430| 10593.078| 19.80|
|
||||
|hint |lora | 180| 1.2884883| 3.58| 1865.837| 1902.669| 4319.890| 4552.952| 25.00|
|
||||
|hintandextended |lora | 180| 1.4191689| 3.19| 1918.013| 3168.919| 4477.614| 6793.447| 23.98|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd_success| success| senderEnergy| receiverEnergy| senderUptime| receiverUptime| nSendFail|
|
||||
|:---------------|:--------|---------:|----------:|--------:|------------:|--------------:|------------:|--------------:|---------:|
|
||||
|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|
|
||||
|baseline |nbiot | 180| 1.4318174| 3.480000| 2091.904| 1882.194| 4319.890| 4317.521| 25.30|
|
||||
|extended |nbiot | 180| 1.1290024| 8.910000| 2389.254| 8022.029| 4339.471| 10243.119| 22.88|
|
||||
|hint |nbiot | 180| 0.5773503| 9.666667| 2473.159| 1963.957| 4320.000| 4431.448| 16.11|
|
||||
|hintandextended |nbiot | 180| 0.5757792| 9.625000| 2386.788| 1929.392| 4335.945| 4400.879| 15.18|
|
||||
|
||||
|
||||
|
|
|
@ -56,6 +56,8 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(simulator, "[DAO] Loosely Coupled DSS");
|
|||
|
||||
/// @brief For convenience sake
|
||||
typedef unsigned int u32;
|
||||
u32 nON;
|
||||
bool *data_ready;
|
||||
|
||||
/**
|
||||
* Data that will be exchange between the nodes
|
||||
|
@ -74,6 +76,13 @@ public:
|
|||
/// @brief Observation node code
|
||||
static void obs_node(std::vector<std::string> args);
|
||||
|
||||
bool is_data_rcv_ready(){
|
||||
for(int i=0;i<nON;i++){
|
||||
if(data_ready[i])
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* No arguments are require (cf inputs.json)
|
||||
|
@ -92,11 +101,14 @@ int main(int argc, char **argv) {
|
|||
XBT_INFO("-------------------------------------------------");
|
||||
|
||||
// Init all nodes actors
|
||||
u32 nON=simgrid::s4u::Engine::get_instance()->get_host_count();
|
||||
nON=simgrid::s4u::Engine::get_instance()->get_host_count();
|
||||
data_ready=(bool*)malloc(sizeof(bool)*nON);
|
||||
for(u32 i=0;i<nON;i++){
|
||||
std::vector<std::string> args;
|
||||
std::ostringstream ss;
|
||||
ss<< "on" <<i;
|
||||
args.push_back(std::to_string(i));
|
||||
data_ready[i]=false;
|
||||
simgrid::s4u::Actor::create("obs_node", simgrid::s4u::Host::by_name(ss.str()), obs_node, args);
|
||||
}
|
||||
|
||||
|
@ -113,6 +125,7 @@ int main(int argc, char **argv) {
|
|||
static void obs_node(std::vector<std::string> args) {
|
||||
// Init various variables
|
||||
std::string selfName = simgrid::s4u::this_actor::get_host()->get_name();
|
||||
int id=stoi(args[0]);
|
||||
simgrid::s4u::this_actor::get_host()->turn_on();
|
||||
Inputs i(selfName);
|
||||
simgrid::s4u::Mailbox *m = simgrid::s4u::Mailbox::by_name("medium");
|
||||
|
@ -163,19 +176,21 @@ static void obs_node(std::vector<std::string> args) {
|
|||
TRACK_UPTIME(SEND(m_ded->put(p,i.hint_size,uptime)));
|
||||
XBT_INFO("%s sent a hint successfully",CNAME);
|
||||
}
|
||||
MODE_TX();
|
||||
// Then try sending the data
|
||||
if(i.extended){
|
||||
SEND(m_ded->put(p,i.data_size));
|
||||
if(is_data_rcv_ready()){
|
||||
MODE_TX();
|
||||
// Then try sending the data
|
||||
if(i.extended){
|
||||
SEND(m_ded->put(p,i.data_size));
|
||||
}
|
||||
else{
|
||||
SEND(m_ded->put(p,i.data_size,uptime));
|
||||
}
|
||||
// If we reach here, data has been sent successfully
|
||||
XBT_INFO("%s sent data successfully",CNAME);
|
||||
nSend++;
|
||||
i.is_sender=(nSend<(i.n_nodes-1));
|
||||
isObserver=!i.is_sender;
|
||||
}
|
||||
else{
|
||||
SEND(m_ded->put(p,i.data_size,uptime));
|
||||
}
|
||||
// If we reach here, data has been sent successfully
|
||||
XBT_INFO("%s sent data successfully",CNAME);
|
||||
nSend++;
|
||||
i.is_sender=(nSend<(i.n_nodes-1));
|
||||
isObserver=!i.is_sender;
|
||||
}
|
||||
catch(...){
|
||||
XBT_INFO("%s could not send any data",CNAME);
|
||||
|
@ -226,6 +241,7 @@ static void obs_node(std::vector<std::string> args) {
|
|||
hint_forward=new Payload(*p); // Enable hint forwarding
|
||||
hintReceived=true;
|
||||
}
|
||||
data_ready[id]=true; // Say to the receiver that he can send
|
||||
if(i.extended)
|
||||
p=m_ded->get<Payload>(); // Fetch data until sended
|
||||
else
|
||||
|
@ -242,16 +258,45 @@ static void obs_node(std::vector<std::string> args) {
|
|||
if(hintReceived)
|
||||
i.AddEvent(hint->hint, hint->duration); // Add the hint to the event list
|
||||
}
|
||||
data_ready[id]=false;
|
||||
}
|
||||
forward_mode=!forward_mode; // Toggle mode (go back and forth between receiving and forwarding)
|
||||
}
|
||||
else {
|
||||
XBT_INFO("%s is observing his environment...",CNAME);
|
||||
MODE_ON();
|
||||
if(i.use_hint && hint_forward!=NULL && CLOCK < hint_forward->hint){
|
||||
FORWARD_HINT(uptime);
|
||||
if(i.use_hint){
|
||||
double try_for=forward_mode ? 1 : 1;
|
||||
try_for=try_for>uptime ? uptime : try_for;
|
||||
|
||||
if(forward_mode && hint_forward!=NULL && CLOCK < hint_forward->hint){
|
||||
FORWARD_HINT(try_for);
|
||||
}
|
||||
else {
|
||||
Payload *p;
|
||||
try {
|
||||
do {
|
||||
TRACK_UPTIME(p=m->get<Payload>(try_for));
|
||||
} while(p->HisForward);
|
||||
simgrid::s4u::Mailbox *m_ded= simgrid::s4u::Mailbox::by_name(p->DedicatedMailbox);
|
||||
// Start receiving hint
|
||||
MODE_RX();
|
||||
if(p->HasHint){
|
||||
TRACK_UPTIME(p=m_ded->get<Payload>(uptime));
|
||||
XBT_INFO("%s received a hint successfully",CNAME);
|
||||
hint_forward=new Payload(*p); // Enable hint forwarding
|
||||
}
|
||||
else {
|
||||
simgrid::s4u::this_actor::sleep_for(try_for);
|
||||
}
|
||||
}
|
||||
catch(...){
|
||||
}
|
||||
|
||||
}
|
||||
forward_mode=!forward_mode;
|
||||
}
|
||||
else{
|
||||
else {
|
||||
simgrid::s4u::this_actor::sleep_for(uptime);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue