# Figure 1
## Figure 1-a
__Main File:__ Run convergence_analysis.m to obtain the figure
**Notes:** 
- Lines 3 to 162 calculates the data to be plotted
- Lines 164 to 184 plots the data

## Figure 1-b
Main File: Run plot_convergence_different_simulations.m to obtain the figure
**Notes:**
- The file takes four csv files as input:
	- a_dist_convergence.csv - Used to obtain the fluid equilibrium, generated using the functions described for Figure 1-a
	- new_a_dist_file_ub1.csv - $F^0$ is $\delta_{\max}$
	- new_a_dist_file_lb1.csv - $F^0$ is $\delta_{\min}$
	- new_a_dist_file_rational.csv - $F^0$ is uniform
- The csv files above (apart from a_dist_convergence.csv) is generated using codes provided in the folder Auxiliary_Codes
	- Simulate_Replications.m - Main file to generate the csv files, the initial distribution $F^0$ is set in line 25
	- Simulate_MMN.m - SImulates an M/M/N queue with heterogeneous servers
	- generate_discrete.m - Discrete random variate generated using a provided distribution
	- h_func.m - The random routing function

## Figure 1-c
Main File: Run plot_convergence_in_n.m to obtain the figure
Notes: 
- The file reads the csv files provided under Data_Files folder.
- The csv files (apart from a_dist_convergence.csv) is generated in a similar fashion to Figure 1-b.

# Figure 2
Main Files:
- Figure 2a is generated using equilibrium_analysis_p.m
- Figure 2b is generated using equilibrium_analysis_q.m
- Figure 2c is generated using equilibrium_analysis_r.m

Notes: 
- The code calculates the equilibrium using the analysis in Section 6.2 and auxiliary codes called by the main files above are also provided. 

# Figure 3
Main File: Both Figures 3 (a) and 3 (b) are generated using equilibrium_analysis_beta.m.
Note: The auxiliary files called by the equilibrium_analysis_beta function is provided.

# Figure 4
Main File: The file to generate the figures is distribution_analysis.m. The functions saves the png files for all histogram plots and a subset of these are presented in the paper. 
Note: The function uses the same auxiliary codes. 

# Figure EC.1
Main File: plot_L_vs_Expectation.m

# Figure EC.2
Main File: The file to generate all three figures is plot_triangular_density.m

# Figure EC.3
Main File: triangular_plot_L_vs_Expectation_var_r.m

# Figure EC.4
Main File: triangular2_plot_L_vs_Expectation_var_r.m

# Figure EC.5
Main File: triangular3_plot_L_vs_Expectation_var_r.m

# Figure EC.6
Main File: equilibrium_analysis_sym_triangular.m
Note: The file is set so that Figure EC.6(c) is plotted. To plot (a) and (b), the for loop variables should be changed appropriately. 

# Figure EC.7
Main File: equilibrium_analysis_inc_triangular.m
Note: The file is set so that Figure EC.7(b) is plotted. To plot (a) and (c), the for loop variables should be changed appropriately. 

# Figure EC.8
Main File: equilibrium_analysis_dec_triangular.m
Note: The file is set so that Figure EC.8(b) is plotted. To plot (a) and (c), the for loop variables should be changed appropriately. 

# Figure EC.9
Main File: equilibrium_analysis_beta_sym_triangular.m

# Figure EC.10
Main File: equilibrium_analysis_beta_inc_triangular.m

# Figure EC.11
Main File: equilibrium_analysis_beta_dec_triangular 1.m

# Figure EC.12
Main File: The file to generate the figures is distribution_analysis_sym_triangular.m. The functions saves the png files for all histogram plots and a subset of these are presented in the paper. 

# Figure EC.13
Main File: The file to generate the figures is distribution_analysis_inc_triangular.m. The functions saves the png files for all histogram plots and a subset of these are presented in the paper. 

# Figure EC.14
Main File: The file to generate the figures is distribution_analysis_dec_triangular.m. The functions saves the png files for all histogram plots and a subset of these are presented in the paper. 