All Projects → EcoJulia → MetacommunityDynamics.jl

EcoJulia / MetacommunityDynamics.jl

Licence: BSD-3-Clause license
a julia libarary for simulating the dynamics of ecological communities across space

Programming Languages

julia
2034 projects

Projects that are alternatives of or similar to MetacommunityDynamics.jl

Rigidbodydynamics.jl
Julia implementation of various rigid body dynamics and kinematics algorithms
Stars: ✭ 184 (+1214.29%)
Mutual labels:  simulation, dynamics
fgeo
[Meta R-package on CRAN] Analyse forest diversity and dynamics
Stars: ✭ 22 (+57.14%)
Mutual labels:  dynamics, ecology
SpatialEcology.jl
Julia framework for spatial ecology - data types and utilities
Stars: ✭ 50 (+257.14%)
Mutual labels:  ecology, macroecology
elasty
A research-oriented elastic body simulator
Stars: ✭ 173 (+1135.71%)
Mutual labels:  simulation, dynamics
Pydy Tutorial Human Standing
PyDy tutorial materials for MASB 2014, PYCON 2014, and SciPy 2014/2015.
Stars: ✭ 135 (+864.29%)
Mutual labels:  simulation, dynamics
Dart
Dynamic Animation and Robotics Toolkit
Stars: ✭ 596 (+4157.14%)
Mutual labels:  simulation, dynamics
ORBITM
🌏 📡 🌏 📡 ORBITM - Orbit maintenance, propulsion sizing, and life-time estimation of space objects!
Stars: ✭ 28 (+100%)
Mutual labels:  simulation, dynamics
Physac
2D physics header-only library for videogames developed in C using raylib library.
Stars: ✭ 151 (+978.57%)
Mutual labels:  simulation, dynamics
Pydy
Multibody dynamics tool kit.
Stars: ✭ 232 (+1557.14%)
Mutual labels:  simulation, dynamics
pygbif
GBIF Python client
Stars: ✭ 55 (+292.86%)
Mutual labels:  ecology
powerapps-specflow-bindings
A SpecFlow bindings library for model-driven Power Apps.
Stars: ✭ 19 (+35.71%)
Mutual labels:  dynamics
libra-code
quantum-dynamics-hub.github.io/libra/index.html
Stars: ✭ 33 (+135.71%)
Mutual labels:  dynamics
LS CORRIDORS
Simulation of multiple ecological functional corridors
Stars: ✭ 20 (+42.86%)
Mutual labels:  landscape-ecology
UCThello
UCThello - a board game demonstrator (Othello variant) with computer AI using Monte Carlo Tree Search (MCTS) with UCB (Upper Confidence Bounds) applied to trees (UCT in short)
Stars: ✭ 26 (+85.71%)
Mutual labels:  simulation
nav-docker-examples
Examples and use-cases for MS Dynamics NAV on Docker
Stars: ✭ 21 (+50%)
Mutual labels:  dynamics
MAESTRO
A low Mach number stellar hydrodynamics code
Stars: ✭ 29 (+107.14%)
Mutual labels:  simulation
EcoBase.jl
No description or website provided.
Stars: ✭ 16 (+14.29%)
Mutual labels:  ecology
FCND-Term1-P3-3D-Quadrotor-Controller
Udacity Flying Car Nanodegree - Term 1 - Project 3 - 3D Quadrotor Controller
Stars: ✭ 31 (+121.43%)
Mutual labels:  dynamics
hash
Data management, integration and modeling with blocks #
Stars: ✭ 400 (+2757.14%)
Mutual labels:  simulation
woss-ns3
WOSS is a multi-threaded C++ framework that permits the integration of any existing underwater channel simulator that expects environmental data as input and provides as output a channel realization. Currently, WOSS integrates the Bellhop ray-tracing program. Thanks to its automation the user only has to specify the location in the world and the…
Stars: ✭ 20 (+42.86%)
Mutual labels:  simulation

MetacommunityDynamics.jl

A Julia library for simulating the dynamics of species interaction networks across space and time. Part of EcoJulia, and built on top of DynamicGrids.

This software is designed to simulate how the composition of ecological communities changes over time.

Examples

Lotka-Volterra

The Lotka-Volterra (LV) system is a set of coupled differential equations which describe a system of consumers and resources (also called predators and prey).

using MetacommunityDynamics
using DynamicGrids
using Dispersal: OutwardsDispersal
using Distributions 
consumermodel = 
    Eating{Tuple{:C,:R}}(
        functionalresponse=LotkaVoterra(0.1), 
        dt=0.1) +
    OutwardsDispersal{:C}() + 
    LinearMortality{:C}(0.3);

resourcemodel = 
    LogisticGrowth{:R}(λ=2, K=200., dt=0.1) +
    LinearMortality{:R}(0.01) + 
    OutwardsDispersal{:R}();

model = resourcemodel + consumermodel

gridsize = 100
initconsumer = rand(Biomass, Uniform(10, 30), gridsize, gridsize)
initresource = rand(Biomass, Uniform(10, 90), gridsize, gridsize)

arrayout = ArrayOutput((C=initconsumer, R=initresource ), tspan=1:300)
sim!(arrayout, model)

and to plot

using Plots

Cs = Float64[]
Rs = Float64[]
for t in arrayout
    push!(Cs, sum(t[:C]))
    push!(Rs, sum(t[:R]))
end

plot(1:length(Cs),Cs, label="consumer")
plot!(1:length(Rs),Rs, label="resource")
xlabel!("time")
ylabel!("biomass")

LV

Food Web

using MetacommunityDynamics
using DynamicGrids
using Plots
using Distributions
using Dispersal: Moore, DispersalKernel
using EcologicalNetworks: nichemodel, mpnmodel, trophic_level, UnipartiteNetwork, degree, richness
using ColorSchemes

number_of_species = 50
connectance = 0.05
forbiddenlinkprob = 0.5

foodweb = mpnmodel(number_of_species, connectance, forbiddenlinkprob)

speciespool = DiscreteUnipartiteSpeciesPool(Symbol.(foodweb.S), Matrix(foodweb.edges)) # move these type changes to a method
trophicdict = trophic_level(foodweb)  # returns a dictionary 

resource = filter(s -> trophicdict[String(s)] == 1, species(speciespool))
consumers = filter(s -> trophicdict[String(s)] > 1, species(speciespool))
    
consumermodel = 
    FoodWebEating(consumers, resource, LotkaVolterra(0.2), metaweb(speciespool)) +
    AdjacentBernoulliDispersal(consumers, DispersalKernel(radius=1), 0.1) +
    RandomExtinction(consumers, probability=0.1) +
    LinearMortality(consumers, 0.01);

plantmodel = 
    LogisticGrowth(resource) +
    AdjacentBernoulliDispersal(resource, DispersalKernel(radius=2), 0.1) ;

fullmodel = consumermodel + plantmodel;



dim = (50,50)
ntimesteps = 300

init = NamedTuple(merge(
    rand(Biomass, resource, Exponential(10), dim...),
    rand(Biomass, consumers, Exponential(10), dim...)));

arrayout = ArrayOutput(init, tspan=1:ntimesteps)
@time sim!(arrayout, fullmodel); 




this is kind of neat

Contributing

Open a PR or issue

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].