Skip to content

alaindanet/indirect_facilitation_model

Repository files navigation

indirectfacilitation

The goal of indirectfacilitation is to …

Installation

You can install indirectfacilitation from github with:

# install.packages("devtools")
devtools::install_github("alaindanet/indirect_facilitation_model")

Example

This is a basic example which shows you how to solve a common problem:

  • Load the packages:
devtools::load_all()

library(simecol)
library(ggplot2)
library(tibble)
library(magrittr)
  • Load the model and specify the parameters:
mod <- two_facilitation_model()
mod

# Show parameters:
parms(mod)

# Tweak parameters:
parms(mod)["g"] <- 0.2
parms(mod)["gamma1"] <- 0.10
parms(mod)["u"] <- 5 
times(mod) <- c(from = 0, to = 1000, by = 1)
  • Launch a simulation and plot the result:
mod_run <- sim(mod)
plotnp(mod_run)

Todo

Paper

  • Fig 1: methods
    • Add temporal dynamic CA + PA
  • Fig 2: multi-states
    • Add arrows
  • Fig 3: bifurcation details
  • Fig 4: Clustering cellular automata, C++ et Cnp (f(\gamma, u)) and (f(\gamma, u))

Run

  1. Run pair-approximation model with automated end of run
  2. Replace the file with use_data()

Implementation

  • Clustering:
    • plot NP
    • plot (x2 - x1) / x1 for comparison CA/PA
    • run CA for gradient facilitation/dispersion
  • plot: separate lines (create groups: e.g: together & < threshold, together & >= threshold, low_together …)
    • Create groups
    • Plot groups (linetype problem)
  • Check if simulations have reached stability
    • Implementation of a custom solver (“lsodar”)
    • Test the implementation
  • sim_multi():
    • Save a simecol object
    • Save a time argument
    • Save init values
    • Save baseline parameters
    • Save param_combination
    • param_combination: matrix of parameter combination
    • be able to sim from a sim_multi object
  • Generalize run_scenarii_gradient and run_2d_gradient: f(b,g)
  • Compare the effect of dispersal, facilitation strength, paturâge, aridité on clustering
  • Document functions

About

No description, website, or topics provided.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published