Comments (6)
PDR, latency, etc graph in Cooja Simulator is calculated by java code see S-logix
from cooja.
How to calculate latency in ratio and pdr with energy consumption.
from cooja.
any one know
from cooja.
this code MIght be useful.
<script> TIMEOUT(900000, log.log(" Energy_consumption = " + energyconsumption + " (Joules) " + "\n" + " Delay = " + avgdelay + " (Sec) " + "\n" + " PDR = " + totalPRR + "\n")); packetsReceived= new Array(); packetsSent = new Array(); timeReceived = new Array(); timeSent = new Array(); delay = new Array(); serverID = 1; nodeCount = 16; totalPRR = 0; throughput = 0; datalength = 23; delayval=0.0; avgdelay=0.0; totalenergy = 0.0; energy_t =0.0; energy_consumption = 0.0; energyconsumption =0.0; e_count=0; for(i = 0; i < nodeCount; i++) { packetsReceived[i] = 0; packetsSent[i] = 0; timeSent[i] = 0; timeReceived[i]=0; delay[i]=0; } while(1) { YIELD(); msgArray=msg.split(' '); if(msgArray[0].equals("Sending")) { if(msgArray.length == 9) { senderID = parseInt(msgArray[9]); packetsReceived[senderID]++; timeReceived[senderID] = time; totalReceived = totalSent = 0; totaldelay = 0.0; count1 = 0; for(i = serverID + 1; i < nodeCount; i++) { totalReceived += packetsReceived[i]; totalSent += packetsSent[i]; if (timeReceived[i] > 0) { delayval = timeReceived[i] - timeSent[i]; delayval = delayval / 10000000; if (delayval > 0) { delay[i] = delay[i] + delayval; } } } for(i = serverID + 1; i < nodeCount; i++) { count1++; totaldelay = totaldelay + delay[i]; } avgdelay = totaldelay / count1; totalPRR = totalReceived / totalSent; } else if(msgArray.length == 6) { packetsSent[id]++; timeSent[id] = time; } } if(msgArray[0].equals("Energy")) { if(msgArray.length == 6) { e_count++; energy_t = parseInt(msgArray[5]); totalenergy = energy_t + totalenergy; energy_consumption = totalenergy / e_count; energyconsumption = energy_consumption / 1000; energyconsumption = energyconsumption / 128; } } }</script>from cooja.
How to plot PDR, latency, etc graph in Cooja Simulator? now collect view is removed
Hi. Have you solved that?
from cooja.
hello any give or suggest packet delivery ratio source code using cooja simulator
from cooja.
Related Issues (20)
- Cooja crashing all the time HOT 2
- Failed to run Cooja HOT 1
- I don't have "Collect View" option/button in my Cooja Simulator HOT 2
- Log output missing HOT 1
- LoraWan simulation
- Feature request: Compiling a single .jar file HOT 1
- Remove Avrora
- ScriptRunner doesn't load HOT 4
- "Mote output" filter is slowpoke HOT 1
- want to add 5G radio medium in cooja simulator HOT 5
- LogisticLoss: increasing path loss exponent improves radio performance HOT 4
- Move to gradle breaks tutorials HOT 1
- Blackhole and Rank attacks
- Automatically starting the simulation from command line HOT 1
- How can I get the Cooja sources code's log output? HOT 1
- Problem with cooja build HOT 6
- Cooja Simulation Loading/Saving Incorrect Mote Types HOT 1
- SIGSEGV since latest commits HOT 9
- Support for mobility HOT 1
- Wrongly calcutated packet size in CoojaRadio
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cooja.