Giter Site home page Giter Site logo

Comments (8)

CleggTom avatar CleggTom commented on June 15, 2024

So when we talked it seemed like this is an issue caused by the frequency of the rewiring. The current default is that it only occurs following an extinction but, as we discussed, it makes more sense for the ADBM rewiring to be called more often. This leaves two options:

  1. We rewire at some set time interval t using the PeriodicCallback function in the diffEq package.

  2. We rewire based on the magnitude of the change in biomass over time using ContinuousCallback . This would require that we define some measure of the change in the system (e.g. euclidean distance) and the threshold at which the rewiring should occur.

Both methods have their benefits. The time based rewiring will be simple to implement and computationally cheap, though the value of the time interval may need to be set very small to prevent the jumps in food web structure. On the other hand the biomass based method will be accurate but may be unfeasible as we need to compare the current state to the previous one at each integration step.

Overall I'm tending towards the second method as I think that the value of t may end up being very small, though we may need to check each one to see what works. I'll have a play around and see what I get

from bioenergeticfoodwebs.jl.

tpoisot avatar tpoisot commented on June 15, 2024

@CleggTom I think another idea is to use Gillespie algorithm to decide when we rewire. It's better than to keep track of past states of the system, in addition to being a generally accepted method of doing this sort of events.

from bioenergeticfoodwebs.jl.

CleggTom avatar CleggTom commented on June 15, 2024

@tpoisot I'm not familiar with the Gillespie algorithm, how would it work in this case?

from bioenergeticfoodwebs.jl.

SimmonsBI avatar SimmonsBI commented on June 15, 2024

Also interested in the Gillespie algorithm as I haven’t heard of this.

The other option is to implement both time interval and change in biomass methods and give people the option.

At the very least it’s probably a good idea to have a TRUE/FALSE setting to enable continuous rewiring or not. i.e. keep the current rewiring after extinction, but give users the option to enable more frequent rewiring.

from bioenergeticfoodwebs.jl.

ChrisRackauckas avatar ChrisRackauckas commented on June 15, 2024

http://docs.juliadiffeq.org/latest/tutorials/discrete_stochastic_example.html describes adding Gillespie style jumps to a set of diffeqs

from bioenergeticfoodwebs.jl.

SimmonsBI avatar SimmonsBI commented on June 15, 2024

Just to add that time-interval-based rewiring, with t as an adjustable parameter, could be useful for a project idea I have been discussing with Andrew.

from bioenergeticfoodwebs.jl.

evadelmas avatar evadelmas commented on June 15, 2024

I agree that we should give users the option to chose among different rewiring frequencies, as it reflects different ecological hypotheses. We could either

  • change rewire_method (that allows to chose between different rewiring models) from :ADBM / :stan / :Gilljam / :none to :ADBM_interval / :ADBM_gillespie / :ADBM_extinction / :stan / :Gilljam / :none or
  • have a new argument ADBM_rewiring_frequency = :interval / :gillespie / :onextinction

from bioenergeticfoodwebs.jl.

SimmonsBI avatar SimmonsBI commented on June 15, 2024

@evadelmas I like these options. With the rewire_method formulation, I think we need a way to specify what the interval would be for :ADBM_interval.

So maybe the ADBM_rewiring_frequency formulation is easier, with :interval being an integer equal to how often (number of timesteps) between rewiring updates.

Then presumably any value of ADBM_rewiring_frequency is ignored if rewire_method is not equal to :ADBM.

from bioenergeticfoodwebs.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.