Commit d641b22d authored by Jarrod Pas's avatar Jarrod Pas
Browse files

Fixes tiny code style things

parent 4344252c
......@@ -2,6 +2,7 @@ from random import Random
from pydtn import Network, Node, random_trace, random_traffic
class RandomNode(Node):
def __init__(self, seed=None, **options):
super().__init__(**options)
......@@ -14,9 +15,10 @@ class RandomNode(Node):
return {target: 'random'}
return {}
def main():
nodes = 50
seed = 42
seed = 42
traffic_speed = 1
node_options = {
......@@ -38,5 +40,6 @@ def main():
print(network.stats_summary)
if __name__ == '__main__':
exit(main())
......@@ -116,7 +116,6 @@ class Network:
@property
def stats(self):
"""Return detailed statistics for the simulation."""
packets = [packet.stats for packet in self.packets]
nodes = [node.stats for node in self.nodes.values()]
......@@ -156,7 +155,6 @@ class Network:
return stats
class Packet:
"""An item to route through the network."""
......@@ -409,6 +407,7 @@ class Node:
@property
def stats(self):
"""Return node statistics."""
return dict(self._stats)
def __repr__(self):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment