This is the README file is directed at the Metrics Toolbox.
The primary functions of the Metrics Toolbox are:

1. structural_complexity.m - computes the structural complexity metric based on the physical architecture of the system. Returns a structural complexity number.

2. dynamic_complexity.m - computes the dynamic complexity of the system based on the underlying physics. Returns a single number for dynamic complexity. There are two components: (a) connectivity of functional responses of the system and (b) their associated uncertainty. The final dynamic complexity is multiplicative. This metric can be computed for Black-Box models where explicit mathematical models are unavailable.

3. Main.m - this is the main calling script for computing dynamic complexity based on system dynamics when underlying mathematical models are explicit and available. Unlike the first two, this function outputs a vector of complexity components.

4. ComputeComplexityAndClustering.m - computes the cycle complexity from underlying physical architecture of the system. 

For details on these function, including the argument list, type "help <function name> on MATLAB prompt.


Using the code:

- run_metrics.m: this is a demo script to show exception of all above functions in an automated way. 

Examples for computing individual metrics are as follows:

- structural_complexity.m: 
  Example call - [struct_complexity,graph_energy,connection_complexity,component_complexity,num_connections,num_components] = structural_complexity(Architecture_matrix);

- dynamic_complexity.m: 
  Example call - [dyn_complexity,normalized_dyn_complexity,graph_energy,normalized_graph_energy,total_entropy,normalized_entropy] = dynamical_complexity('3_Spool_Turbofan.csv',0.95);

- Main.m:
  Example call - execute this control script by typing "Main" on the MATLAB prompt. There are 6 supported architecture in the current version and there reference is controlled by variable 'curr_arch_idx' on line #19. For example,set curr_arch_idx = 3 to execute 2.5 Spool Architecture.

- ComputeComplexityAndClustering.m: 
  Example call - [sum_1,sum_2,sum_2_second,metrics,cycle_complexity,sinks] = ComputeComplexityAndClustering(Architecture_matrix);








