heavywatal / tumopp

🦀 Tumor growth simulation in C++/R
https://heavywatal.github.io/tumopp/
MIT License
19 stars 2 forks source link

[suggestion] Add carrying capacity and time to end to approximate logistic growth #20

Closed anpefi closed 7 years ago

anpefi commented 7 years ago

Hi,

for my simulations I'm interested in cases where the run doesn't stop when reaching the limit N, but that it continues evolving with that carrying capacity during a defined time t (close to logistic growth). So, the population grows as it does now until reach N, and then during a time t (if t=0 is the same case as it is now) births only could happen if there are deaths to not pass the N carrying capacity.

I've already forked the repo and I will try to make the modifications myself (although it would take long as I need to understand all the code before) and then make a pull request. But I think it would be faster if you could add this feature as it would be quite trivial for you and I think it would be an useful enhancement for general use of tumopp.

Cheers, Andrés.

heavywatal commented 7 years ago

Thank you for the suggestion. I agree. It will be a reasonable extension. The problem is how we implement it.

The former seems easier, and the latter seems more natural in a ecological sense.

anpefi commented 7 years ago

We have argued on those models too.

So, I would start with the simplest Moran-like.

heavywatal commented 7 years ago

I have just uploaded a quickie commit that added a Moran-like plateau phase after reaching N=K, by simply setting death rate of each cell to the same value as its birth rate. It will work in "Constant-rate" model. More tweaking may be needed to do the right thing in other neighbor-dependent models.