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.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值