Phase 4:整合vbf和uwaloha,从反馈的ack中获取信息了

来源:互联网 发布:node log4j 编辑:程序博客网 时间:2024/04/28 02:05

1_bcst.tcl:

SINK 5 : terminates (send 20, recv 0, cum_delay 0.000000)

SINK 0 : terminates (send 0, recv 10, cum_delay 1.801000)

SINK(0) : send_id = 5, num_recv = 10

god: the energy consumped is 14.126400

2_aloha.tcl:

SINK 5 : terminates (send 20, recv 0, cum_delay 0.000000)

SINK 0 : terminates (send 0, recv 10, cum_delay 30.755829)

SINK(0) : send_id = 5, num_recv = 10

god: the energy consumped is 16.346832

两种场景都是链式的拓扑结构,可以看出uwaloha.tcl甚至比broadcast消耗的能量多。

如果将Uwaloha的ACKOn参数设置为0的话,那么成功率不变但是消耗能量减少为:14.864928。

节点静止,无法识别其性能,那么如果使节点移动如何?试试吧!

double UnderwaterChannel::distCST_ =100.0;

让节点动起来,然后我们在讨论信道状况!

为嘛修改后的代码的recv都为0呢?(这个问题必须解决!!!)