This is the NetLogo v 6.04 source code for the model presented in Perry & Lee in Oikos 2019. doi: 10.1111/oik.6052 Note that the code requires a java file for the calculation of the k-path link connectivity algorithm, which is available from: http://www.emilio.ferrara.name/code/werw-kpath/