随便。如何计算平均队列大小?
我在多路径方案中通过两个网络构建了数据包传输模型。每个数据包都作为代理。逻辑如下:首先,将数据包传输到网络1(如果它具有足够的资源),如果资源在Network1中不够,则数据包将传输到Network2中。如果两个网络中没有足够的资源,则数据包都在队列中等待。数据包还具有一生。如果寿命上升,则数据包离开队列。
如何计算队列的平均大小?我的意思是在队列中等待的数据包,但不要将其直接通过。如果任何网络中都有足够的资源来发送数据,我们不应该计算此数据包,因为它会立即离开队列。但是,队列在Enter上计数每个数据包。从另一侧,数据包可以等待资源。如何通过模拟来计数队列中的平均等待数据包数量?
队列还表明,更多的输入数据(比生成的数据包更多)。
感谢任何帮助。谢谢。
I built the model of packets transmission through two networks in multipath scenario. Each packet is presented as an agent. The Logic is the following: firstly, packets are transmited into the Network1 (if it has enough resources), if resources are not enough in Network1 the packets are transmitted into Network2. If there are not enough resources in both Networks the packets are waiting in the Queue. The packets also have the lifetime. If the lifetime is up the packet leave the Queue.
How to count the average size of the queue? I mean the packets which are waiting in the queue, but don't pass it immediatelly. If there is enough resourses in any Network to send the data we shouldn't count this packet because it will immediately leave the queue. However the Queue count each packet on Enter. From the other side, the packets may wait for resources. How to count the average number of waiting packets in a queue through the simulation?
Also the Queue shows that larger numbers of input data (more packets than were generated).
I will appreciate any help. Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
创建一个定期计算
queue.size()
的循环事件。您决定间隔。然后,该事件将此值添加到新的
statistics
对象,您可以从中检索均值和其他统计数据(使用mystatisticsObject.add(queue.size())
事件)Create a cyclic event that regularly computes
queue.size()
. You decide on the interval.The event then adds this value to a new
Statistics
object and you can retrieve the mean and other stats from that (usemyStatisticsObject.add(queue.size())
in the event)