Comments (8)
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:
-
We rewire at some set time interval
t
using thePeriodicCallback
function in the diffEq package. -
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.
@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.
@tpoisot I'm not familiar with the Gillespie algorithm, how would it work in this case?
from bioenergeticfoodwebs.jl.
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.
http://docs.juliadiffeq.org/latest/tutorials/discrete_stochastic_example.html describes adding Gillespie style jumps to a set of diffeqs
from bioenergeticfoodwebs.jl.
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.
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.
@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)
- Temporal matrices are identical and ignore extinctions when there is no rewiring
- Can't control the density of the output for the simulate function
- "Classical" functional response
- TagBot trigger issue HOT 1
- Temperature scaled ADBM
- ADBM: biomass vs density
- Add non trophic interactions and stability measures HOT 8
- Compatibility JLD2 and Julia 1.7.2
- Documents are not deployed
- Use ADBM model to generate foodwebs
- BoundsError in ADBM rewiring model when using with nutrient intake model.
- Chose constraints for rewiring (trophic class changes)
- Instability detected when using temperature dependence on consumption rates HOT 1
- DomainError for some values of the hill exponent HOT 1
- Warning when running simulate(); canceled iteration HOT 5
- Extinctions not detected when initial biomass is set to 0.0
- Inability to save output HOT 4
- Store rewiring time steps
- Can't pass different carrying capacities for different producers HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bioenergeticfoodwebs.jl.