Note
Go to the end to download the full example code.
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")

/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)