Commit 86387bba authored by Victor's avatar Victor
Browse files

changed EVOID to EvoId

parent 06411318
Pipeline #99045 canceled with stage
......@@ -21,7 +21,7 @@ p_default = Dict(
na_init = K0
world0 = new_world_G(na_init,p_default,spread = .01)
```
![EVOID_div_t4000](uploads/3a49ff4fe4db161bf360eea97694ff26/EVOID_div_t4000.png)
![EvoId_div_t4000](uploads/3a49ff4fe4db161bf360eea97694ff26/EvoId_div_t4000.png)
### Constant birth coefficient, Gaussian carrying capacity
```julia
a = 0;
......@@ -41,7 +41,7 @@ p_default = Dict(
"dt_saving" => 20.0)
na_init = K0
```
![EVOID_bis_div.ong](uploads/8e1f821923afd74902b3ec6567a1736d/EVOID_bis_div.ong.png)
![EvoId_bis_div.ong](uploads/8e1f821923afd74902b3ec6567a1736d/EvoId_bis_div.ong.png)
> what you could do would be to plot the adaptive dynamics of the monomorphic populations
### Quadratic birth rate
......@@ -67,7 +67,7 @@ na_init = K0
#### Equivalence
![PDE_quad_termsol](uploads/c1f5c670a9d82df1349ed473b9954135/PDE_quad_termsol.png)
![EVOID_quad_time_average_distrib_deep_time](uploads/2613b1f5e919fdbc7ee3386c680a1908/EVOID_quad_time_average_distrib_deep_time.png)
![EvoId_quad_time_average_distrib_deep_time](uploads/2613b1f5e919fdbc7ee3386c680a1908/EvoId_quad_time_average_distrib_deep_time.png)
## No diversification
```Julia
......
# Space as a discrete segement
using UnPack,EVOID
using UnPack,EvoId
nodes = 10
mysegment = DiscreteSegment(1,nodes)
......
# Dynamic graph
using UnPack,EVOID,LightGraphs
using UnPack,EvoId,LightGraphs
nodes = 10
g1 = LightGraphs.grid(Int8[9,1])
g2 = SimpleGraph(Int8(9))
......
using EVOID,LightGraphs,UnPack
using EvoId,LightGraphs,UnPack
##### Genotype space#####
nodes = 9
......@@ -67,7 +67,7 @@ end
d_i = [ (_d_i .- minimum(_d_i)) ./ (maximum(_d_i) .- minimum(_d_i)) for _d_i in d_i ]
anim = @animate for i in 1:length(d_i)
Plots.scatter(collect(1:nodes),ones(nodes),
markercolor=EVOID.eth_grad_small[d_i][i],
markercolor=EvoId.eth_grad_small[d_i][i],
markersize = 40,
grid = false,
xaxis = false,
......
using EVOID,Plots,UnPack
using EvoId,Plots,UnPack
nodes = 9
......
using EVOID,UnPack,Plots
using EvoId,UnPack,Plots
myspace = (RealSpace{1,Float64}(),)
σ_b = .9;
......
using EVOID,UnPack,Plots
using EvoId,UnPack,Plots
myspace = (RealSpace{1,Float64}(),)
σ_b = .9;
......
......@@ -2,7 +2,7 @@
# this example implements a birth rate that is time dependent
##############################
using EVOID,UnPack
using EvoId,UnPack
using Plots
ω = 2* π / 150 # angular frequency
......
using EVOID
using EvoId
using LightGraphs
using Plots
......
__precompile__(false)
module EVOID
module EvoId
using Distributions,LinearAlgebra,Reexport,StatsBase
using LightGraphs
using UnPack
......
......@@ -3,7 +3,7 @@ using Colors
import KernelDensity:kde,pdf
"""
function plot(sim::Simulation;trait = 1)
Plot recipe for EVOID.jl
Plot recipe for EvoId.jl
# ARGS
- if `length(trait) == 1` then we scatter plot `trait` along time
- if `2 <= length(trait) <= 3` then we project world of the
......
......@@ -3,7 +3,7 @@ using Random
Random.seed!(0)
using LightGraphs
using Test
using Revise,EVOID
using Revise,EvoId
using UnPack,JLD2
myspace = (RealSpace{1,Float64}(),)
......@@ -26,6 +26,6 @@ w1 = copy(w0)
@info "Running simulation with CFM algorithm"
@time sim = run!(w1,CFM(),tend,b,d,dt_saving=10.)
# EVOID.clean!(sim)
# EvoId.clean!(sim)
using Plots
Plots.plot(sim)
......@@ -3,7 +3,7 @@ using Random
Random.seed!(0)
using LightGraphs
using Test
using Revise,EVOID
using Revise,EvoId
using UnPack,JLD2
g1 = LightGraphs.grid([9,1])
......@@ -21,8 +21,8 @@ end
update_g(t) = periodic_update_graph(10,t)
dyng = DynGraphSpace(g,update_g)
## testing atomic methods
@test last(randomwalk(EVOID.get_graph(dyng,16.),1,10)) 1
@test !(last(randomwalk(EVOID.get_graph(dyng,1.),1,10)) 1)
@test last(randomwalk(EvoId.get_graph(dyng,16.),1,10)) 1
@test !(last(randomwalk(EvoId.get_graph(dyng,1.),1,10)) 1)
## simulations
myspace = (dyng,)
......
......@@ -3,7 +3,7 @@ using Random
Random.seed!(0)
using LightGraphs
using Test
using Revise,EVOID
using Revise,EvoId
using UnPack,JLD2
myspace = (RealSpace{1,Float64}(),)
......
using LightGraphs
using Test
using Revise,EVOID
using Revise,EvoId
using UnPack
myspace1 = (RealSpace{1,Float64}(),)
myspace2 = (RealSpace{1,Float64}(),RealSpace{1,Float64}())
......
......@@ -3,7 +3,7 @@ using Random
Random.seed!(0)
using LightGraphs
using Test
using Revise,EVOID
using Revise,EvoId
using UnPack,JLD2
myspace = (RealSpace{1,Float64}(),)
......
......@@ -4,7 +4,7 @@ cd(@__DIR__)
using Distributed;addprocs(exeflags="--project")
using Test
@everywhere begin
using EVOID
using EvoId
sigma_a = 1.251;
K0 = 1000;
K(X) = 1 - 0.125 * sum(X.^2)
......
using Distributed;addprocs()
@everywhere push!(LOAD_PATH,homedir()*"/ETHZ/projects/EVOID.jl/src")
@everywhere using EVOID,BenchmarkTools,SharedArrays
@everywhere push!(LOAD_PATH,homedir()*"/ETHZ/projects/EvoId.jl/src")
@everywhere using EvoId,BenchmarkTools,SharedArrays
## Testing update_afterbirth_std!
p= Dict("K0" => 1000.,
......@@ -20,7 +20,7 @@ C = SharedArray{Float64}((Int(p["K0"]),Int(p["K0"])))
@btime update_afterbirth_std!(skipmissing(world0),C,1,p)
## Testing get_inc_reflected
using EVOID,BenchmarkTools
using EvoId,BenchmarkTools
a = Agent(rand(1))
@btime get_inc_reflected(get_x(a)[1],.1 *randn())
@btime rand()
......@@ -33,7 +33,7 @@ a = Agent(rand(1))
@btime get_xhist(a)[:,end]
##
using EVOID,BenchmarkTools
using EvoId,BenchmarkTools
a = 0;
sigma_K = .9;
sigma_a = .7;
......@@ -50,7 +50,7 @@ p_default = Dict(
na_init = 1000
world0 = new_world_G(na_init,p_default,spread = .01, offset = -.25)
tspan=zeros(1)
import EVOID:update_rates_std!,updateWorld_G!
import EvoId:update_rates_std!,updateWorld_G!
@btime update_rates_std!(skipmissing(world0),p_default,0.)
@btime updateWorld_G!(world0,p_default,update_rates_std!,tspan,true)
@btime update_afterbirth_std!(skipmissing(world0),1,p_default)
......@@ -60,7 +60,7 @@ import EVOID:update_rates_std!,updateWorld_G!
# For now Gillepsie can not really be parallelised
using Distributed;addprocs(exeflags="--project")
@everywhere begin
using EVOID
using EvoId
sigma_a = 1.251;
K0 = 1000;
K(X) = 1 - 0.125 * sum(X.^2)
......@@ -88,7 +88,7 @@ using Random
Random.seed!(0)
using LightGraphs
using Test
using Revise,EVOID
using Revise,EvoId
using UnPack,JLD2
myspace = (RealSpace{1,Float64}(),)
......
using EVOID, Test, JLD2,Random
using EvoId, Test, JLD2,Random
@testset "EVOID" begin
@testset "EvoId" begin
include("gillepsie.jl")
# include("wrightfisher.jl")
include("metrics.jl")
......
using LightGraphs
using Test
using Revise,EVOID
using Revise,EvoId
using UnPack
myspace = (GraphSpace(SimpleGraph(10,10)),RealSpace{1,Float64}())
myagents = [Agent(myspace,ancestors=true,rates=true) for i in 1:10]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment