I need to arrange 100 nodes in a hexagonal shape in my tcl script. My simulation is wireless (dsr protocol). How can I do this? Which is the best size of the grid? I thought 3000x3000.
Thank you.
I need to arrange 100 nodes in a hexagonal shape in my tcl script. My simulation is wireless (dsr protocol). How can I do this? Which is the best size of the grid? I thought 3000x3000.
Thank you.
The simplest way is to build the network graphically .. you can use nsg tool to build the network and generate the tcl code very easily
http://www.nsnam.com/2013/04/ns2-scenario-generator.html
first you must determine the transition range of nodes, put required number of node-> get network size , or you can compute it mathematically using transmition range and hexagon aria
https://en.wikipedia.org/wiki/Hexagon
If you plan to use nsg to draw a regular hexagon use this simple trick: