1. System requirements:

a. Software dependencies and operating system

-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.8.0.1417392 (R2020a) Update 4
Operating System: macOS  Version: 12.0.1
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB                                                Version 9.8         (R2020a)
Curve Fitting Toolbox                                 Version 3.5.11      (R2020a)
Optimization Toolbox                                  Version 8.5         (R2020a)
Statistics and Machine Learning Toolbox               Version 11.7        (R2020a)
Symbolic Math Toolbox                                 Version 8.5         (R2020a)

b. Versions the software has been tested on

MATLAB Version: 9.8.0.1417392 (R2020a) Update 4

c. Non-standard hardware

None

--------------------------------------------------------------------------------------
2. Installation guide

a. Instructions

To install Matlab, please follow the MathWorks installation instruction (https://www.mathworks.com/help/install/).

b. Typical install time on a "normal" desktop computer

The Matlab installation process takes about 30 minutes.

--------------------------------------------------------------------------------------
3. Instruction for running the model/code

a. Instructions to reproduce each figure

All the code files requires Matlab. To run code files, need to download and open Matlab.
After opening Matlab, locate the desired code file and run.

Below are detailed instruction to reproduce each figure:

Figure2:

Main file(model outputs): 
Linetal_2022_code/prob_of_stab.m

Instruction:
BMM model: uncomment line 19
RM model: uncomment line 21
BTCM model: uncomment line 23
BSRM model: uncomment line 25
ART model: uncomment line 27

To plot empirical food web consumer-resource size-ratios distribution: run 'extra_data_9webs.m'

Figure3a&b:

Main file:
Linetal_2022_code/con_IS_vs_mass_ratio.m

Figure3c:

Main file:
Linetal_2022_code/mod_vs_meanoptratio.m

Figure4:

Main file:
Linetal_2022_code/Model_connectance_prediction.m

To plot food web connectance data across different food web size: run 'emp_conn_data.m'

b. Expected output

The provided code should reproduce figures in the main text.

c. Expected run time

Figure2:

RM model (15 minutes - 200 iteration)

BMM model (22 inutes - 200 iteration)

ART model (22 minutes - 200 iteration)

BTCM model (20 minutes - 200 iteration)

BDDM model (22 minutes - 200 iteration)

Figure3:

3.a&b (22 minutes - 200 iteration)

3.c (51 minutes - 200 iteration)

Figure4:

Model connectance prediction (8 minutes - 200 iteration)

Note that for figure2&3, 1000 iterations were done for each consumer-resource mass-ratio.
For efficiency and demonstration purpose, 200 iterations were done. And model outputs remain the same.

--------------------------------------------------------------------------------------
4. Instructions for use

a. How to run the software on your data

To run code files, first download Matlab, then locate the desired code file and run the code file.

b. Reproduction instructions

For reproducing results and figure in the main text, simply follow the instruction and run the code provided.