From 9e49a694033c6cb1f78bf7ef19df001aedcfeb74 Mon Sep 17 00:00:00 2001 From: jiseonmin Date: Wed, 11 Oct 2023 14:46:13 -0700 Subject: [PATCH] Use localPopulationDensity in vignette_space.slim In SLiM 4, localPopulationDensity() is added to find local population density around an individual --- docs/vignette_space.slim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/vignette_space.slim b/docs/vignette_space.slim index dbda9189..ba2e5ed6 100644 --- a/docs/vignette_space.slim +++ b/docs/vignette_space.slim @@ -21,7 +21,7 @@ initialize() { } reproduction() { - neighbor_density = i1.totalOfNeighborStrengths(individual); + neighbor_density = i1.localPopulationDensity(individual); num_offspring = rpois(1, LAMBDA / (1 + neighbor_density / K)); mate = i1.drawByStrength(individual, 1); // single mating if (size(mate) > 0) {