# Running the Toolkit from the Command Prompt It is possible to run the Toolkit's connectivity analysis functions from the command line. This might be useful in order to run many analyses in succession using a batch file (.bat). It also may be used to facilitate integration of the Toolkit's graph analysis functions into other software programs. The executable file 'Network Flow.exe' is found in the top-level directory where the toolkit is installed (e.g., C:|Program Files\ConnectivityToolkit\). The executable file 'pythonflow.exe' is found in the second-level directory 'pythonflow' where the toolkit is installed (e.g., C:|Program Files\ConnectivityToolkit\pythonflow). These files depend on other files within those directories, so must be called using their existing pathnames rather than copied to another directory. The command-line syntax for pythonflow.exe, the Toolkit's NetworkX based function is: pythonflow.exe <option> <input.txt> <output.txt> The input file format (typically produced via the GUI 'Graphs' tab) is a space delimited textfile with three columns: from_node to_node edge_weight The output file format is a csv with two columns: node, value The following flags determine the method used: -b // Betweenness centrality -d // Subset betweenness centrality -c // Current flow betweenness centrality -e // Subset current flow betweenness centrality -f // PageRank The following flags identify input files: -x // [required for options -d and -e] input file for sources, format is textfile with single column of node ids -y // [required for options -d and -e] input file for targets, format is textfile with single column of node ids -a // [required for options -b, -c, and -f] alpha value for shortest-path BC, current-flow BC, and PageRank (see description in previous sections) The command-line syntax for 'Network Flow.exe', the Toolkit's LEMON based function is: "Network Flow.exe" <option> <input.txt> <output.txt> The input file format (typically produced via the GUI 'Graphs' tab) is a lgf (LEMON graph format) file The output file format is a csv with two columns: node, value The following flags determine the method used: -mcf // min-cost-max-flow non-threaded -mcft // min-cost-max-flow threaded using Cost Scaling -mcft2 // min-cost-max-flow threaded using Network Simplex (the defaullt, as it is typically faster than cost scaling) -mcf2 // time series min-cost-max-flow (threaded) The following additional methods are available, but are experimental and not documented here: mc // min-cut non-threaded -mf // max-flow non-threaded -mft // max-flow threaded -mfvt // max-flow value threaded -mfnt // max-flow normalized threaded The following flags determine options for the above methods: -t // number of threads -d // maximum distance for 'bounded-distance' metrics -f // supply fraction for min-cost-max-flow method -s // scale (divide) the output by (n-1)(n-2) where n = number of nodes The following flags identify input files: -i // input file -c // node coordinate file Example syntax: Linkage analysis: "Network Flow.exe" -mcft2 -t 8 -i sourcetarget.txt input.lgf output.txt All-pairs centrality with bounded distance: "Network Flow.exe" -mcft2 -t 8 -c xy.txt -d 300000 input.lgf output.txt Created with DrExplain