Agr-IoT / LEACH

Simulation of LEACH routing protocol on OMNET++
Other
17 stars 4 forks source link

Error after setting nominal capacity #8

Closed pjake12 closed 1 year ago

pjake12 commented 1 year ago

error 2 I get this error after setting nominal capacity of nodes to 0.1J

error 3 I get this error after setting nominal capacity of nodes to 0.5J

n-jay commented 1 year ago

I get this error after setting nominal capacity of nodes to 0.1J

I feel like the energy in the node is not sufficient to run the nodes resulting in the crash. You can perhaps remove the sim-time-limit and see if it makes a difference

I get this error after setting nominal capacity of nodes to 0.5J

I've tested this on 0.5J but was unable to reproduce this error. Need further info about your setup.

Please update this thread if you made any progress with a resolution

pjake12 commented 1 year ago

Hello @n-jay

It seems to work only when nominal capacity is at 1J. I tried it at 5J and 10J but it just ends the simulation immediately. I also get this error whenever I try to rebuild the circuit.

error 4

Also here are my other questions about this simulation:

What is the difference of nominal capacity and initial capacity? Are the nodes and base station placed on random locations? Why doesn't the LEACH simulation change cluster heads after the current cluster head is done sending the packets to the base station? How much time does one round take before the simulation changes cluster heads?

n-jay commented 1 year ago

It seems to work only when nominal capacity is at 1J. I tried it at 5J and 10J but it just ends the simulation immediately. I also get this error whenever I try to rebuild the circuit.

I cannot recreate this issue without knowing what changes have been done to your specific simulation. Might I suggest removing this line as I encountered something similar during development: https://github.com/Agr-IoT/LEACH/blob/67f65a670de7475fef146002a2172bf0295deaa0/LEACH3/omnetpp.ini#L63

What is the difference of nominal capacity and initial capacity?

Please refer INET documentation. Tool tips when hovering over parameters in ini file also help

Selection_504

Are the nodes and base station placed on random locations?

Yes, depending on number of nodes set they are placed randomly. Please refer INET documentation.

Why doesn't the LEACH simulation change cluster heads after the current cluster head is done sending the packets to the base station?

It does. Once all queued messages are sent to BS, it removes itself as a CH. Next, CH is elected based on LEACH algorithm.

How much time does one round take before the simulation changes cluster heads?

There is no pre-determined time. Once a CH is finished sending data to BS, it removes itself as a CH.