Skip to content

Commit

Permalink
Consistently use "message propagation delay".
Browse files Browse the repository at this point in the history
Signed-off-by: Daira Emma Hopwood <[email protected]>
  • Loading branch information
daira committed Oct 20, 2023
1 parent 224faee commit 6e2686e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions simtfl/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Network:
def __init__(self, env, nodes=None, delay=1):
"""
Constructs a Network with the given `simpy.Environment`, and optionally
a set of initial nodes and a message delay.
a set of initial nodes and a message propagation delay.
"""
self.env = env
self.nodes = nodes or []
Expand Down Expand Up @@ -73,8 +73,8 @@ def run_all(self, *args, **kwargs):
def send(self, sender, target, message, delay=None):
"""
(process) Sends a message to the node with ident `target`, from the node
with ident `sender`. The message delay is normally given by `self.delay`,
but can be overridden by the `delay` parameter.
with ident `sender`. The message propagation delay is normally given by
`self.delay`, but can be overridden by the `delay` parameter.
"""
if delay is None:
delay = self.delay
Expand All @@ -90,7 +90,7 @@ def send(self, sender, target, message, delay=None):
def convey(self, delay, sender, target, message):
"""
(process) Conveys a message to the node with ident `target`, from the node
with ident `sender`, after waiting for the given transmission delay.
with ident `sender`, after waiting for the given message propagation delay.
This normally should not be called directly because it *may* only complete
after the message has been handled by the target node. The caller should
not depend on when it completes.
Expand Down
2 changes: 1 addition & 1 deletion simtfl/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def handle(self, sender, message):

class SenderTestNode(PassiveNode):
def run(self):
# We send messages at times 0, 1, 2. Since the network
# We send messages at times 0, 1, 2. Since the message
# propagation delay is 1 (the default), they will be
# received at times 1, 2, 3.
for i in range(3):
Expand Down

0 comments on commit 6e2686e

Please sign in to comment.