Update comments

This commit is contained in:
Loic Guegan 2022-06-23 11:11:35 +02:00
parent 4854e15318
commit 0daa96651f

View file

@ -187,15 +187,17 @@ class Simulator:
- 2 breakpoint_manual (3,timestamp,0,0)
- 3 breakpoint_auto (4,timestamp,0,0)
Very important: when the simulator wakes up a node (changing is state to running)
data that should be received by that node on the current simulated time SHOULD be in the queue!
Thus, the send event must be handle before the other event (priority equals to 1). Otherwise plugings such as the power states
one may not gives accurate results because of missing entries in the nodes received queues.
Very important notes:
- When the simulator wakes up a node (changing is state to running) data that should be received by that node
on the current simulated time SHOULD be in the queue! Thus, the send event must be handle before the other event (priority equals to 1).
Otherwise plugings such as the power states one may not gives accurate results because of missing entries in the nodes received queues.
- The state of a node should always be updated (e.g node["state"]="running") BEFORE updating its
queue (e.g node.rqueue.put(("timeout_remove",0))
"""
def __init__(self,netmat):
"""
Format of netmat: { "interface": {"bandwidth": numpy_matrix, "latency": numpy_matrix, "is_wired":bool}}
Format of netmat: { "interface": {"bandwidth": numpy_matrix_2D, "latency": numpy_matrix_2D, "is_wired":bool}}
For wireless interfaces the diagonals of the bandwidth and latency matrices are very important.
They determine the duration of the tranmission for THE SENDER. It allows to have a different tx duration per node and per interface.
Thus, at each wireless communication, an addionnal event is created for the sender that corresponds to a send to himself (diagonals of the matrices) used