File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 8
8
from simulation import Simulation
9
9
10
10
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."""
12
13
13
14
out_filename = "data.out"
14
15
if len (sys .argv ) < 5 :
32
33
sim = Simulation (seed , network_size )
33
34
lookups = 1000
34
35
# 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 ("\r Initializing network {0:.1f}%" .format (i / (network_size / 2.0 ) * 100 ))
39
+ sys .stdout .flush ()
40
+ sim .perform_node_lookup ()
40
41
41
42
sys .stdout .write ("\r Initializing network 100% \n \n " )
42
43
sys .stdout .flush ()
You can’t perform that action at this time.
0 commit comments