Comments (3)
Great! Looking forward to it and it will provide a great framework to extend and adapt mizer to various needs. Will need to provide some examples on how to prepare an extension into a package :)
from mizer.
@astaaudzi , the first example I will provide is an extension implementing unstructured resources, i.e., I will take the code implementing those out of mizer again and put them into a separate package.
One bit of my proposal I already want to discuss with you now: I propose to supplement the @n
and @n_pp
slots by an @vars
slot that shall be a list holding all the new dynamical variables that extensions may want to add to mizer.
Of course it would be most natural to also include n_pp
in that list, so that the plankton resource would not play a special role compared to the other resource spectra that other extensions may want to introduce. And it would be even more elegant if also n
was a member of that list. However then everyone would need to update their old scripts that may have accessed the @n
slot directly to accessing @vars$n
instead. Am I right that backwards compatibility is more important to us than elegance? Are we therefore happy to have slots @n
, @n_pp
and @vars
?
from mizer.
Just an update: In pull request #141 I have added
- a slot
@n_other
to hold the list of abundances of other dynamic ecosystem components, - a slot
@other_dynamics
to hold the list of functions to be called in side the project() loop to update the abundances of the other components, - a slot
@other_params
to hold the list of parameters for the other components, - a slot
@other_encounter
to hold the list of functions that calculate the contributions by the other components to the encounter rate, - a slot
@other_pred_mort
to hold the list of functions to calculate the contribution by the other components to the predation mortality rate. That will not be relevant for resources, but for example for unstructured consumers (mammals, sea birds). - a slot
@rates_func
to hold the function that calculates the rates needed byproject()
.
The first 4 slots have allowed me to move my code for unstructured resource components into its own R package, see https://gustavdelius.github.io/mizerUR/. These slots will also allow @astaaudzi to put her code for multiple size-structured resources into an R package.
The slot @rates_func
will be needed by @reumj for his size-dependent interaction matrix and by @pwoodworth-jefcoats and others for time-dependent temperature.
Over the weekend I intend to write a vignette explaining the current extension mechanism with examples.
from mizer.
Related Issues (20)
- Fix colours for species in NS_params
- Set and document default for exponents in `set...()` functions
- Avoid using $ notation for species parameters with short names
- Better error message when `getParams()` is not called with MizerSim object
- Extra parameters to model discards HOT 2
- Iterative method for finding steady state HOT 1
- Release mizer 2.4.0
- Don't warn repeatedly when l_mat and w_mat are inconsistent HOT 2
- Speed up inner loop
- `matchGrowth()` gives error when there is no `w_inf` column HOT 1
- In `addSpecies()` only issue warning if feeding level drops below critical level
- Different resource's default values between newTraitParams() and newMultispeciesParams() HOT 1
- `get_h_default()` should provide default even when no growth info is available
- `get_phi()` should check that it returns valid positive values
- Other components at all time steps are always equal to final time step
- Adapt `plotYieldObservedVsModel()` and `matchYield()` to work with multiple gears
- Append argument in project function appears non-functional HOT 1
- External encounter rate HOT 1
- `addSpecies()` should get `info_level` argument
- Make `matchGrowth()` work when `n != p`
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 mizer.