Skip to content
Snippets Groups Projects

pydtn agkmeans and version 1.0

Merged Hunter McConnell (rtm534) requested to merge summer2022 into develop
1 file
+ 1
8
Compare changes
  • Side-by-side
  • Inline
+ 1
8
@@ -26,7 +26,7 @@ def run_simulation(simulation):
metadata = path.join(simulation.trace, 'metadata.json')
trace = CSVTrace(csv, metadata=metadata)
epoch = 7*24*60*60 # 7 days
epoch = 7*24*60*60 # 7 days
node_type = simulation.node_type
node_options = {
@@ -63,9 +63,6 @@ def run_simulation(simulation):
def main(args):
"""Run simulation for each seed in args."""
log = pprint if args['pretty'] else print
pool = Pool()
@@ -81,8 +78,6 @@ def main(args):
HCBFLouvainNode,
BubbleKCliqueNode,
HCBFKCliqueNode,
]
for seed in args['seeds']:
@@ -90,13 +85,11 @@ def main(args):
sim = Simulation(trace=trace, node_type=node_type, seed=seed)
simulations.append(sim)
for stats in pool.imap_unordered(run_simulation, simulations):
log(stats)
def parse_args(args):
"""Parse arguments."""
parser = ArgumentParser()
parser.add_argument('shed')
Loading