How to get started with the Spatiocoexistence modelΒΆ

This example demonstrates basic usage of the Spatiocoexistence model.

Necessary imports

from spatiocoexistence.model import SpatioCoexistenceModel

Initialize the model

model = SpatioCoexistenceModel()

Run the model for a certain amount of steps

model.cy_run(25)

Plot the Simulation Results

model.plot("test")
test, Cumulative k_ff, CI_CS distribution, Cumulative k_fh, CI_HS distribution, Reduced Growth, Reduced Survival, Reduced Recruitment, Species Abundance Distribution (SAD), Size distribution, Inventory
/builds/heinzej/CrowdingIndex/spatiocoexistence/py_tools.py:67: RuntimeWarning: divide by zero encountered in scalar divide
  ff = CI_CS_mean / CI_C_mean if CI_CS_mean != 0 else 0
/builds/heinzej/CrowdingIndex/spatiocoexistence/plotting.py:292: RuntimeWarning: divide by zero encountered in log
  np.log(k_ff[mask]),
/builds/heinzej/CrowdingIndex/spatiocoexistence/plotting.py:350: RuntimeWarning: divide by zero encountered in log
  np.log(sorted_k_ff),

Total running time of the script: (0 minutes 5.856 seconds)