Well, ty for your answers. Surely very usefull.
First of all, as i said, never heard about matlab 1 month ago. I am not also a programmer, i am a T.I. infrastructure. Telling you this because in the link below i plublished my code... (Last version from now - nov 28th 2019). To you, that surely don't need, because already a high level pro, just as "case study" and to the others that need something "partially made" in Wireless Sensor network routing problems... (https://github.com/cesarfgs/matlab-wsn-code)
My question to you, Mister Walter:
1) do you thing the implemented code "gets near" the reality about transmitted packets? What more you think is possible to implement?
2) From now on, starting as this code is right now, i will implement a ACO to, using the same "original WSN generated", increases network life time, avoiding routes/nodes to die (Whats your point of view?)
Cheers mister Walter, valuable contributions...
DESCRIPTION OF THE CODE AVAILABLE IN GITHUB LINK ABOVE:
1) you can choose node number (nodeNo parameter)
2) you can choose node signal range (range parameter - Its a 1x1 Kilometer area, algo range in meters)
3) once network nodes position randomly formed and all nodes neighbors by radius (range) criteria...
3.1) Shorthestpath nodes discovered between node 1 (sender) and node 2 (receiver) start energy consumption due routing (forward) task...
3.2) As soon 1 node dies, current route becames "useless"
3.3) New shortest path is discovered... (restart 3.1 till no more routes available)
4) I assume that every energy consumption loop is 1 packet transmittion
5) At the end, it "reports":
5.1) All routes discovery events from the begging till the end of network (no more routes)
5.2) hop count of each route iteration
5.3) Nodes involved (In the same order they are met in route)
5.4) Hypothetical packets transmitted
5.5) Dead node number (ID) every iteration
6) It also plots the original WSN
7) ALso plot every routing loop result and report
8) Mark all nodes involved ini each route event
9) Mark all dead nodes
10) Write reports to an external file into same folder the main.m file is
I hope it helps some one....