From b518b618c7e54633ea0e6cd1f0a81be9daf2c944 Mon Sep 17 00:00:00 2001 From: jiseonmin Date: Thu, 14 Mar 2024 22:43:30 -0700 Subject: [PATCH] sync with minimal.slim with git diff --- selection/spatial_selection.slim | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/selection/spatial_selection.slim b/selection/spatial_selection.slim index 2b59d99..6703888 100644 --- a/selection/spatial_selection.slim +++ b/selection/spatial_selection.slim @@ -7,17 +7,17 @@ initialize() { defaults = Dictionary( "SEED", getSeed(), - "SD", 0.3, // sigma_D, dispersal distance - "SX", 0.3, // sigma_X, interaction distance for measuring local density - "SM", 0.3, // sigma_M, mate choice distance - "K", 5, // carrying capacity per unit area - "LIFETIME", 4, // average life span - "WIDTH", 25.0, // width of the simulated area - "HEIGHT", 25.0, // height of the simulated area - "RUNTIME", 2000, // total number of ticks to run the simulation for - "L", 1e8, // genome length - "R", 1e-8, // recombination rate - "MU", 0, // mutation rate + "SD", 0.3, // sigma_D, dispersal distance + "SX", 0.3, // sigma_X, interaction distance for measuring local density + "SM", 0.3, // sigma_M, mate choice distance + "K", 5, // carrying capacity per unit area + "LIFETIME", 4, // average life span + "WIDTH", 25.0, // width of the simulated area + "HEIGHT", 25.0, // height of the simulated area + "RUNTIME", 200, // total number of ticks to run the simulation for + "L", 1e8, // genome length + "R", 1e-8, // recombination rate + "MU", 0 // mutation rate "S_FEC", 0., // selection coefficient for fecundity-based selection "S_MOR", 0.5, // selection coefficient for mortality-based selection "H_FEC", 0.5, // dominance coefficient for fecundity-based selection @@ -30,7 +30,7 @@ initialize() { // Set up parameters with a user-defined function setupParams(defaults); - // Set up constants that depend on externally defined parameters + // Set up constants that depend on externally defined parameters defineConstant("FECUN", 1 / LIFETIME); defineConstant("RHO", FECUN / ((1 + FECUN) * K)); defineGlobal("PARAMS", defaults); @@ -83,7 +83,7 @@ first() { i2.evaluate(p1); } -reproduction(){ +reproduction() { // individual fitness based on mutation count mutcount = sum(individual.genomes.countOfMutationsOfType(m1)); indiv_s = S_FEC * (H_FEC * asFloat(mutcount==1) + asFloat(mutcount==2)); @@ -172,7 +172,7 @@ function (void)setupParams(object$ defaults) if (!exists("OUTDIR")) defineConstant("OUTDIR", "."); defaults.addKeysAndValuesFrom(Dictionary("PARAMFILE", PARAMFILE, "OUTDIR", OUTDIR)); - if (fileExists(PARAMFILE)){ + if (fileExists(PARAMFILE)) { local_defaults = Dictionary(paste(readFile(PARAMFILE))); defaults.addKeysAndValuesFrom(local_defaults); defaults.setValue("read_from_paramfile", PARAMFILE); @@ -192,4 +192,4 @@ function (void)setupParams(object$ defaults) catn("==========================="); catn("Model constants: " + defaults.serialize()); catn("==========================="); -} +} \ No newline at end of file