GOD is general operations director who is aware of whole network topology.
Here god sets the dist (# hops) between node 0 and node 4 to be 1.
( but why/where is this information used??-answer awaited from CMU. )
The General Operations Director (GOD) object is used to store global
information about the state of the environment, network, or nodes that an
omniscent observer would have, but that should not be made known to any
participant in the simulation.
Currently, the god object is used only to store an array of the shortest
number of hops required to reach from one node to an other. The god object
does not calculate this on the fly during simulation runs, since it can be
quite time consuming. The information is loaded into the god object from the
movement pattern file where lines of the form.
$ns_ at 899.642 "$god_ set-dist 23 46 2
are used to load the god object with the knowledge that the shortest path
between node 23 and node 46 changed to 2 hops at time 899.642.
The generator for creating node movement files are to be found under "~ns/indep-utils/cmu-scen-gen/setdest/" directory local ns2 installation. Compile the files under setdest to create an executable. run setdest with arguments in the following way:
./setdest -n num_of_nodes -p pausetime -s maxspeed -t simtime -x maxx -y maxy outdir/scenario-file
Note that the index used for nodes now start from 0 instead of 1 as was in the original CMU version, to match with ns’s tradition of assigning node indices from 0.
For details, refer: http://www.isi.edu/nsnam/ns/tutorial/nsscript7.html