Commit 5e5a9560 authored by Jarrod Pas's avatar Jarrod Pas
Browse files

Convert examples to traffic classes

parent 8bfb2ce1
Pipeline #1646 passed with stage
in 1 minute and 32 seconds
......@@ -4,7 +4,7 @@ __author__ = "Jarrod Pas <j.pas@usask.ca>"
from random import Random
from pydtn import Network, Node, random_trace, random_traffic
from pydtn import Network, Node, random_trace, RandomTraffic
class RandomNode(Node):
......@@ -48,7 +48,7 @@ def main():
'seed': seed,
'speed': 1,
}
traffic = random_traffic(nodes, **traffic_options)
traffic = RandomTraffic(nodes, **traffic_options)
trace_options = {
'seed': seed,
......
"""Example to run a batch of simlations on SHED data."""
__author__ = 'Jarrod Pas <j.pas@usask.ca>'
import sys
from argparse import ArgumentParser
from collections import namedtuple
from multiprocessing import Pool
from pydtn import Network, random_traffic, Node, EpidemicNode
from pydtn import Network, RandomTraffic, Node, EpidemicNode
from pydtn.community import BubbleNode, HCBFNode, LouvainCommunity
import pydtn.shed as shed
......@@ -37,7 +39,7 @@ def run_simulation(simulation):
'start': epoch,
'speed': 30 * 60, # 1 packet every 30 mins
}
traffic = random_traffic(nodes, **traffic_options)
traffic = RandomTraffic(nodes, **traffic_options)
network = Network(nodes, traffic=traffic, trace=trace)
network.run()
......
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