About GT-ITM under the NS-2

There might not be much organized information about how to use GT-ITM in NS2, so I just put some notes here, just in case I forget how to use it.

GT-ITM would have been built in your NS2, you can check it by searching under NS2 home directory. To use it, you need do the following steps.
1. Create the specification file for GT-ITM.
2. Generate the topology file.
3. Convert to NS2 format.
4. Tweak the result.

1. The format of the specification file could be found in the README file under the gt-itm/docs directory. Or, you will find it by google. And it is as follows.

## Comments :
## <#method keyword> <#number of graphs> [<#initial seed>]
## <#stubs/xit> <#t-s edges> <#s-s edges>
## <#n> <#scale> <#edgemethod> <#alpha> [<#beta>] [<#gamma>]
## number of nodes = 1*8* (1 + 4*6) = 200
ts 10 47
4 0 0
1 20 3 1.0
8 20 3 0.8
6 10 3 0.5

Save the content to whatever, e.g. ts200.

2. To generate the topology, run 'itm ts200'
After running the itm command, you get the .gb files that are generated topoloy files.

3. To convert to whatever NS2 can use, run 'sgb2ns ts200-0.gb ts200.tcl'
Then you get .tcl files.

4. You would need to pay attention to what would be obsolete in the generated .tcl files.
For newer version of NS2, you would probabily need to modify the .tcl code generated by sg2ns a little bit to get it work.
The duplex-link-of-interfaces statement is somewhat obsolete, and you would need to change it to duplex-link to get the code work.

To use the .tcl code in NS2, you will need to source the code, and run it.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章