can anyone translate this pseudo code for me

1 Ansicht (letzte 30 Tage)
raghad abd
raghad abd am 21 Feb. 2020
Kommentiert: raghad abd am 21 Feb. 2020
can anyone translate this pseudo code for me
N: number of sensors
Network topology information
1: while 1 do
2: i = 1
3: while i < N do
4: discover neighbors
5: if node i has no neighbor then
6: mark node as unreachable
7: else
8: Compute EWij for all neighbors of i
9: Run DIJKSTRA(node i, sink) with computed edge
weights
10: //check battery threshold of nodes on the path
11: if battery threshold is satisfied then
12: Send packet over that path
13: Update Fresidual for nodes on the path
14: Mark dead nodes
15: else
16: Skip that node for one round
17: Mark node as unreachable from node i
18: end if
19: end if
20: i = i + 1 //go next node
21: end while
22: //all nodes are traversed for one round
23: if coverage constraint is satisfied then
24: Network is living, go next round
25: else
26: End of the simulation
27: break
28: end if
29: end while
  4 Kommentare
darova
darova am 21 Feb. 2020
  • i can send you the paper if you want!
I don't. I want you to write the code. I can correct it or help with problems
raghad abd
raghad abd am 21 Feb. 2020
That sounds great thank you

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by