Skip to content

Commit e51e262

Browse files
author
cms5347
committed
Turned training back on
1 parent f9452e9 commit e51e262

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

RunSimulation.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
from simulation import Simulation
99

1010
usage = """Usage: ./RunSimulation.py <random seed> <network size> <trials> <disable frequency> [<data output file>]
11-
During each trial, the disable frequency is multiplied by the trial number to get the number of nodes to disable for that trial"""
11+
During each trial, the disable frequency is multiplied by the trial number to get the number of nodes to disable for that trial.
12+
Training will perform half the network size worth of random lookups before testing default is n."""
1213

1314
out_filename = "data.out"
1415
if len(sys.argv) < 5:
@@ -32,11 +33,11 @@
3233
sim = Simulation(seed, network_size)
3334
lookups = 1000
3435
# Train the network a bit by doing random lookups
35-
# for i in range(int(network_size / 2)):
36-
# if i % 20 == 0:
37-
# sys.stdout.write("\rInitializing network {0:.1f}%".format(i / (network_size / 2.0) * 100))
38-
# sys.stdout.flush()
39-
# sim.perform_node_lookup()
36+
for i in range(int(network_size / 2)):
37+
if i % 20 == 0:
38+
sys.stdout.write("\rInitializing network {0:.1f}%".format(i / (network_size / 2.0) * 100))
39+
sys.stdout.flush()
40+
sim.perform_node_lookup()
4041

4142
sys.stdout.write("\rInitializing network 100% \n\n")
4243
sys.stdout.flush()

0 commit comments

Comments
 (0)