mirror of
https://gitlab.com/manzerbredes/loosely-coupled-dss.git
synced 2025-04-05 11:06:25 +02:00
Debug
This commit is contained in:
parent
738f22d12f
commit
404eb004ad
7 changed files with 7568 additions and 1925 deletions
Binary file not shown.
Before Width: | Height: | Size: 302 KiB After Width: | Height: | Size: 254 KiB |
|
@ -60,7 +60,7 @@ bitrate="100kbps"
|
|||
|
||||
run-scenarios() {
|
||||
# Configure number of seed per scenarios
|
||||
nseed=20
|
||||
nseed=50
|
||||
|
||||
# Baseline
|
||||
echo "Baseline..."
|
||||
|
|
9337
results/results.csv
9337
results/results.csv
File diff suppressed because it is too large
Load diff
Binary file not shown.
Before Width: | Height: | Size: 219 KiB After Width: | Height: | Size: 182 KiB |
|
@ -1,33 +1,33 @@
|
|||
|
||||
|simkey |wireless | wakeupfor| sd| energy|
|
||||
|:---------------|:--------|---------:|---------:|--------:|
|
||||
|baseline |lora | 60| 16.68823| 585.5940|
|
||||
|extended |lora | 60| 110.37247| 643.5583|
|
||||
|hint |lora | 60| 114.04055| 682.9183|
|
||||
|hintandextended |lora | 60| 118.29356| 650.8409|
|
||||
|simkey |wireless | wakeupfor| sd| energy|
|
||||
|:---------------|:--------|---------:|----------:|---------:|
|
||||
|baseline |lora | 60| 16.92769| 585.6019|
|
||||
|extended |lora | 60| 4396.48015| 2901.8214|
|
||||
|hint |lora | 60| 113.53973| 679.6186|
|
||||
|hintandextended |lora | 60| 127.91993| 653.7694|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd| energy|
|
||||
|:---------------|:--------|---------:|----------:|---------:|
|
||||
|baseline |nbiot | 60| 62.63811| 609.8635|
|
||||
|extended |nbiot | 60| 8263.33831| 4860.8439|
|
||||
|hint |nbiot | 60| 120.26490| 665.7586|
|
||||
|hintandextended |nbiot | 60| 123.07025| 628.0724|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd| energy|
|
||||
|:---------------|:--------|---------:|----------:|--------:|
|
||||
|baseline |lora | 180| 95.30832| 1791.473|
|
||||
|extended |lora | 180| 3775.92822| 4470.672|
|
||||
|hint |lora | 180| 210.00079| 2069.611|
|
||||
|hintandextended |lora | 180| 167.16495| 1865.962|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd| energy|
|
||||
|:---------------|:--------|---------:|---------:|--------:|
|
||||
|baseline |nbiot | 60| 62.24934| 610.6076|
|
||||
|extended |nbiot | 60| 59.59017| 608.4334|
|
||||
|hint |nbiot | 60| 111.60701| 673.9423|
|
||||
|hintandextended |nbiot | 60| 67.74561| 616.9678|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd| energy|
|
||||
|:---------------|:--------|---------:|---------:|--------:|
|
||||
|baseline |lora | 180| 96.84011| 1790.930|
|
||||
|extended |lora | 180| 116.50281| 1795.967|
|
||||
|hint |lora | 180| 188.06417| 2043.078|
|
||||
|hintandextended |lora | 180| 128.42386| 1845.336|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd| energy|
|
||||
|:---------------|:--------|---------:|--------:|--------:|
|
||||
|baseline |nbiot | 180| 228.1902| 1828.633|
|
||||
|extended |nbiot | 180| 198.1249| 1808.674|
|
||||
|hint |nbiot | 180| 197.5754| 1895.628|
|
||||
|hintandextended |nbiot | 180| 182.9743| 1863.406|
|
||||
|baseline |nbiot | 180| 221.4437| 1828.990|
|
||||
|extended |nbiot | 180| 7184.9505| 6944.547|
|
||||
|hint |nbiot | 180| 371.6943| 2031.829|
|
||||
|hintandextended |nbiot | 180| 356.9851| 2010.894|
|
||||
|
||||
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
|
||||
|simkey |wireless | wakeupfor| sd_success| success| hint_added| senderEnergy| receiverEnergy| senderUptime| receiverUptime| nSendFail|
|
||||
|:---------------|:--------|---------:|----------:|-------:|----------:|------------:|--------------:|------------:|--------------:|---------:|
|
||||
|baseline |lora | 60| 0.000000| 0.00| 0.0000000| 633.3520| 581.2524| 1440.000| 1439.955| 28.70|
|
||||
|extended |lora | 60| 1.424411| 5.65| 0.0000000| 976.1800| 613.3200| 2078.850| 1500.427| 18.35|
|
||||
|hint |lora | 60| 0.000000| 0.00| 3.0590909| 784.5477| 673.6793| 1440.000| 1621.882| 28.20|
|
||||
|hintandextended |lora | 60| 1.565248| 6.15| 0.0727273| 1008.9831| 618.2826| 2128.858| 1508.792| 17.85|
|
||||
|baseline |lora | 60| 0.000000| 0.00| 0.0000000| 633.8784| 581.2131| 1440.000| 1439.978| 28.64|
|
||||
|extended |lora | 60| 1.443352| 4.72| 0.0000000| 907.5632| 3096.5731| 1954.700| 5935.148| 20.24|
|
||||
|hint |lora | 60| 0.000000| 0.00| 2.9563636| 784.7349| 670.0625| 1440.000| 1614.415| 28.08|
|
||||
|hintandextended |lora | 60| 1.462595| 6.06| 0.0781818| 1015.8779| 620.8504| 2111.888| 1513.428| 81.36|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd_success| success| hint_added| senderEnergy| receiverEnergy| senderUptime| receiverUptime| nSendFail|
|
||||
|:---------------|:--------|---------:|----------:|--------:|----------:|------------:|--------------:|------------:|--------------:|---------:|
|
||||
|baseline |nbiot | 60| 1.431782| 1.950000| 0.0000000| 792.9375| 594.0322| 1440.000| 1439.955| 27.35|
|
||||
|extended |nbiot | 60| 1.589439| 6.000000| 0.0000000| 791.7907| 591.7645| 1485.274| 1443.948| 21.85|
|
||||
|hint |nbiot | 60| 2.278774| 7.388889| 1.2162162| 947.0818| 651.7958| 1440.000| 1511.878| 30.65|
|
||||
|hintandextended |nbiot | 60| 1.954153| 6.526316| 0.1131222| 811.3245| 600.2584| 1481.732| 1451.169| 21.20|
|
||||
|baseline |nbiot | 60| 1.470804| 2.200000| 0.0000000| 793.1130| 593.2044| 1440.000| 1439.978| 27.16|
|
||||
|extended |nbiot | 60| 1.518458| 5.020000| 0.0000000| 777.2571| 5259.6316| 1467.477| 5887.267| 23.54|
|
||||
|hint |nbiot | 60| 1.710440| 7.086957| 0.9277978| 993.5199| 638.5437| 1440.000| 1494.750| 35.94|
|
||||
|hintandextended |nbiot | 60| 1.607689| 6.395833| 0.1358696| 878.6447| 606.2835| 1476.821| 1457.098| 127.72|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd_success| success| hint_added| senderEnergy| receiverEnergy| senderUptime| receiverUptime| nSendFail|
|
||||
|:---------------|:--------|---------:|----------:|-------:|----------:|------------:|--------------:|------------:|--------------:|---------:|
|
||||
|baseline |lora | 180| 1.4906511| 1.6800| 0.0000000| 2087.163| 1764.592| 4319.780| 4317.385| 33.36|
|
||||
|extended |lora | 180| 1.1952286| 8.8000| 0.0000000| 2133.163| 4701.196| 4711.300| 9595.870| 21.04|
|
||||
|hint |lora | 180| 0.4140393| 9.8000| 3.4136752| 2246.327| 2065.080| 4319.533| 4904.643| 19.78|
|
||||
|hintandextended |lora | 180| 0.8139410| 9.5625| 0.5077187| 2371.051| 1852.100| 4773.883| 4473.792| 758.58|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd_success| success| hint_added| senderEnergy| receiverEnergy| senderUptime| receiverUptime| nSendFail|
|
||||
|:---------------|:--------|---------:|----------:|--------:|----------:|------------:|--------------:|------------:|--------------:|---------:|
|
||||
|baseline |lora | 180| 1.3945382| 1.450000| 0.0000000| 2089.740| 1763.765| 4319.650| 4316.945| 33.65|
|
||||
|extended |lora | 180| 1.1673206| 9.142857| 0.0000000| 2117.177| 1776.069| 4676.286| 4365.836| 17.50|
|
||||
|hint |lora | 180| 0.4082483| 9.833333| 3.4658120| 2072.157| 2042.333| 4320.000| 4905.880| 17.95|
|
||||
|hintandextended |lora | 180| 0.8864053| 9.250000| 0.5431034| 2153.073| 1834.724| 4766.133| 4472.066| 12.65|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd_success| success| hint_added| senderEnergy| receiverEnergy| senderUptime| receiverUptime| nSendFail|
|
||||
|:---------------|:--------|---------:|----------:|--------:|----------:|------------:|--------------:|------------:|--------------:|---------:|
|
||||
|baseline |nbiot | 180| 1.3394468| 8.833333| 0.0000000| 2536.733| 1771.220| 4319.611| 4316.973| 24.95|
|
||||
|extended |nbiot | 180| 1.0836247| 9.083333| 0.0000000| 2429.380| 1776.006| 4331.842| 4319.791| 19.95|
|
||||
|hint |nbiot | 180| 0.7867958| 9.428571| 0.6309013| 2440.631| 1879.254| 4320.000| 4417.558| 17.15|
|
||||
|hintandextended |nbiot | 180| 0.8333333| 9.222222| 0.4415584| 2379.442| 1843.300| 4330.908| 4389.236| 16.10|
|
||||
|baseline |nbiot | 180| 1.1004434| 8.804878| 0.0000000| 2539.220| 1776.898| 4319.732| 4317.428| 23.92|
|
||||
|extended |nbiot | 180| 1.1241323| 8.960000| 0.0000000| 2450.170| 7388.655| 4337.550| 9642.147| 23.90|
|
||||
|hint |nbiot | 180| 0.4696682| 9.705882| 0.7667238| 3491.606| 1989.262| 4320.000| 4446.925| 30.64|
|
||||
|hintandextended |nbiot | 180| 0.4472136| 9.750000| 0.6037736| 3394.721| 1972.916| 4333.656| 4424.966| 1191.82|
|
||||
|
||||
|
||||
|
|
|
@ -56,7 +56,15 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(simulator, "[DAO] Loosely Coupled DSS");
|
|||
|
||||
/// @brief For convenience sake
|
||||
typedef unsigned int u32;
|
||||
|
||||
u32 nON;
|
||||
bool *data_ready;
|
||||
bool is_data_rcv_ready(){
|
||||
for(int i=0;i<nON;i++){
|
||||
if(data_ready[i])
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Data that will be exchange between the nodes
|
||||
*/
|
||||
|
@ -92,11 +100,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("ON", simgrid::s4u::Host::by_name(ss.str()), obs_node, args);
|
||||
}
|
||||
|
||||
|
@ -113,6 +124,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");
|
||||
|
@ -167,7 +179,11 @@ static void obs_node(std::vector<std::string> args) {
|
|||
MODE_TX();
|
||||
// Then try sending the data
|
||||
if(i.extended){
|
||||
SEND(m_ded->put(p,i.data_size));
|
||||
if(is_data_rcv_ready()){
|
||||
SEND(m_ded->put(p,i.data_size));
|
||||
}
|
||||
else
|
||||
throw "Attemps to send when no receiver available in extended mode";
|
||||
}
|
||||
else{
|
||||
SEND(m_ded->put(p,i.data_size,uptime));
|
||||
|
@ -226,8 +242,10 @@ static void obs_node(std::vector<std::string> args) {
|
|||
hint_forward=new Payload(*p); // Enable hint forwarding
|
||||
hintReceived=true;
|
||||
}
|
||||
if(i.extended)
|
||||
data_ready[id]=true; // Say to the receiver that he can send (to avoid deadlock in extended mode)
|
||||
if(i.extended){
|
||||
p=m_ded->get<Payload>(); // Fetch data until sended
|
||||
}
|
||||
else
|
||||
p=m_ded->get<Payload>(uptime); // Fetch data until sended or uptime expire
|
||||
// If we reach here, data has been received successfully
|
||||
|
@ -244,16 +262,46 @@ static void obs_node(std::vector<std::string> args) {
|
|||
hint_added++;
|
||||
}
|
||||
}
|
||||
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(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); // Ignore forwarded hint
|
||||
simgrid::s4u::Mailbox *m_ded= simgrid::s4u::Mailbox::by_name(p->DedicatedMailbox);
|
||||
// Start receiving hint from sender
|
||||
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
|
||||
//simgrid::s4u::this_actor::sleep_for(uptime); // Now sleep until the end
|
||||
}
|
||||
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