Scripts and Flags

This section lists all available flags (options) with which each python script can be ran with. All scripts should be run with the following pattern:

$ python <script> <options>

Flags whose Argument Type is void do not require arg values to be passed when specified in <options>. All other types require an arg value to be given following the option if specified. Flags whose Default Value is None are mandatory to be included in <options>, unless an alternative flag such as --directory in hive_simulation.py is given. Example:

$ python hive_simulation.py -d -i 30 --epochs=360

Args of type List[str] should be inputed as comma seperated list of string without blank spaces. Example:

$ python mixing_rate_sampler.py -f a_func,another_func,yet_another_func

simfile_generator.py

Long option

Short Option

Argument Type

Default Value

Description

–file

-f

str

None

Creates a simulation file with the specified name inside SIMULATION_ROOT.

hive_simulation.py

Long option

Short Option

Argument Type

Default Value

Description

–directory

-d

void

False

Executes all simulation files available inside SIMULATION_ROOT folder.

–file

-f

str

None

Executes the specified file, located inside SIMULATION_ROOT. Extension must be included. This argument is ignored if -d flag is set.

–iterations

-i

int

1

How many times each simulation file is executed.

–start_iteration

-i

int

1

A number that marks the first desired identifier for the simulations that will execute.

–epochs

-e

int

480

Number of discrete time steps (epochs) each executed simulation lasts.

–threading

-t

int

0

Number of threads the script will create. Each thread runs one simulation at a time.

–master_server

-m

str

"SGMaster"

Name of the class that manages the systems’ cluster_groups and reads the simulation file (See app.domain.master_servers)

–cluster_group

-c

str

"SGClusterExt"

Name of the class that represents a cluster_group (See app.domain.cluster_groups).

–network_node

-n

str

"SGNodeExt"

Name of the class that represents a network_node (See app.domain.network_nodes).

mixing_rate_sampler.py

Long option

Short Option

Argument Type

Default Value

Description

–network_sizes

-n

Tuple[int]

(8, 16)

The network sizes to be tested.

–samples

-s

int

30

Number of random adjacency matrices and desired steady-state vectors should be generated for each network size.

–module

-m

str

"domain.helpers.matrices"

Name of the module where -f flag functions are located.

–functions

-f

List[str]

["new_mh_transition_matrix", "new_sdp_mh_transition_matrix", "new_go_transition_matrix", "new_mgo_transition_matrix"]

Name of functions that will use -s generated samples to create Markov transition matrices whose mixing rate will be stored in JSON’s output.

–allow_sloops

-a

int

1

Indicates if -s flag generated adjacency matrices can have 1 values in diagonal entries.

–enforce_sloops

-e

int

1

Forces -s flag generated adjacency matrices to have 1 values in diagonal entries. If a flag is set to 0 when e is set to 1, an error will be raised.