mirror of
https://gitlab.com/manzerbredes/loosely-coupled-dss-extended.git
synced 2025-04-05 19:16:26 +02:00
Debug network model
This commit is contained in:
parent
9365501740
commit
c757315893
11 changed files with 32317 additions and 13100 deletions
|
@ -6,10 +6,13 @@ data=read_csv("results.csv")
|
|||
r_=function(x){round(x,digits=2)}
|
||||
|
||||
finalEnergy=data%>%group_by(simkey,wireless,wakeupfor)%>%summarize(wireless=first(wireless),sd=sd(energy),wakeupfor=first(wakeupfor),energy=mean(energy))
|
||||
finalStats=data%>%group_by(simkey,wireless,wakeupfor,seed)%>%
|
||||
summarise(success=sum(nSend))%>%
|
||||
ungroup()%>%group_by(simkey,wireless,wakeupfor)%>%
|
||||
summarise(sd_success=sd(success),success=mean(success))
|
||||
#finalStats=data%>%group_by(simkey,wireless,wakeupfor,seed)%>%
|
||||
# summarise(success=sum(nSend))%>%
|
||||
# ungroup()%>%group_by(simkey,wireless,wakeupfor)%>%
|
||||
# summarise(sd_success=sd(success),success=mean(success))
|
||||
|
||||
# Success
|
||||
finalStats=data%>%filter(isSender!=0)%>%group_by(simkey,wireless,wakeupfor)%>%summarise(sd_success=sd(nSend),success=mean(nSend))
|
||||
|
||||
# Sender energy
|
||||
senderEnergy=data%>%filter(isSender!=0)%>%group_by(simkey,wireless,wakeupfor)%>%summarise(senderEnergy=mean(energy))
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 226 KiB After Width: | Height: | Size: 247 KiB |
|
@ -55,12 +55,12 @@ prx=0.16
|
|||
ptx=0.16
|
||||
datasize=1000000 # 1Mb
|
||||
hintsize=8 # Integer
|
||||
latency="0ms"
|
||||
latency=0 # in Seconds
|
||||
bitrate="100kbps"
|
||||
|
||||
run-scenarios() {
|
||||
# Configure number of seed per scenarios
|
||||
nseed=100
|
||||
nseed=200
|
||||
|
||||
# Baseline
|
||||
echo "Baseline..."
|
||||
|
@ -116,7 +116,7 @@ do
|
|||
pon=0.4
|
||||
prx=0.16
|
||||
ptx=0.16
|
||||
latency="0ms"
|
||||
latency=0
|
||||
run-scenarios
|
||||
|
||||
# NbIot
|
||||
|
@ -126,6 +126,6 @@ do
|
|||
pon=0.4
|
||||
prx=0.65
|
||||
ptx=0.65
|
||||
latency="10ms"
|
||||
latency=0.01
|
||||
run-scenarios
|
||||
done
|
45272
results/results.csv
45272
results/results.csv
File diff suppressed because it is too large
Load diff
Binary file not shown.
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 184 KiB |
|
@ -1,33 +1,33 @@
|
|||
|
||||
|simkey |wireless | wakeupfor| sd| energy|
|
||||
|:---------------|:--------|---------:|---------:|--------:|
|
||||
|baseline |lora | 60| 11.42543| 582.4248|
|
||||
|extended |lora | 60| 247.76639| 724.7427|
|
||||
|hint |lora | 60| 141.15912| 656.7747|
|
||||
|hintandextended |lora | 60| 247.76853| 724.7439|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd| energy|
|
||||
|:---------------|:--------|---------:|---------:|--------:|
|
||||
|baseline |nbiot | 60| 46.29838| 602.1441|
|
||||
|extended |nbiot | 60| 101.21359| 636.9688|
|
||||
|hint |nbiot | 60| 318.63537| 760.2035|
|
||||
|hintandextended |nbiot | 60| 101.24586| 636.9882|
|
||||
|baseline |lora | 60| 62.57994| 599.9171|
|
||||
|extended |lora | 60| 160.41870| 659.9538|
|
||||
|hint |lora | 60| 142.47554| 659.4854|
|
||||
|hintandextended |lora | 60| 160.41978| 659.9545|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd| energy|
|
||||
|:---------------|:--------|---------:|--------:|--------:|
|
||||
|baseline |lora | 180| 79.1002| 1776.200|
|
||||
|extended |lora | 180| 295.1277| 1923.262|
|
||||
|hint |lora | 180| 327.1645| 2025.396|
|
||||
|hintandextended |lora | 180| 295.1311| 1923.265|
|
||||
|baseline |nbiot | 60| 254.6843| 670.2415|
|
||||
|extended |nbiot | 60| 267.4312| 672.2935|
|
||||
|hint |nbiot | 60| 251.8964| 686.3856|
|
||||
|hintandextended |nbiot | 60| 267.4376| 672.2998|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd| energy|
|
||||
|:---------------|:--------|---------:|--------:|--------:|
|
||||
|baseline |nbiot | 180| 157.3624| 1827.347|
|
||||
|extended |nbiot | 180| 142.5041| 1819.366|
|
||||
|hint |nbiot | 180| 167.7749| 1866.084|
|
||||
|hintandextended |nbiot | 180| 142.5446| 1819.393|
|
||||
|baseline |lora | 180| 182.9307| 1819.456|
|
||||
|extended |lora | 180| 238.3423| 1837.015|
|
||||
|hint |lora | 180| 176.8297| 1903.016|
|
||||
|hintandextended |lora | 180| 238.3433| 1837.015|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd| energy|
|
||||
|:---------------|:--------|---------:|--------:|--------:|
|
||||
|baseline |nbiot | 180| 741.7280| 1987.778|
|
||||
|extended |nbiot | 180| 708.2636| 1961.533|
|
||||
|hint |nbiot | 180| 697.9564| 1986.061|
|
||||
|hintandextended |nbiot | 180| 708.2662| 1961.541|
|
||||
|
||||
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
|
||||
|simkey |wireless | wakeupfor| sd_success| success| senderEnergy| receiverEnergy| senderUptime| receiverUptime| nSendFail|
|
||||
|:---------------|:--------|---------:|----------:|-------:|------------:|--------------:|------------:|--------------:|---------:|
|
||||
|baseline |lora | 60| 0.000000| 0.00| 614.6688| 579.4935| 1440.000| 1439.945| 28.41|
|
||||
|extended |lora | 60| 1.598105| 5.54| 1464.4720| 657.4945| 2952.060| 1579.271| 18.46|
|
||||
|hint |lora | 60| 0.000000| 0.00| 778.7424| 645.6868| 1440.000| 1568.139| 27.99|
|
||||
|hintandextended |lora | 60| 1.598105| 5.54| 1464.4797| 657.4952| 2952.074| 1579.272| 18.46|
|
||||
|baseline |lora | 60| 0.000000| 0.00| 806.400| 581.1460| 1440.000| 1439.923| 28.435|
|
||||
|extended |lora | 60| 1.509468| 5.73| 1170.140| 613.5733| 2089.535| 1500.595| 18.270|
|
||||
|hint |lora | 60| 0.000000| 0.00| 806.400| 646.1295| 1440.000| 1568.298| 27.975|
|
||||
|hintandextended |lora | 60| 1.509468| 5.73| 1170.144| 613.5736| 2089.542| 1500.596| 18.270|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd_success| success| senderEnergy| receiverEnergy| senderUptime| receiverUptime| nSendFail|
|
||||
|:---------------|:--------|---------:|----------:|-------:|------------:|--------------:|------------:|--------------:|---------:|
|
||||
|baseline |nbiot | 60| 0.000000| 0.00| 732.9846| 590.2495| 1440.000| 1439.945| 28.41|
|
||||
|extended |nbiot | 60| 1.591486| 5.55| 937.8329| 609.6175| 1622.902| 1458.437| 18.45|
|
||||
|hint |nbiot | 60| 0.000000| 0.00| 1399.3148| 702.1024| 1440.000| 1568.139| 27.99|
|
||||
|hintandextended |nbiot | 60| 1.591486| 5.55| 937.9493| 609.6281| 1623.013| 1458.447| 18.45|
|
||||
|baseline |nbiot | 60| 1.296148| 2.22| 1512.027| 593.7155| 1440.026| 1439.923| 26.955|
|
||||
|extended |nbiot | 60| 1.594305| 6.03| 1557.360| 591.8329| 1483.200| 1443.941| 21.815|
|
||||
|hint |nbiot | 60| 1.580153| 5.84| 1512.023| 611.3277| 1440.022| 1466.598| 26.245|
|
||||
|hintandextended |nbiot | 60| 1.594305| 6.03| 1557.387| 591.8374| 1483.226| 1443.944| 21.815|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd_success| success| senderEnergy| receiverEnergy| senderUptime| receiverUptime| nSendFail|
|
||||
|:---------------|:--------|---------:|----------:|-------:|------------:|--------------:|------------:|--------------:|---------:|
|
||||
|baseline |lora | 180| 0.0000000| 0.00| 2022.634| 1753.797| 4319.890| 4317.521| 37.05|
|
||||
|extended |lora | 180| 1.2535203| 9.38| 2817.306| 1860.257| 5897.747| 4517.161| 14.03|
|
||||
|hint |lora | 180| 0.1407053| 0.02| 2397.710| 1991.549| 4319.890| 4826.655| 35.11|
|
||||
|hintandextended |lora | 180| 1.2535203| 9.38| 2817.319| 1860.258| 5897.769| 4517.163| 14.03|
|
||||
|simkey |wireless | wakeupfor| sd_success| success| senderEnergy| receiverEnergy| senderUptime| receiverUptime| nSendFail|
|
||||
|:---------------|:--------|---------:|----------:|--------:|------------:|--------------:|------------:|--------------:|---------:|
|
||||
|baseline |lora | 180| 1.2001256| 1.630000| 2419.169| 1764.936| 4319.945| 4317.934| 35.41|
|
||||
|extended |lora | 180| 0.9293588| 9.246269| 2639.443| 1789.563| 4713.291| 4372.638| 17.52|
|
||||
|hint |lora | 180| 0.9888787| 8.934911| 2419.164| 1863.918| 4319.935| 4539.564| 29.18|
|
||||
|hintandextended |lora | 180| 0.9293588| 9.246269| 2639.447| 1789.564| 4713.298| 4372.639| 17.52|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd_success| success| senderEnergy| receiverEnergy| senderUptime| receiverUptime| nSendFail|
|
||||
|:---------------|:--------|---------:|----------:|-------:|------------:|--------------:|------------:|--------------:|---------:|
|
||||
|baseline |nbiot | 180| 1.616956| 7.54| 2326.829| 1783.422| 4319.887| 4317.528| 27.93|
|
||||
|extended |nbiot | 180| 1.157147| 9.88| 2242.672| 1795.911| 4407.490| 4330.240| 19.33|
|
||||
|hint |nbiot | 180| 1.151679| 9.87| 2332.235| 1840.255| 4319.825| 4398.176| 24.25|
|
||||
|hintandextended |nbiot | 180| 1.157147| 9.88| 2242.817| 1795.931| 4407.547| 4330.248| 19.33|
|
||||
|simkey |wireless | wakeupfor| sd_success| success| senderEnergy| receiverEnergy| senderUptime| receiverUptime| nSendFail|
|
||||
|:---------------|:--------|---------:|----------:|--------:|------------:|--------------:|------------:|--------------:|---------:|
|
||||
|baseline |nbiot | 180| 1.0855147| 8.880240| 4535.947| 1797.208| 4319.949| 4317.964| 24.380|
|
||||
|extended |nbiot | 180| 0.8422925| 9.352459| 4556.108| 1822.579| 4339.151| 4320.981| 20.140|
|
||||
|hint |nbiot | 180| 0.8408034| 9.344262| 4535.917| 1849.502| 4319.921| 4353.619| 22.545|
|
||||
|hintandextended |nbiot | 180| 0.8422925| 9.352459| 4556.121| 1822.586| 4339.163| 4320.982| 20.140|
|
||||
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ Inputs::Inputs(std::string node_name){
|
|||
seed=d["seed"].GetInt();
|
||||
hint_size=d["hint_size"].GetInt();
|
||||
n_nodes=d["nodes"].MemberCount();
|
||||
latency=d["latency"].GetDouble();
|
||||
|
||||
// Instantiate wake_ts
|
||||
for(auto& v:d["nodes"][node_name.c_str()]["wake_ts"].GetArray()){
|
||||
|
@ -155,8 +156,8 @@ void Inputs::GeneratePlatform(std::string p){
|
|||
pf.open (p);
|
||||
pf << "<?xml version='1.0'?>\n";
|
||||
pf << "<!DOCTYPE platform SYSTEM \"http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd\">\n";
|
||||
pf << "<platform version=\"4.1\">\n <AS id=\"AS0\" routing=\"Cluster\">\n";
|
||||
pf << " <link id=\"link\" bandwidth=\""<<d["bitrate"].GetString()<<"\" latency=\""<<d["latency"].GetString()<<"\" sharing_policy=\"SHARED\"></link>\n";
|
||||
pf << "<platform version=\"4.1\">\n <AS id=\"AS0\" routing=\"Full\">\n";
|
||||
pf << " <link id=\"link\" bandwidth=\""<<d["bitrate"].GetString()<<"\" latency=\"0ms\" sharing_policy=\"SHARED\"></link>\n";
|
||||
for (Value::ConstMemberIterator itr = d["nodes"].MemberBegin(); itr != d["nodes"].MemberEnd(); ++itr)
|
||||
{
|
||||
std::string name=itr->name.GetString();
|
||||
|
@ -169,7 +170,14 @@ void Inputs::GeneratePlatform(std::string p){
|
|||
pf << " <host id=\""<<name<<"\" speed=\"100.0f,100.0f,100.0f,100.0f\" pstate=\"0\">\n";
|
||||
pf << " <prop id=\"wattage_per_state\" value=\""<< power_off<<":"<<power_off<<", "<< power_on<<":"<<power_on<<", "<<power_rx<<":"<<power_rx<<", "<<power_tx<<":"<<power_tx<<"\" />\n";
|
||||
pf << " <prop id=\"wattage_off\" value=\"0\" />\n </host>\n";
|
||||
pf << " <host_link id=\""<<name<<"\" up=\"link\" down=\"link\"/>\n";
|
||||
}
|
||||
for (Value::ConstMemberIterator src = d["nodes"].MemberBegin(); src != d["nodes"].MemberEnd(); ++src)
|
||||
{
|
||||
for (Value::ConstMemberIterator dst = d["nodes"].MemberBegin(); dst != d["nodes"].MemberEnd(); ++dst)
|
||||
{
|
||||
if(src->name.GetString() != dst->name.GetString())
|
||||
pf << " <route src=\""<<src->name.GetString()<<"\" dst=\""<<dst->name.GetString()<<"\" symmetrical=\"no\"><link_ctn id=\"link\"/></route>\n";
|
||||
}
|
||||
}
|
||||
pf << " </AS>\n</platform>\n";
|
||||
pf.close();
|
||||
|
|
|
@ -80,4 +80,5 @@ public:
|
|||
int hint_size;
|
||||
int seed;
|
||||
int n_nodes;
|
||||
double latency;
|
||||
};
|
|
@ -40,7 +40,7 @@ int main(int argc, char **argv){
|
|||
unsigned int datasize=atoi(argv[12]);
|
||||
string bitrate(argv[13]);
|
||||
unsigned int hintsize=atoi(argv[14]);
|
||||
string latency(argv[15]);
|
||||
double latency=stod(argv[15]);
|
||||
|
||||
|
||||
// Setup seed
|
||||
|
@ -53,9 +53,7 @@ int main(int argc, char **argv){
|
|||
Value bitrateValue;
|
||||
bitrateValue.SetString(bitrate.c_str(),bitrate.size(),d.GetAllocator());
|
||||
d.AddMember("bitrate",bitrateValue,d.GetAllocator());
|
||||
Value latencyValue;
|
||||
latencyValue.SetString(latency.c_str(),latency.size(),d.GetAllocator());
|
||||
d.AddMember("latency",latencyValue,d.GetAllocator());
|
||||
d.AddMember("latency",latency,d.GetAllocator());
|
||||
d.AddMember("extended",extended,d.GetAllocator());
|
||||
d.AddMember("hint_size",hintsize,d.GetAllocator());
|
||||
|
||||
|
|
|
@ -24,7 +24,14 @@
|
|||
uptimeTrack=CLOCK-uptimeTrack; \
|
||||
uptime-=uptimeTrack; \
|
||||
uptime=uptime > 0 ? uptime : 0; \
|
||||
}
|
||||
}
|
||||
/// @brief Note that we need to simulate latency our self since we need to send instantaneous messages
|
||||
#define SEND(instruction) \
|
||||
{ \
|
||||
simgrid::s4u::this_actor::sleep_for(i.latency); \
|
||||
instruction; \
|
||||
}
|
||||
|
||||
|
||||
/// @brief Required by SimGrid
|
||||
XBT_LOG_NEW_DEFAULT_CATEGORY(simulator, "[DAO] Loosely Coupled DSS");
|
||||
|
@ -123,25 +130,26 @@ static void obs_node(std::vector<std::string> args) {
|
|||
p->duration=i.GetNextDuration();
|
||||
p->hint=i.GetNextTS();
|
||||
}
|
||||
MODE_ON();
|
||||
try {
|
||||
// First we send and instantaneous message
|
||||
// This allow first to detect if their is a receiver
|
||||
// (to not cause deadlock for the extended mode) and second
|
||||
// to inform the receiver if he should get a hint first
|
||||
MODE_TX();
|
||||
TRACK_UPTIME(m->put(p,0,uptime));
|
||||
simgrid::s4u::Mailbox *m_ded= simgrid::s4u::Mailbox::by_name(p->DedicatedMailbox);
|
||||
// First send hint if it is required
|
||||
MODE_TX();
|
||||
if(p->HasHint){
|
||||
TRACK_UPTIME(m_ded->put(p,i.hint_size,uptime));
|
||||
TRACK_UPTIME(SEND(m_ded->put(p,i.hint_size,uptime)));
|
||||
XBT_INFO("%s sent a hint successfully",CNAME);
|
||||
}
|
||||
// Then try sending the data
|
||||
if(i.extended)
|
||||
m_ded->put(p,i.data_size);
|
||||
else
|
||||
m_ded->put(p,i.data_size,uptime);
|
||||
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++;
|
||||
|
@ -157,7 +165,6 @@ static void obs_node(std::vector<std::string> args) {
|
|||
Payload *p; // Received data
|
||||
Payload *hint; // To Save the received hint
|
||||
bool hintReceived=false; // In case of error during data rx this will be use to check if we could use the *hint Payload object
|
||||
MODE_ON();
|
||||
try {
|
||||
// Get the instantaneous message
|
||||
TRACK_UPTIME(p=m->get<Payload>(uptime));
|
||||
|
|
Loading…
Add table
Reference in a new issue