How to do custom statistic in OPNET
来源:互联网 发布:mac暂存盘已满怎么办 编辑:程序博客网 时间:2024/04/30 08:23
Nowadays, I'm doing a little much simulation in opnet.
Here, I find a way to do the custom statistic in OPNET, because I should statistic a value that the opnet does not provided by default.
There are 4 steps to do the custom statistic.
- In the Process Model where you should culculate the statistic, define a Stathandle in the State Variable. Here we define a Stathandle "avg_delay_gsh".
- Still in Process Model, define a "Global Statistic" by clicking Interface Menu, and choose the Global Statistics Menu Item. Here, we define it as "Average Delay".
- in the Enter Execs of the Init State, write the following code:
avg_delay_gsh=op_stat_reg("Average Delay",OPC_STAT_INDEX_NONE,OPC_STAT_GLOBAL); - In somewhere you should culculate the statistic value, write the following code:
op_stat_write(avg_delay_gsh,delay);
Now, you have write the statistic value to your simulation system, in the graph tool, you can draw a plot of the statistic Average Delay now.
- How to do custom statistic in OPNET
- How to show query plan and runtime statistic in Derby
- How to create custom price in Magento?
- How do I register a custom filetype in iOS【链接】
- How to do sleep in bat file
- Parcelable - How to do that in Android
- How to do TCP keepalives in Python
- Neat Stuff to Do in List Controls Using Custom Draw
- Neat Stuff to Do in List Controls Using Custom Draw
- Neat Stuff to Do in List Controls Using Custom Draw
- opnet之Statistic Package
- How to do in-app purchase in ios5?
- How To Install Custom Component in Delphi (into existing package).
- How to define a custom separator in TLex
- How to create readonly columns in MOSS 2007 custom list
- How to use custom delegates in Objective-C
- How to use custom delegates in Objective-C
- How to create custom shortcut in visual studio
- 两种数据库二进制字段存取控制方式的对比
- 連接任何數據庫
- 哀
- 如何绘制圆形图像?
- 孤独的灵魂 2006-10-17
- How to do custom statistic in OPNET
- [软工]说不
- 面试有感——只为了完成任务很多年以后脑袋里面什么也不会留下
- VC6(SP6)+STLPort4.6.2安装全攻略
- 从窗口飞出的大学生,你绝不象化蝶那么优美!
- 简单的ASP.NET三层架构数据库后台
- Repeater控件
- 反编译:java代码中含有同步和异常的反编译前后代码对照的一个例子(xiongjy)
- C 语言复习与提高---III. 语句