intrig-unicamp / mininet-wifi

Emulator for Software-Defined Wireless Networks
https://mn-wifi.readthedocs.io/
Other
431 stars 239 forks source link

error with energy model #409

Closed somayahmont closed 2 years ago

somayahmont commented 2 years ago

I have a problem with an energy model in mininet wifi . the problem is the appearance of this msg (error("Error with the energy consumption function\n")) and then the model calculate the energy of all sensor similarly even though the state of the sensors different , one Rx , another Tx and last idle . the attachment figures explain my problem.

thank you .. new nwe1 packet packet2

ramonfontes commented 2 years ago

Please use xterm instead of the mn-wifi CLI

somayahmont commented 2 years ago

I try to send traffic between two sensors (sensor1 and sensor2) using xterm, the energy consumption results of sensor1 and sensor 2 and sensor3 are similar even though the sensor3 didn’t receive and traffic

ramonfontes commented 2 years ago

What do you mean with similar and how can I reproduce the issue? Did you check the energy model? https://github.com/intrig-unicamp/mininet-wifi/blob/842a11d1898fb06094f41d4e7662b3f5c3ee9e74/mn_wifi/energy.py#L74 Are you experiencing a non expected result?

somayahmont commented 2 years ago

yes sir I experiences non expected results and I tried the energy model in the battery model (battery.py) I assume sensor1 will be Tx since will transmit the packets, sesnor2 Rx since will be receiver and sensor3 idle since no traffic received or transmitted by it. but the results I earned showed below mininet-wifi> py sensor2.wintfs[0].consumption 185.43178433589938 mininet-wifi> py sensor1.wintfs[0].consumption 190.56015297009947 mininet-wifi> py sensor3.wintfs[0].consumption 195.77181052293778 mininet-wifi> py sensor1.wintfs[0].consumption 200.89802351818088 mininet-wifi> py sensor2.wintfs[0].consumption 203.97927399923805 mininet-wifi> py sensor3.wintfs[0].consumption 207.05517788879874 mininet-wifi> py sensor1.wintfs[0].consumption 212.16382739961148 mininet-wifi> py sensor3.wintfs[0].consumption 214.2189990353108 mininet-wifi> py sensor2.wintfs[0].consumption 216.2620070007563 mininet-wifi> py sensor1.wintfs[0].consumption 222.44330399787427 mininet-wifi> py sensor2.wintfs[0].consumption 225.54242814803126 mininet-wifi> py sensor3.wintfs[0].consumption 230.82976931526665 mininet-wifi> py sensor1.wintfs[0].consumption 233.95938428127766 mininet-wifi>

ramonfontes commented 2 years ago

Is sensor3 receiving some packets? Please check it and provide reproducible steps. I unfortunately cannot reproduce such behavior by only considering battery.py as it is and with sensor1 as transmiter and sensor2 as receiver.

ramonfontes commented 2 years ago

Closing due to inactivity