hello i m facing problem to find the shortest path from node in 100 * 100 matric where sink node is at center all other nodes find the shortest path from their location to sink node i need code of this problem send code at atifaziz463@yahoo.com
12 次查看(过去 30 天)
显示 更早的评论
i am writing a thesis to find the shortest path. sink node is at center and all other nodes with in 100*100 sq.m will calculate the shortest path from the sink. if any one can find matlab code plz send me at atifaziz463@yahoo.com
2 个评论
Lakshmipriya M
2017-3-29
can anyone send me the code for connecting all nodes into base station with calculating the distance pls
Lakshmipriya M
2017-3-29
can anyone tell me a code for routing in path establishment using hop count
回答(2 个)
Walter Roberson
2016-10-6
If this is a regular grid with no obstacles then just follow the edges towards the target.
If instead you have a set of sources that are scattered at integer coordinates within a 100 x 100 grid, such as if you are working on a wireless sensor network, then you need to define the rules about which nodes are connected and the cost of connecting. If you are working on a wireless sensor network then the best path for any one node to transmit in isolation to reach the sink is not the best approach to take if all of the nodes need to communicate with the sink within a short time, because some of the links would get clogged. Just like with a traffic jam, sometimes you can get somewhere faster by taking a longer route that is in less demand.
13 个评论
Sindhuja john
2023-5-29
Hi ..! I have 100 nodes and i divided it into 10 cluster and there are 10 cluster head. I want to send a packet from each cluster head to destination (110,110) in shortest path. can anyone have solution for my problem... kindly help me..
cesar silva
2019-11-29
EVEN ITS AN OLD POST, SOMEONE ELSE MAYBE COMES HERE LOOKING FOR A HELP... HERE IT IS:
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....
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!