[380] | 1 | expdef:
|
---|
[406] | 2 | name:Reproduction of benthic foraminifera
|
---|
[380] | 3 | info:~
|
---|
[434] | 4 | Basic information about this simulation:
|
---|
| 5 | www.framsticks.com/foraminifera
|
---|
| 6 |
|
---|
| 7 | Technical information:
|
---|
[476] | 8 | Genes and parameter values which control reproduction are stored in data->genes and data->lifeparams fields.
|
---|
[380] | 9 |
|
---|
[476] | 10 | genes:
|
---|
[402] | 11 | genes which are not encoded in Ff genotype:
|
---|
[422] | 12 | min_repro_energy - Minimum energy necessary for reproduction
|
---|
| 13 | hibernation - Defines foram behavior in the case of no nutrients
|
---|
[380] | 14 |
|
---|
[476] | 15 | lifeparams:
|
---|
[380] | 16 | Physiological parameters of foraminifera:
|
---|
[422] | 17 | max_energy_level - maximum energy level reached so far
|
---|
[380] | 18 | gen - generation: 0 haploid, 1 diploid
|
---|
[432] | 19 | species - species: 0 not hibernating 1 hibernating
|
---|
| 20 | hibernated - 0/1 foram is/isn't hibernated
|
---|
[422] | 21 | reproduce - 0/1 foram isn't/is ready for reproduction
|
---|
[380] | 22 | ~
|
---|
| 23 | code:~
|
---|
| 24 |
|
---|
[479] | 25 | global chambers;
|
---|
[422] | 26 | global colors;
|
---|
[430] | 27 | global dir_change;
|
---|
[479] | 28 | global max_chamber_volume;
|
---|
[474] | 29 | global movePerStep;
|
---|
[479] | 30 | global nutrientenergywaiting;
|
---|
| 31 | global o;
|
---|
| 32 | global reprocounter;
|
---|
[481] | 33 | global changePeriod;
|
---|
| 34 | global phase;
|
---|
[487] | 35 | global species_genes;
|
---|
[380] | 36 |
|
---|
[406] | 37 | @include "foraminifera.inc"
|
---|
[401] | 38 |
|
---|
[380] | 39 | // -------------------------------- experiment begin --------------------------------
|
---|
| 40 |
|
---|
| 41 | function onExpDefLoad()
|
---|
| 42 | {
|
---|
| 43 | // define genotype and creature groups
|
---|
| 44 | GenePools.clear();
|
---|
| 45 | Populations.clear();
|
---|
| 46 | GenePools[0].name = "Unused";
|
---|
| 47 |
|
---|
| 48 | var pop = Populations[0];
|
---|
[421] | 49 | pop.name = "Forams";
|
---|
[380] | 50 | pop.en_assim = 0;
|
---|
[404] | 51 | pop.nnsim = 0;
|
---|
[380] | 52 | pop.enableperf = 1;
|
---|
| 53 | pop.death = 1;
|
---|
| 54 | pop.energy = 1;
|
---|
[487] | 55 | pop.selfmask = 0;
|
---|
| 56 | pop.othermask = 0;
|
---|
[401] | 57 | //pop.selfmask = 0x20002; pop.othermask = 0x10002;
|
---|
[422] | 58 | pop.perfperiod = 25;
|
---|
[487] | 59 | pop.bodysim = 0;
|
---|
[380] | 60 |
|
---|
[421] | 61 | pop = Populations.addGroup("Nutrients");
|
---|
[380] | 62 | pop.nnsim = 0;
|
---|
| 63 | pop.enableperf = 0;
|
---|
| 64 | pop.death = 1;
|
---|
| 65 | pop.energy = 1;
|
---|
[487] | 66 | pop.selfmask = 0;
|
---|
| 67 | pop.othermask = 0;
|
---|
[422] | 68 | //pop.othermask = 0x10002;
|
---|
[487] | 69 | pop.bodysim = 0;
|
---|
[380] | 70 |
|
---|
[444] | 71 | pop = Populations.addGroup("ReticulopodiaNutrients");
|
---|
[430] | 72 | pop.nnsim = 0;
|
---|
| 73 | pop.enableperf = 0;
|
---|
| 74 | pop.death = 0;
|
---|
| 75 | pop.energy = 0;
|
---|
[487] | 76 | pop.selfmask = 0;
|
---|
| 77 | pop.othermask = 0;
|
---|
| 78 | pop.bodysim = 0;
|
---|
[444] | 79 |
|
---|
[422] | 80 | //world
|
---|
| 81 | SignalView.mode = 1;
|
---|
[430] | 82 | World.wrldwat = 200;
|
---|
[447] | 83 | World.wrldsiz = micronsToFrams(40000);
|
---|
[422] | 84 | World.wrldbnd = 1;
|
---|
[486] | 85 | ExpProperties.stress = 1;
|
---|
| 86 | ExpProperties.creath = -0.99; //just above the bottom
|
---|
| 87 | ExpProperties.autorestart = 0;
|
---|
[422] | 88 |
|
---|
[474] | 89 | //time
|
---|
[486] | 90 | ExpProperties.secPerStep = 480;
|
---|
| 91 | ExpProperties.foramSpeedMmPerMin = 0.05;
|
---|
[474] | 92 | movePerStep = getMovePerStep();
|
---|
| 93 |
|
---|
[486] | 94 | //ExpProperties.visualize = 1; //uncomment to visualize reticulopodia and indicate nutrients positions
|
---|
[444] | 95 |
|
---|
[487] | 96 | //ExpProperties.logging = 1; //uncomment to enable logging simulation parameters to log files
|
---|
[401] | 97 |
|
---|
[422] | 98 | //reproduction
|
---|
[486] | 99 | ExpProperties.foramPop = 20;
|
---|
| 100 | ExpProperties.crossprob = 0;
|
---|
| 101 | ExpProperties.mutationprob = 0;
|
---|
| 102 | ExpProperties.repro_time = 720;
|
---|
| 103 | ExpProperties.gametoPeriod = 43200;
|
---|
| 104 | ExpProperties.divisionCost = 15.6;
|
---|
[422] | 105 | reprocounter = 0;
|
---|
[380] | 106 |
|
---|
[487] | 107 | species_genes = [];
|
---|
| 108 |
|
---|
[479] | 109 | init_chambers();
|
---|
| 110 |
|
---|
[422] | 111 | //morphology
|
---|
[474] | 112 | dir_change = 30000;
|
---|
[486] | 113 | ExpProperties.zone1_range = micronsToFrams(1000);
|
---|
| 114 | ExpProperties.zone2_range = micronsToFrams(3000);
|
---|
| 115 | ExpProperties.chamber_growth_time = 720;
|
---|
| 116 | ExpProperties.chamberCostPerSec = 0.000001;
|
---|
| 117 | ExpProperties.chamber_proculus_haplo = micronsToFrams(50);
|
---|
| 118 | ExpProperties.chamber_difference_haplo = 0.0;
|
---|
| 119 | ExpProperties.chamber_proculus_diplo = micronsToFrams(20);
|
---|
| 120 | ExpProperties.chamber_difference_diplo = micronsToFrams(8);
|
---|
[479] | 121 |
|
---|
| 122 | max_chamber_volume = [Vector.new(), Vector.new()];
|
---|
[422] | 123 | for (var j = 0; j < 2; j++)
|
---|
| 124 | {
|
---|
| 125 | for (var i = 0; i < chambers[0].size; i++)
|
---|
| 126 | {
|
---|
[479] | 127 | max_chamber_volume[j].add(((volumeInMicrons(getProperty(j, "chamber_proculus")) + volumeInMicrons(getProperty(j, "chamber_proculus") + (i) * getProperty(j, "chamber_difference")))*(i+1))/2);
|
---|
[422] | 128 | }
|
---|
| 129 | }
|
---|
| 130 |
|
---|
| 131 | //energetics
|
---|
[486] | 132 | ExpProperties.min_repro_energ_haplo = 4;
|
---|
| 133 | ExpProperties.min_repro_energ_diplo = 6;
|
---|
[430] | 134 |
|
---|
[486] | 135 | ExpProperties.e_meta = 0.0000005;
|
---|
| 136 | ExpProperties.energy_hib = 0.0000001;
|
---|
| 137 | ExpProperties.energy_move = 0.0000005;
|
---|
[430] | 138 |
|
---|
[486] | 139 | ExpProperties.energies0_haplo = energyFromVolume(micronsToFrams(20),1);
|
---|
| 140 | ExpProperties.energies0_diplo = energyFromVolume(micronsToFrams(1.25),1);
|
---|
| 141 | ExpProperties.feedtrans = 0.001;
|
---|
| 142 | ExpProperties.e_repro_cost_haplo = 0.3;
|
---|
| 143 | ExpProperties.e_repro_cost_diplo = 0.2;
|
---|
[422] | 144 |
|
---|
[486] | 145 | ExpProperties.e_death_level_haplo = 0.5;
|
---|
| 146 | ExpProperties.e_death_level_diplo = 0.5;
|
---|
[479] | 147 |
|
---|
[422] | 148 | //nutrients
|
---|
[481] | 149 | changePeriod = 0;
|
---|
[488] | 150 | phase = "low";
|
---|
[487] | 151 | ExpProperties.foodperiod = 3600;
|
---|
[486] | 152 | ExpProperties.foodPeriodChange = 0;
|
---|
| 153 | ExpProperties.nutrientradius = micronsToFrams(10);
|
---|
| 154 | ExpProperties.energy_nut = energyFromVolume(ExpProperties.nutrientradius,1);
|
---|
| 155 | ExpProperties.feedrate = 1;
|
---|
| 156 | ExpProperties.ingestion = 0.25;
|
---|
[474] | 157 | nutrientenergywaiting = 0;
|
---|
[380] | 158 | ExpState.totaltestedcr = 0;
|
---|
[421] | 159 | ExpState.nutrient = "";
|
---|
[488] | 160 |
|
---|
| 161 | addSpecies({"min_repro_energies" : [4,6]});
|
---|
| 162 | addSpecies({"min_repro_energies" : [4,8]});
|
---|
[380] | 163 | }
|
---|
| 164 |
|
---|
| 165 | @include "standard_placement.inc"
|
---|
| 166 |
|
---|
[479] | 167 | function volumeInMicrons(radiusInFrams)
|
---|
[475] | 168 | {
|
---|
[479] | 169 | return 4.0/3.0*Math.pi*Math.pow(framsToMicrons(radiusInFrams),3);
|
---|
[475] | 170 | }
|
---|
| 171 |
|
---|
[479] | 172 | function energyFromVolume(base, isRadiusInFrams)
|
---|
| 173 | {
|
---|
| 174 | if (isRadiusInFrams == 1) //radius in frams
|
---|
| 175 | {
|
---|
[486] | 176 | return ExpProperties.picoCarbonPerMikro*volumeInMicrons(base);
|
---|
[479] | 177 | }
|
---|
| 178 | else //volume in microns
|
---|
| 179 | {
|
---|
[486] | 180 | return ExpProperties.picoCarbonPerMikro * base;
|
---|
[479] | 181 | }
|
---|
| 182 | }
|
---|
| 183 |
|
---|
[474] | 184 | function getMovePerStep()
|
---|
| 185 | {
|
---|
[486] | 186 | return micronsToFrams((ExpProperties.foramSpeedMmPerMin/60)*1000)*ExpProperties.secPerStep;
|
---|
[474] | 187 | }
|
---|
| 188 |
|
---|
[447] | 189 | function micronsToFrams(micrometers)
|
---|
[422] | 190 | {
|
---|
[445] | 191 | return micrometers*0.025;
|
---|
[422] | 192 | }
|
---|
| 193 |
|
---|
[447] | 194 | function framsToMicrons(framsworldunits)
|
---|
[445] | 195 | {
|
---|
| 196 | return framsworldunits/0.025;
|
---|
| 197 | }
|
---|
| 198 |
|
---|
[422] | 199 | function getProperty(gen, prop_id)
|
---|
| 200 | {
|
---|
| 201 | var ploid = "haplo";
|
---|
| 202 | if (gen == 1) ploid = "diplo";
|
---|
[486] | 203 | return ExpProperties.[prop_id + "_" + ploid];
|
---|
[422] | 204 | }
|
---|
| 205 |
|
---|
[487] | 206 | function getGene(cr, gen_id, gen_set)
|
---|
| 207 | {
|
---|
| 208 | if (cr.data->lifeparams->gen == 0)
|
---|
| 209 | return cr.data->genes[gen_id];
|
---|
| 210 | else
|
---|
| 211 | return cr.data->genes[gen_set][gen_id];
|
---|
| 212 | }
|
---|
| 213 |
|
---|
[479] | 214 | function addForam(species, iter, chambernum, ploid)
|
---|
[422] | 215 | {
|
---|
[487] | 216 | var geno = createForamMorphology(species_genes[species]->morphotype, ploid, chambernum);
|
---|
[422] | 217 | var cr = Populations[0].add(geno);
|
---|
[479] | 218 | cr.name = "Initial creature" + species + "_" + iter;
|
---|
[422] | 219 | placeCreatureRandomly(cr, 0, 0);
|
---|
[479] | 220 | cr.energy0 = energyFromVolume(max_chamber_volume[ploid][chambernum],0);
|
---|
[422] | 221 | cr.energy = cr.energy0;
|
---|
[487] | 222 | setGenotype({"opt" : 0, "cr" : cr, "species" : species, "energy0" : cr.energy0, "genes" : species_genes[species]});
|
---|
[479] | 223 | if (ploid == 1)
|
---|
| 224 | {
|
---|
| 225 | cr.data->lifeparams->gen = 1;
|
---|
| 226 | cr.data->genes = [cr.data->genes, cr.data->genes]; //TODO two different genes sets
|
---|
| 227 | }
|
---|
[422] | 228 | }
|
---|
| 229 |
|
---|
[479] | 230 | function addInitialForam(species, iter)
|
---|
| 231 | {
|
---|
| 232 | var ploid = 0;
|
---|
| 233 | if (Math.rnd01 > 0.5)
|
---|
| 234 | {
|
---|
| 235 | ploid = 1;
|
---|
| 236 | }
|
---|
| 237 | //add new foram with random energy bewtween starting energy and reproduction treshold
|
---|
[488] | 238 | addForam(species, iter, int(Math.rndUni(0,species_genes[species]->min_repro_energies[ploid])),ploid);
|
---|
[479] | 239 | }
|
---|
| 240 |
|
---|
[487] | 241 | //new species can be added as a dictionary with parameter values that are different than default values
|
---|
| 242 | function addSpecies(new_genes)
|
---|
| 243 | {
|
---|
| 244 | species_genes.add({"min_repro_energies" : [4,6], "energies0" : [20, 1.25], "hibernation" : 0, "morphotype" : 0});
|
---|
| 245 | for (var i = 0; i < new_genes.size; i++)
|
---|
| 246 | {
|
---|
| 247 | var key = new_genes.getKey(i);
|
---|
| 248 | species_genes[species_genes.size-1][key] = new_genes[key];
|
---|
| 249 | }
|
---|
| 250 | }
|
---|
| 251 |
|
---|
[380] | 252 | function onExpInit()
|
---|
| 253 | {
|
---|
| 254 | Populations[0].clear();
|
---|
| 255 | Populations[1].clear();
|
---|
[444] | 256 | Populations[2].clear(); //reticulopodia and nutrients
|
---|
[380] | 257 |
|
---|
[487] | 258 | if (species_genes.size == 0)
|
---|
[380] | 259 | {
|
---|
[487] | 260 | addSpecies({}); //default
|
---|
[380] | 261 | }
|
---|
[487] | 262 |
|
---|
| 263 | for (var spec = 0; spec < species_genes.size; spec++)
|
---|
| 264 | {
|
---|
| 265 | for (var i = 0; i < ExpProperties.foramPop; i++)
|
---|
| 266 | {
|
---|
| 267 | addInitialForam(spec, i);
|
---|
| 268 | }
|
---|
| 269 | }
|
---|
[422] | 270 | o = Populations[0][0].getMechPart(0).orient.clone();
|
---|
[380] | 271 | ExpState.totaltestedcr = 0;
|
---|
| 272 | }
|
---|
| 273 |
|
---|
| 274 | function onExpLoad()
|
---|
| 275 | {
|
---|
| 276 | for (var pop in Populations)
|
---|
| 277 | pop.clear();
|
---|
| 278 |
|
---|
| 279 | Loader.addClass(sim_params.*);
|
---|
| 280 | Loader.setBreakLabel(Loader.BeforeUnknown, "onExpLoad_Unknown");
|
---|
| 281 | Loader.run();
|
---|
| 282 |
|
---|
[421] | 283 | Simulator.print("Loaded " + Populations[0].size + " Forams and " + Populations[1].size + " nutrient objects");
|
---|
[380] | 284 | }
|
---|
| 285 |
|
---|
| 286 | function onExpLoad_Unknown()
|
---|
| 287 | {
|
---|
| 288 | if (Loader.objectName == "org") // saved by the old expdef
|
---|
| 289 | {
|
---|
| 290 | var g = Genotype.newFromString("");
|
---|
| 291 | Loader.currentObject = g;
|
---|
| 292 | Interface.makeFrom(g).setAllDefault();
|
---|
| 293 | Loader.loadObject();
|
---|
| 294 | var cr = Populations[0].add(g);
|
---|
| 295 | if (cr != null)
|
---|
| 296 | {
|
---|
[401] | 297 | //cr.rotate(0,0,Math.rnd01*Math.twopi);
|
---|
[476] | 298 | if ((typeof(g.data->genes) == "Vector") && (g.data->genes.size >= 3))
|
---|
[401] | 299 | {
|
---|
| 300 | // [x,y,energy]
|
---|
[476] | 301 | cr.move(g.data->genes[0] - cr.center_x, g.data->genes[1] - cr.center_y, 0);
|
---|
| 302 | cr.energy = g.data->genes[2];
|
---|
[380] | 303 | }
|
---|
| 304 | else
|
---|
| 305 | {
|
---|
[401] | 306 | cr.move(Math.rnd01 * World.wrldsiz - cr.center_x, Math.rnd01 * World.wrldsiz - cr.center_y, 0);
|
---|
[380] | 307 | }
|
---|
| 308 | }
|
---|
| 309 | }
|
---|
| 310 | else if (Loader.objectName == "Creature")
|
---|
| 311 | {
|
---|
| 312 | Loader.currentObject = CreatureSnapshot.new();
|
---|
| 313 | Loader.loadObject();
|
---|
| 314 | Populations[0].add(Loader.currentObject);
|
---|
| 315 | }
|
---|
| 316 | }
|
---|
| 317 |
|
---|
| 318 | function onExpSave()
|
---|
| 319 | {
|
---|
| 320 | File.writeComment("saved by '%s.expdef'" % Simulator.expdef);
|
---|
| 321 |
|
---|
[401] | 322 | var tmpvec = [], i;
|
---|
[380] | 323 |
|
---|
[401] | 324 | for(var cr in Populations[1])
|
---|
[380] | 325 | tmpvec.add([cr.center_x, cr.center_y, cr.energy]);
|
---|
| 326 |
|
---|
[421] | 327 | ExpState.nutrient = tmpvec;
|
---|
[380] | 328 | File.writeObject(sim_params.*);
|
---|
[432] | 329 | ExpState.nutrient = null; //vectors are only created for saving and then discarded
|
---|
[380] | 330 |
|
---|
| 331 | for (var cr in Populations[0])
|
---|
| 332 | File.writeObject(cr);
|
---|
| 333 | }
|
---|
| 334 |
|
---|
| 335 | // -------------------------------- experiment end --------------------------------
|
---|
| 336 |
|
---|
[421] | 337 | // -------------------------------- foram begin -----------------------------------
|
---|
[380] | 338 |
|
---|
[479] | 339 | function setForamMeta(cr)
|
---|
[430] | 340 | {
|
---|
[479] | 341 | //percent of current energy
|
---|
[486] | 342 | cr.idleen = (ExpProperties.e_meta * cr.energy)*ExpProperties.secPerStep;
|
---|
[430] | 343 | }
|
---|
| 344 |
|
---|
| 345 | function lastChamberNum(cr)
|
---|
| 346 | {
|
---|
| 347 | return cr.numparts-1;
|
---|
| 348 | }
|
---|
| 349 |
|
---|
[479] | 350 | function getZoneRange(cr, zone_num)
|
---|
| 351 | {
|
---|
[486] | 352 | return ExpProperties.["zone"+zone_num+"_range"];
|
---|
[479] | 353 | }
|
---|
| 354 |
|
---|
[421] | 355 | function onForamsBorn(cr)
|
---|
| 356 | {
|
---|
[479] | 357 | setForamMeta(cr);
|
---|
[486] | 358 | if (ExpProperties.visualize == 1)
|
---|
[430] | 359 | {
|
---|
[479] | 360 | var ret = Populations[2].add("//0\np:sh=3,sx=0.01,sy="+getZoneRange(cr,1)+",sz="+getZoneRange(cr,1)+",ry=1.57,vr=1.0,1.0,1.0");
|
---|
[476] | 361 | cr.data->reticulopodiacreature = ret;
|
---|
[430] | 362 | }
|
---|
[380] | 363 | }
|
---|
| 364 |
|
---|
[401] | 365 | function placeRandomlyNotColliding(cr)
|
---|
| 366 | {
|
---|
| 367 | var retry = 100; //try 100 times
|
---|
| 368 | while (retry--)
|
---|
| 369 | {
|
---|
| 370 | placeCreatureRandomly(cr, 0, 0);
|
---|
| 371 | if (!cr.boundingBoxCollisions(0))
|
---|
| 372 | return cr;
|
---|
| 373 | }
|
---|
| 374 |
|
---|
| 375 | Populations[0].delete(cr);
|
---|
| 376 | }
|
---|
| 377 |
|
---|
[444] | 378 | function visualization(cr)
|
---|
| 379 | {
|
---|
| 380 | var has_ret = 0;
|
---|
| 381 |
|
---|
[476] | 382 | if (cr.data->reticulopodiacreature != null)
|
---|
[444] | 383 | {
|
---|
[476] | 384 | if (Populations[2].findUID(cr.data->reticulopodiacreature.uid) != null)
|
---|
[444] | 385 | {
|
---|
| 386 | has_ret = 1;
|
---|
| 387 | }
|
---|
| 388 | }
|
---|
| 389 |
|
---|
| 390 | return has_ret;
|
---|
| 391 | }
|
---|
| 392 |
|
---|
[422] | 393 | function foramGrow(cr, chamber_num)
|
---|
[380] | 394 | {
|
---|
[476] | 395 | if ((chamber_num+1) < chambers[cr.data->lifeparams->species].size)
|
---|
[474] | 396 | {
|
---|
[487] | 397 | var geno = createForamMorphology(getGene(cr, "morphotype", 0), cr.data->lifeparams->gen, chamber_num+1);
|
---|
[474] | 398 | var cr2 = Populations[0].add(geno);
|
---|
[422] | 399 |
|
---|
[474] | 400 | cr2.energy0 = cr.energy;
|
---|
| 401 | cr2.energy = cr2.energy0;
|
---|
[422] | 402 |
|
---|
[487] | 403 | setGenotype({"cr" : cr2, "parent_genes" : cr.data->genes, "parent_lifeparams" : cr.data->lifeparams, "opt" : 2, "energy0" : cr.energy0});
|
---|
[474] | 404 | cr2.moveAbs(cr.center_x - cr2.size_x / 2, cr.center_y - cr2.size_y / 2, cr.pos_z);
|
---|
[479] | 405 | setForamMeta(cr2);
|
---|
[422] | 406 |
|
---|
[474] | 407 | if (visualization(cr))
|
---|
| 408 | {
|
---|
[476] | 409 | Populations[2].delete(cr.data->reticulopodiacreature);
|
---|
[474] | 410 | }
|
---|
| 411 | Populations[0].delete(cr);
|
---|
[430] | 412 | }
|
---|
[380] | 413 | }
|
---|
| 414 |
|
---|
[435] | 415 | function stepToNearest(cr)
|
---|
[380] | 416 | {
|
---|
| 417 | var p = cr.getMechPart(0);
|
---|
[479] | 418 | var n = cr.signals.receiveSet("nutrient", getZoneRange(cr,2));
|
---|
[380] | 419 |
|
---|
[401] | 420 | //if signals are received find the source of the nearest
|
---|
[380] | 421 | if (n.size > 0)
|
---|
| 422 | {
|
---|
| 423 | var i;
|
---|
| 424 | var mp;
|
---|
| 425 | var distvec = XYZ.new(0, 0, 0);
|
---|
| 426 | var dist;
|
---|
[470] | 427 | var mindist = 100000000000.0;
|
---|
[380] | 428 | var mindistvec = null;
|
---|
[430] | 429 | var eating = 0;
|
---|
[380] | 430 |
|
---|
[401] | 431 | for (i = 0; i < n.size; i++)
|
---|
[380] | 432 | {
|
---|
[430] | 433 | mp = n[i].value.getMechPart(0);
|
---|
[401] | 434 | distvec.set(mp.pos);
|
---|
| 435 | distvec.sub(p.pos);
|
---|
| 436 | dist = distvec.length;
|
---|
[479] | 437 | if (dist < getZoneRange(cr,1))
|
---|
[380] | 438 | {
|
---|
[430] | 439 | if (n[i].value != null)
|
---|
| 440 | {
|
---|
| 441 | energyTransfer(cr, n[i].value);
|
---|
| 442 | eating = 1;
|
---|
| 443 | }
|
---|
| 444 | }
|
---|
[476] | 445 | else if (eating == 0 && cr.data->lifeparams->hibernated == 0 && dist < mindist)
|
---|
[430] | 446 | {
|
---|
[401] | 447 | mindist = dist;
|
---|
| 448 | mindistvec = distvec.clone();
|
---|
[380] | 449 | }
|
---|
| 450 | }
|
---|
| 451 |
|
---|
[476] | 452 | if (!eating && cr.data->lifeparams->hibernated == 0)
|
---|
[430] | 453 | {
|
---|
| 454 | mindistvec.normalize();
|
---|
[474] | 455 | mindistvec.scale(-1*movePerStep);
|
---|
[430] | 456 | cr.localDrive = mindistvec;
|
---|
| 457 | moveEnergyDec(cr);
|
---|
| 458 | }
|
---|
| 459 |
|
---|
[422] | 460 | return 1;
|
---|
[380] | 461 | }
|
---|
[422] | 462 |
|
---|
| 463 | else
|
---|
[474] | 464 | {
|
---|
[422] | 465 | return 0;
|
---|
[474] | 466 | }
|
---|
[422] | 467 | }
|
---|
[401] | 468 |
|
---|
[422] | 469 | function moveEnergyDec(cr)
|
---|
| 470 | {
|
---|
[476] | 471 | if (cr.data->lifeparams->hibernated == 0)
|
---|
[422] | 472 | {
|
---|
[479] | 473 | //percent of maximal energy
|
---|
[486] | 474 | cr.energy_m += (ExpProperties.energy_move * cr.data->lifeparams->max_energy_level)*ExpProperties.secPerStep;
|
---|
[422] | 475 | }
|
---|
[421] | 476 | }
|
---|
[380] | 477 |
|
---|
[487] | 478 | function fence(pos)
|
---|
| 479 | {
|
---|
| 480 | return Math.min(Math.max(0,pos),World.wrldsiz);
|
---|
| 481 | }
|
---|
| 482 |
|
---|
[422] | 483 | function foramMove(cr)
|
---|
[421] | 484 | {
|
---|
[422] | 485 | //TODO moving inside sediment?
|
---|
[421] | 486 |
|
---|
[422] | 487 | //adjustment in z axis
|
---|
[487] | 488 | cr.moveAbs(fence(cr.pos_x), fence(cr.pos_y), 0);
|
---|
[421] | 489 |
|
---|
[430] | 490 | //are there any nutrients in zone 1 or 2?
|
---|
[401] | 491 | {
|
---|
[435] | 492 | var moved = stepToNearest(cr); //TODO weighted sum of distance and energy
|
---|
[422] | 493 | if (moved==1)
|
---|
[430] | 494 | {
|
---|
[422] | 495 | return;
|
---|
| 496 | }
|
---|
[401] | 497 | }
|
---|
| 498 |
|
---|
[422] | 499 | //no nutrients in zone 2
|
---|
[487] | 500 | if (getGene(cr, "hibernation",0) == 1)
|
---|
[401] | 501 | {
|
---|
[430] | 502 | reverseHib(cr);
|
---|
[422] | 503 | cr.localDrive = XYZ.new(0,0,0);
|
---|
[380] | 504 | }
|
---|
[422] | 505 | //random move
|
---|
[487] | 506 | else if (Simulator.stepNumber%int(dir_change/ExpProperties.secPerStep) == 0)
|
---|
[380] | 507 | {
|
---|
[476] | 508 | cr.data->lifeparams->dir = randomDir();
|
---|
| 509 | cr.localDrive = cr.data->lifeparams->dir;
|
---|
[422] | 510 | moveEnergyDec(cr);
|
---|
| 511 | }
|
---|
[474] | 512 | else
|
---|
| 513 | {
|
---|
[476] | 514 | cr.localDrive = cr.data->lifeparams->dir;
|
---|
[474] | 515 | }
|
---|
[422] | 516 | }
|
---|
[401] | 517 |
|
---|
[474] | 518 | function randomDir()
|
---|
| 519 | {
|
---|
[486] | 520 | var dir = (Math.rndUni(-ExpProperties.zone2_range, ExpProperties.zone2_range), Math.rndUni(-ExpProperties.zone2_range, ExpProperties.zone2_range), 0);
|
---|
[474] | 521 | dir.normalize();
|
---|
| 522 | dir.scale(-1*movePerStep);
|
---|
| 523 | return dir;
|
---|
| 524 | }
|
---|
| 525 |
|
---|
[430] | 526 | function energyTransfer(cr1, cr2)
|
---|
[422] | 527 | {
|
---|
[430] | 528 | cr1.localDrive = XYZ.new(0,0,0);
|
---|
[486] | 529 | var e = ExpProperties.feedtrans*cr1.energy;//ExpProperties.feedtrans*cr1.energy*ExpProperties.ingestion*ExpProperties.secPerStep; //TODO efficiency dependent on age
|
---|
[479] | 530 | e = Math.min(cr2.energy, e);
|
---|
[486] | 531 | e *= ExpProperties.secPerStep;
|
---|
| 532 | //Simulator.print("transferring "+e +"("+e*ExpProperties.ingestion+")"+" to "+cr1.name +" ("+ cr1.energy+") " +" from "+cr2.name+" ("+cr2.energy+") "+ e/ExpProperties.secPerStep+ " per sec");
|
---|
[479] | 533 | cr2.energy_m = cr2.energy_m + e + 0.0000001;
|
---|
[486] | 534 | cr1.energy_p = cr1.energy_p + e*ExpProperties.ingestion;
|
---|
[476] | 535 | if (cr1.data->lifeparams->hibernated == 1)
|
---|
[422] | 536 | {
|
---|
[430] | 537 | reverseHib(cr1);
|
---|
[422] | 538 | }
|
---|
| 539 | }
|
---|
[401] | 540 |
|
---|
[430] | 541 | function reverseHib(cr)
|
---|
| 542 | {
|
---|
[476] | 543 | if (cr.data->lifeparams->hibernated == 1)
|
---|
[430] | 544 | {
|
---|
[479] | 545 | setForamMeta(cr); //unhibernate
|
---|
[430] | 546 | }
|
---|
| 547 | else
|
---|
| 548 | {
|
---|
[486] | 549 | cr.idleen = (ExpProperties.energy_hib * cr.energy)*ExpProperties.secPerStep; //hibernate
|
---|
[430] | 550 | }
|
---|
[476] | 551 | cr.data->lifeparams->hibernated = 1 - cr.data->lifeparams->hibernated;
|
---|
[430] | 552 | }
|
---|
| 553 |
|
---|
[479] | 554 |
|
---|
[422] | 555 | function onForamsStep(cr)
|
---|
| 556 | {
|
---|
[479] | 557 | //checking for gametogenesis process
|
---|
| 558 | if (cr.data->lifeparams->division_time > 0)
|
---|
[444] | 559 | {
|
---|
[479] | 560 | cr.data->lifeparams->division_time = Math.max(cr.data->lifeparams->division_time-1,0);
|
---|
[444] | 561 | }
|
---|
[479] | 562 | //checking for end of gametogenesis
|
---|
| 563 | else if (cr.data->lifeparams->division_time == 0)
|
---|
[422] | 564 | {
|
---|
[479] | 565 | //waiting for gamets fusion
|
---|
[422] | 566 | }
|
---|
[479] | 567 | //checking for chamber growth process
|
---|
| 568 | else if (cr.data->lifeparams->chamber_growth > 0)
|
---|
| 569 | {
|
---|
| 570 | cr.data->lifeparams->chamber_growth = Math.max(cr.data->lifeparams->chamber_growth-1,0);
|
---|
[486] | 571 | //Simulator.print("chamber growing, time left = " + cr.data->lifeparams->chamber_growth*ExpProperties.secPerStep);
|
---|
| 572 | cr.energy_m += ExpProperties.chamberCostPerSec * cr.energy * ExpProperties.secPerStep;
|
---|
[422] | 573 |
|
---|
[479] | 574 | //Simulator.print("energy " + cr2.energy + " subtracting " + growth_cost);
|
---|
| 575 | }
|
---|
| 576 | //checking for end of chamber growth process
|
---|
| 577 | else if (cr.data->lifeparams->chamber_growth == 0)
|
---|
[430] | 578 | {
|
---|
[479] | 579 | foramGrow(cr, lastChamberNum(cr));
|
---|
| 580 | cr.data->lifeparams->chamber_growth = -1;
|
---|
| 581 | //Simulator.print("chamber "+ (lastChamberNum(cr) + 1) +" complete");
|
---|
[430] | 582 | }
|
---|
[479] | 583 | else
|
---|
[422] | 584 | {
|
---|
[479] | 585 | //update of metabolism rate
|
---|
| 586 | if (cr.data->lifeparams->hibernated == 0)
|
---|
[401] | 587 | {
|
---|
[479] | 588 | setForamMeta(cr);
|
---|
| 589 | }
|
---|
| 590 |
|
---|
| 591 | cr.getMechPart(0).orient.set(o);
|
---|
| 592 | if (visualization(cr))
|
---|
| 593 | {
|
---|
| 594 | cr.data->reticulopodiacreature.moveAbs(cr.center_x-getZoneRange(cr,1), cr.center_y-getZoneRange(cr,1), cr.center_z-getZoneRange(cr,1)-getProperty(cr.data->lifeparams->gen, "chamber_proculus"));
|
---|
| 595 | }
|
---|
| 596 |
|
---|
| 597 | if (deathConditions(cr) == 1)
|
---|
| 598 | {
|
---|
| 599 | Populations[0].kill(cr);
|
---|
| 600 | return;
|
---|
| 601 | }
|
---|
| 602 |
|
---|
| 603 | foramMove(cr);
|
---|
| 604 |
|
---|
| 605 | var repro = foramReproduce(cr);
|
---|
| 606 | if (repro == 1)
|
---|
| 607 | {
|
---|
| 608 | return;
|
---|
| 609 | }
|
---|
| 610 |
|
---|
| 611 | cr.data->lifeparams->max_energy_level = Math.max(cr.energy, cr.data->lifeparams->max_energy_level);
|
---|
| 612 |
|
---|
| 613 | //cheking conditions of chamber growth process start
|
---|
| 614 | if (lastChamberNum(cr) != chambers[0].size-1)
|
---|
| 615 | {
|
---|
| 616 | if ((cr.data->lifeparams->max_energy_level >= energyFromVolume(max_chamber_volume[cr.data->lifeparams->gen][lastChamberNum(cr)],0)))
|
---|
| 617 | {
|
---|
[486] | 618 | cr.data->lifeparams->chamber_growth = int(ExpProperties.chamber_growth_time/ExpProperties.secPerStep);
|
---|
[479] | 619 | }
|
---|
| 620 | }
|
---|
[430] | 621 | }
|
---|
[380] | 622 | }
|
---|
| 623 |
|
---|
[422] | 624 | function deathConditions(cr)
|
---|
| 625 | {
|
---|
[486] | 626 | if ((cr.energy <= getProperty(cr.data->lifeparams->gen,"e_death_level")*cr.data->lifeparams->max_energy_level) || (Math.rnd01 < ExpProperties.hunted_prob))
|
---|
[479] | 627 | {
|
---|
[422] | 628 | return 1;
|
---|
[479] | 629 | }
|
---|
[422] | 630 | else
|
---|
| 631 | return 0;
|
---|
| 632 | }
|
---|
| 633 |
|
---|
[421] | 634 | function onForamsDied(cr)
|
---|
[380] | 635 | {
|
---|
[444] | 636 | if (visualization(cr))
|
---|
[430] | 637 | {
|
---|
[476] | 638 | Populations[2].delete(cr.data->reticulopodiacreature);
|
---|
[430] | 639 | }
|
---|
[380] | 640 | //fossilization
|
---|
| 641 | var geno = GenePools[0].add(cr.genotype);
|
---|
[476] | 642 | geno.data->genes = cr.data->genes;
|
---|
| 643 | geno.data->lifeparams = cr.data->lifeparams;
|
---|
[486] | 644 | if (ExpProperties.logging == 1) Simulator.print("\"" + cr.name + "\" died...");
|
---|
[380] | 645 | ExpState.totaltestedcr++;
|
---|
| 646 | }
|
---|
| 647 |
|
---|
[421] | 648 | // --------------------------------foram end -------------------------------------
|
---|
[380] | 649 |
|
---|
[421] | 650 | // -------------------------------- nutrient begin --------------------------------
|
---|
[380] | 651 |
|
---|
[479] | 652 | function createNutrientGenotype(nutrientradius)
|
---|
[422] | 653 | {
|
---|
[479] | 654 | return "//0\np:sh=3,sx="+nutrientradius+",sy="+nutrientradius+",sz="+nutrientradius+",ry=1.5,vr=0.0,1.0,0.0";
|
---|
[422] | 655 | }
|
---|
| 656 |
|
---|
[421] | 657 | function onNutrientsStep(cr)
|
---|
[380] | 658 | {
|
---|
[444] | 659 | cr.moveAbs(cr.pos_x % World.wrldsiz, cr.pos_y % World.wrldsiz, 0.5);
|
---|
[380] | 660 | }
|
---|
| 661 |
|
---|
[421] | 662 | function addNutrient()
|
---|
[380] | 663 | {
|
---|
[486] | 664 | var cr = Populations[1].add(createNutrientGenotype(ExpProperties.nutrientradius));
|
---|
[380] | 665 |
|
---|
[421] | 666 | cr.name = "Nutrients";
|
---|
[380] | 667 | cr.idleen = 0;
|
---|
[486] | 668 | cr.energy0 = ExpProperties.energy_nut;
|
---|
[416] | 669 | cr.energy = cr.energy0;
|
---|
[421] | 670 | cr.signals.add("nutrient");
|
---|
[380] | 671 |
|
---|
[430] | 672 | cr.signals[0].value = cr;
|
---|
[380] | 673 |
|
---|
[422] | 674 | placeCreatureRandomly(cr, 0, 0);
|
---|
[486] | 675 | if (ExpProperties.visualize == 1)
|
---|
[444] | 676 | {
|
---|
[486] | 677 | var nutsize = ExpProperties.nutrientradius*10;
|
---|
[444] | 678 | var nut = Populations[2].add("//0\np:sh=2,sx="+nutsize+",sy="+nutsize+",sz="+nutsize+",ry=1.5,vr=0.0,1.0,0.0");
|
---|
[476] | 679 | cr.data->reticulopodiacreature = nut;
|
---|
[444] | 680 | nut.moveAbs(cr.pos_x-1.5*nutsize, cr.pos_y-1.5*nutsize, 0.5);
|
---|
| 681 | }
|
---|
[380] | 682 | }
|
---|
| 683 |
|
---|
[444] | 684 | function onNutrientsDied(cr)
|
---|
| 685 | {
|
---|
| 686 | if (visualization(cr))
|
---|
| 687 | {
|
---|
[476] | 688 | Populations[2].delete(cr.data->reticulopodiacreature);
|
---|
[444] | 689 | }
|
---|
| 690 | }
|
---|
| 691 |
|
---|
[422] | 692 | function nutrientGrowth()
|
---|
[380] | 693 | {
|
---|
[486] | 694 | if (ExpProperties.foodPeriodChange > 0)
|
---|
[481] | 695 | {
|
---|
| 696 | changePeriod += 1;
|
---|
[486] | 697 | if (phase=="low" && (changePeriod*ExpProperties.secPerStep) >= 23328000) //9 months
|
---|
[481] | 698 | {
|
---|
[486] | 699 | ExpProperties.foodperiod = ExpProperties.foodperiod/ExpProperties.foodPeriodChange;
|
---|
[481] | 700 | phase = "high";
|
---|
| 701 | changePeriod = 0;
|
---|
| 702 | }
|
---|
| 703 |
|
---|
[486] | 704 | else if (phase == "high" && (changePeriod*ExpProperties.secPerStep) >= 7776000) //3 months
|
---|
[481] | 705 | {
|
---|
[486] | 706 | ExpProperties.foodperiod = ExpProperties.foodperiod*ExpProperties.foodPeriodChange;
|
---|
[481] | 707 | phase = "low";
|
---|
| 708 | changePeriod = 0;
|
---|
| 709 | }
|
---|
| 710 | }
|
---|
[474] | 711 | nutrientenergywaiting = nutrientenergywaiting + 1;
|
---|
[486] | 712 | if (nutrientenergywaiting*ExpProperties.secPerStep >= ExpProperties.foodperiod)
|
---|
[380] | 713 | {
|
---|
[486] | 714 | for (var i = 0; i < ExpProperties.feedrate; i++)
|
---|
[432] | 715 | {
|
---|
[422] | 716 | addNutrient();
|
---|
| 717 | }
|
---|
| 718 |
|
---|
| 719 | nutrientenergywaiting = 0.0;
|
---|
| 720 | Simulator.checkpoint();
|
---|
[380] | 721 | }
|
---|
| 722 | }
|
---|
| 723 |
|
---|
[421] | 724 | // -------------------------------- nutrient end --------------------------------
|
---|
[380] | 725 |
|
---|
[422] | 726 | // -------------------------------- step begin --------------------------------
|
---|
[380] | 727 |
|
---|
[422] | 728 | function onStep()
|
---|
| 729 | {
|
---|
[432] | 730 |
|
---|
| 731 | nutrientGrowth();
|
---|
[486] | 732 | if (ExpProperties.logging == 1)
|
---|
[422] | 733 | {
|
---|
| 734 | createStatistics();
|
---|
| 735 | }
|
---|
| 736 |
|
---|
| 737 | //reproduction --------------------------------------------
|
---|
| 738 | reprocounter += 1;
|
---|
[486] | 739 | if (reprocounter*ExpProperties.secPerStep > ExpProperties.repro_time)
|
---|
[422] | 740 | {
|
---|
| 741 | reprocounter = 0;
|
---|
| 742 | reproduce_parents(0);
|
---|
| 743 | reproduce_parents(1);
|
---|
| 744 | }
|
---|
| 745 |
|
---|
| 746 | //check for extinction -----------------------------------------------
|
---|
| 747 | if (Populations[0].size == 0)
|
---|
| 748 | {
|
---|
[486] | 749 | if (ExpProperties.autorestart)
|
---|
[422] | 750 | {
|
---|
| 751 | Simulator.print("no more creatures, restarting...");
|
---|
| 752 | onExpInit();
|
---|
| 753 | }
|
---|
| 754 | else
|
---|
| 755 | {
|
---|
| 756 | Simulator.print("no more creatures, stopped.");
|
---|
| 757 | Simulator.stop();
|
---|
| 758 | }
|
---|
| 759 | }
|
---|
[486] | 760 | if (ExpProperties.maxSteps > 0)
|
---|
[432] | 761 | {
|
---|
[486] | 762 | if (Simulator.stepNumber >= ExpProperties.maxSteps)
|
---|
[432] | 763 | Simulator.stop();
|
---|
| 764 | }
|
---|
[422] | 765 | }
|
---|
| 766 |
|
---|
| 767 | function createStatistics()
|
---|
| 768 | {
|
---|
[487] | 769 | var number = [];
|
---|
| 770 | var e_inc = [];
|
---|
[422] | 771 | var e_nut = 0.0;
|
---|
| 772 |
|
---|
[487] | 773 | for (var s = 0; s < species_genes.size; s++)
|
---|
| 774 | {
|
---|
| 775 | number.add([0,0]);// [haplo][diplo]
|
---|
| 776 | e_inc.add([0,0]);
|
---|
| 777 | }
|
---|
| 778 |
|
---|
[422] | 779 | for (var i = 0; i < Populations[0].size; i++)
|
---|
| 780 | {
|
---|
| 781 | var cr = Populations[0].get(i);
|
---|
[476] | 782 | var gen = cr.data->lifeparams->gen;
|
---|
| 783 | var species = cr.data->lifeparams->species;
|
---|
[430] | 784 |
|
---|
| 785 | number[species][gen] = number[species][gen] + 1;
|
---|
| 786 | e_inc[species][gen] = e_inc[species][gen] + cr.energy;
|
---|
[422] | 787 | }
|
---|
| 788 |
|
---|
| 789 | for (var i = 0; i < Populations[1].size; i++)
|
---|
| 790 | {
|
---|
| 791 | var cr = Populations[1].get(i);
|
---|
| 792 | e_nut += cr.energy;
|
---|
| 793 | }
|
---|
| 794 |
|
---|
[487] | 795 | var log_numbers = [];
|
---|
| 796 | var log_energies = [];
|
---|
[422] | 797 |
|
---|
[487] | 798 | for (var s = 0; s < species_genes.size; s++)
|
---|
| 799 | {
|
---|
| 800 | for (var p = 0; p < 2; p++)
|
---|
| 801 | {
|
---|
| 802 | log_numbers.add(number[s][p]);
|
---|
| 803 | log_energies.add(e_inc[s][p]);
|
---|
| 804 | }
|
---|
| 805 | }
|
---|
| 806 |
|
---|
| 807 | log_numbers.add(Populations[1].size);
|
---|
| 808 | log_energies.add(e_nut);
|
---|
| 809 |
|
---|
[430] | 810 | log(log_numbers, "forams_log.txt");
|
---|
[474] | 811 | log(log_energies, "energies_log.txt");
|
---|
[422] | 812 | }
|
---|
| 813 |
|
---|
[380] | 814 | function log(tolog, fname)
|
---|
| 815 | {
|
---|
[430] | 816 | var f = File.appendDirect(fname, "forams data");
|
---|
[380] | 817 | f.writeString("" + Simulator.stepNumber);
|
---|
[401] | 818 | for (var i = 0; i < tolog.size; i++)
|
---|
[380] | 819 | {
|
---|
| 820 | f.writeString(";" + tolog[i]);
|
---|
| 821 | }
|
---|
| 822 | f.writeString("\n");
|
---|
| 823 | f.close();
|
---|
| 824 | }
|
---|
| 825 |
|
---|
[422] | 826 | // -------------------------------- step end --------------------------------
|
---|
[479] | 827 | //TODO default params values in frams instead of microns/seconds
|
---|
[380] | 828 |
|
---|
[401] | 829 | @include "standard_events.inc"
|
---|
[380] | 830 |
|
---|
[401] | 831 | ~
|
---|
[380] | 832 |
|
---|
[486] | 833 | property:
|
---|
[444] | 834 | id:visualize
|
---|
| 835 | name:Show reticulopodia and nutrients
|
---|
[430] | 836 | type:d 0 1 0
|
---|
| 837 | group:Foraminifera
|
---|
| 838 |
|
---|
[486] | 839 | property:
|
---|
[434] | 840 | id:maxSteps
|
---|
[432] | 841 | name:Stop after the given number of simulation steps
|
---|
[434] | 842 | type:d 0 1000000 0
|
---|
[432] | 843 |
|
---|
[486] | 844 | property:
|
---|
[474] | 845 | id:foramSpeedMmPerMin
|
---|
| 846 | name:Speed of foraminfera in mm/min
|
---|
| 847 | type:f 0.1
|
---|
| 848 | flags: 16
|
---|
| 849 | group:Foraminifera
|
---|
| 850 |
|
---|
[486] | 851 | property:
|
---|
[479] | 852 | id:gametSuccessRate
|
---|
| 853 | name:Ratio of successful gamets
|
---|
| 854 | type:f 0.001
|
---|
| 855 | group:Foraminifera
|
---|
| 856 |
|
---|
[486] | 857 | property:
|
---|
[479] | 858 | id:gametoPeriod
|
---|
| 859 | name:Time of gametogenesis
|
---|
| 860 | type:f 720
|
---|
| 861 | group:Foraminifera
|
---|
| 862 |
|
---|
[486] | 863 | property:
|
---|
[479] | 864 | id:picoCarbonPerMikro
|
---|
| 865 | name:Picograms of carbon in cubed micrometer
|
---|
| 866 | type:f 0.13
|
---|
| 867 | group:Foraminifera
|
---|
| 868 |
|
---|
[486] | 869 | property:
|
---|
[474] | 870 | id:secPerStep
|
---|
| 871 | name:Seconds per simulation step
|
---|
| 872 | type:f 60.0
|
---|
| 873 | flags: 16
|
---|
| 874 | group:Foraminifera
|
---|
| 875 |
|
---|
[486] | 876 | property:
|
---|
[422] | 877 | id:e_repro_cost_haplo
|
---|
[423] | 878 | name:Cost of reproduction
|
---|
[422] | 879 | type:f 0.1 0.9 0.5
|
---|
[421] | 880 | group:Foraminifera
|
---|
[380] | 881 |
|
---|
[486] | 882 | property:
|
---|
[479] | 883 | id:divisionCost
|
---|
| 884 | name:Cost of division in pG
|
---|
| 885 | type:f
|
---|
| 886 | group:Foraminifera
|
---|
| 887 |
|
---|
[486] | 888 | property:
|
---|
[422] | 889 | id:e_repro_cost_diplo
|
---|
[423] | 890 | name:Cost of reproduction
|
---|
[422] | 891 | type:f 0.1 0.9 0.3
|
---|
| 892 | group:Foraminifera
|
---|
[380] | 893 |
|
---|
[486] | 894 | property:
|
---|
[479] | 895 | id:chamber_growth_time
|
---|
| 896 | name:Time of the chamber growth in seconds
|
---|
| 897 | type:f
|
---|
| 898 | group:Foraminifera
|
---|
| 899 |
|
---|
[486] | 900 | property:
|
---|
[479] | 901 | id:chamberCostPerSec
|
---|
| 902 | name:Cost of growning chamber per second
|
---|
| 903 | type:f
|
---|
| 904 | group:Foraminifera
|
---|
| 905 |
|
---|
[486] | 906 | property:
|
---|
[422] | 907 | id:chamber_proculus_haplo
|
---|
[423] | 908 | name:Size of proculus
|
---|
[422] | 909 | type:f
|
---|
[421] | 910 | group:Foraminifera
|
---|
[380] | 911 |
|
---|
[486] | 912 | property:
|
---|
[422] | 913 | id:chamber_proculus_diplo
|
---|
[423] | 914 | name:Size of proculus
|
---|
[422] | 915 | type:f
|
---|
[380] | 916 | group:Foraminifera
|
---|
| 917 |
|
---|
[486] | 918 | property:
|
---|
[422] | 919 | id:chamber_difference_haplo
|
---|
[423] | 920 | name:Difference in size between subsequent chambers
|
---|
[422] | 921 | type:f
|
---|
[380] | 922 | group:Foraminifera
|
---|
| 923 |
|
---|
[486] | 924 | property:
|
---|
[422] | 925 | id:chamber_difference_diplo
|
---|
[423] | 926 | name:Difference in size between subsequent chambers
|
---|
[422] | 927 | type:f
|
---|
[380] | 928 | group:Foraminifera
|
---|
| 929 |
|
---|
[486] | 930 | property:
|
---|
[422] | 931 | id:hunted_prob
|
---|
| 932 | name:Probability of being hunted
|
---|
| 933 | type:f 0 1 0
|
---|
| 934 | group:Forminifera
|
---|
[380] | 935 |
|
---|
[486] | 936 | property:
|
---|
[422] | 937 | id:zone1_range
|
---|
| 938 | name:Zone 1 range
|
---|
| 939 | type:f 0 200
|
---|
| 940 | group:Foraminifera
|
---|
[380] | 941 |
|
---|
[486] | 942 | property:
|
---|
[422] | 943 | id:zone2_range
|
---|
| 944 | name:Zone 2 range
|
---|
| 945 | type:f 0 3000
|
---|
[421] | 946 | group:Foraminifera
|
---|
[380] | 947 |
|
---|
[486] | 948 | property:
|
---|
[422] | 949 | id:colors
|
---|
| 950 | name:Haploid and diploid colors
|
---|
| 951 | type:x
|
---|
[380] | 952 | group:Foraminifera
|
---|
| 953 |
|
---|
[486] | 954 | property:
|
---|
[422] | 955 | id:min_repro_energ_haplo
|
---|
| 956 | name:Min reproduction energy of forams
|
---|
| 957 | type:f
|
---|
[380] | 958 | group:Foraminifera
|
---|
| 959 |
|
---|
[486] | 960 | property:
|
---|
[422] | 961 | id:min_repro_energ_diplo
|
---|
| 962 | name:Min reproduction energy of forams
|
---|
| 963 | type:f
|
---|
| 964 | group:Foraminifera
|
---|
| 965 |
|
---|
[486] | 966 | property:
|
---|
[380] | 967 | id:repro_prob
|
---|
[401] | 968 | name:Probability of reproduction
|
---|
[422] | 969 | type:f 0 1 0.8
|
---|
[421] | 970 | group:Foraminifera
|
---|
[380] | 971 |
|
---|
[486] | 972 | property:
|
---|
[422] | 973 | id:energies0_haplo
|
---|
| 974 | name:Energy of offspring from diploid forams
|
---|
| 975 | type:f
|
---|
| 976 | group:Foraminifera
|
---|
| 977 |
|
---|
[486] | 978 | property:
|
---|
[422] | 979 | id:energies0_diplo
|
---|
| 980 | name:Energy of offspring from diploid forams
|
---|
| 981 | type:f
|
---|
| 982 | group:Foraminifera
|
---|
| 983 |
|
---|
[486] | 984 | property:
|
---|
[475] | 985 | id:e_death_level_haplo
|
---|
| 986 | name:Minimal level of energy to sustain life of haploid
|
---|
[479] | 987 | type:f 0 20 0.2
|
---|
[475] | 988 | group:Foraminifera
|
---|
| 989 |
|
---|
[486] | 990 | property:
|
---|
[475] | 991 | id:e_death_level_diplo
|
---|
| 992 | name:Minimal level of energy to sustain life of diploid
|
---|
[479] | 993 | type:f 0 20 0.2
|
---|
[475] | 994 | group:Foraminifera
|
---|
| 995 |
|
---|
[486] | 996 | property:
|
---|
[422] | 997 | id:energy_hib
|
---|
| 998 | name:Energy used for hibernation during one step
|
---|
| 999 | type:f 0 1 0.001
|
---|
| 1000 | group:Foraminifera
|
---|
| 1001 |
|
---|
[486] | 1002 | property:
|
---|
[422] | 1003 | id:energy_move
|
---|
| 1004 | name:Energy used for movement during one step
|
---|
| 1005 | type:f 0 20 0.001
|
---|
| 1006 | group:Foraminifera
|
---|
| 1007 |
|
---|
[486] | 1008 | property:
|
---|
[422] | 1009 | id:min_vol
|
---|
| 1010 | name:Minimal volume for reproduction
|
---|
| 1011 | type:f 100 900 100
|
---|
| 1012 | group:Foraminifera
|
---|
| 1013 |
|
---|
[486] | 1014 | property:
|
---|
[422] | 1015 | id:max_size
|
---|
| 1016 | name:Maximal size
|
---|
| 1017 | type:d 1 10 5
|
---|
| 1018 | group:Foraminifera
|
---|
| 1019 |
|
---|
[486] | 1020 | property:
|
---|
[422] | 1021 | id:foramPop
|
---|
| 1022 | name:Initial forams population size
|
---|
| 1023 | type:d 1 1000 100
|
---|
| 1024 | group:Foraminifera
|
---|
| 1025 |
|
---|
[486] | 1026 | property:
|
---|
[380] | 1027 | id:crossprob
|
---|
[401] | 1028 | name:Crossover probability
|
---|
| 1029 | type:f 0 1 0
|
---|
[421] | 1030 | group:Foraminifera
|
---|
[380] | 1031 |
|
---|
[486] | 1032 | property:
|
---|
[401] | 1033 | id:mutationprob
|
---|
| 1034 | name:Mutation probability
|
---|
| 1035 | type:f 0 1 0
|
---|
[421] | 1036 | group:Foraminifera
|
---|
[401] | 1037 |
|
---|
[486] | 1038 | property:
|
---|
[380] | 1039 | id:e_meta
|
---|
| 1040 | name:Idle metabolism
|
---|
| 1041 | type:f 0 1
|
---|
| 1042 | group:Energy
|
---|
| 1043 | help:Each stick consumes this amount of energy in one time step
|
---|
| 1044 |
|
---|
[486] | 1045 | property:
|
---|
[380] | 1046 | id:feedrate
|
---|
| 1047 | name:Feeding rate
|
---|
[474] | 1048 | type:f 0 1000000
|
---|
[380] | 1049 | group:Energy
|
---|
| 1050 | help:How fast energy is created in the world
|
---|
| 1051 |
|
---|
[486] | 1052 | property:
|
---|
[481] | 1053 | id:foodPeriodChange
|
---|
| 1054 | name:Set variable feed rate
|
---|
| 1055 | type:f 0
|
---|
| 1056 | group:Energy
|
---|
| 1057 |
|
---|
[486] | 1058 | property:
|
---|
[479] | 1059 | id:ingestion
|
---|
| 1060 | name:Ingestion rate
|
---|
| 1061 | type:f
|
---|
| 1062 | group:Energy
|
---|
| 1063 |
|
---|
[486] | 1064 | property:
|
---|
[422] | 1065 | id:energy_nut
|
---|
[428] | 1066 | name:Nutrient energy
|
---|
[479] | 1067 | type:f 0 100000
|
---|
[380] | 1068 | group:Energy
|
---|
| 1069 |
|
---|
[486] | 1070 | property:
|
---|
[380] | 1071 | id:feedtrans
|
---|
[479] | 1072 | name:Energy transfer per second
|
---|
| 1073 | type:f 0 100000
|
---|
[380] | 1074 | group:Energy
|
---|
[422] | 1075 |
|
---|
[486] | 1076 | property:
|
---|
[479] | 1077 | id:foodperiod
|
---|
| 1078 | name:Time between food occurrences
|
---|
[481] | 1079 | type:f 0 1000000
|
---|
[422] | 1080 | group:Energy
|
---|
| 1081 |
|
---|
[486] | 1082 | property:
|
---|
[479] | 1083 | id:nutrientradius
|
---|
| 1084 | name:Nutrient size
|
---|
| 1085 | type:f 0.1 0.9 0.1
|
---|
[421] | 1086 | group:Energy
|
---|
| 1087 |
|
---|
[486] | 1088 | property:
|
---|
[422] | 1089 | id:stress
|
---|
| 1090 | name:Environmental stress
|
---|
| 1091 | type:d 0 1 1
|
---|
| 1092 | group:World
|
---|
| 1093 |
|
---|
[486] | 1094 | property:
|
---|
[422] | 1095 | id:repro_trigger
|
---|
| 1096 | name:Reproduction trigger
|
---|
| 1097 | type:d 0 1 1
|
---|
| 1098 | group:World
|
---|
| 1099 |
|
---|
[486] | 1100 | property:
|
---|
[422] | 1101 | id:repro_time
|
---|
| 1102 | name:Time before reproduction
|
---|
[474] | 1103 | type:d 0 10000
|
---|
[422] | 1104 |
|
---|
[486] | 1105 | property:
|
---|
[422] | 1106 | id:creath
|
---|
| 1107 | name:Creation height
|
---|
| 1108 | type:f -1 50
|
---|
| 1109 | help:~
|
---|
| 1110 | Vertical position (above the surface) where new Forams are revived.
|
---|
| 1111 | Negative values are only used in the water area:
|
---|
| 1112 | 0 = at the surface
|
---|
| 1113 | -0.5 = half depth
|
---|
| 1114 | -1 = just above the bottom~
|
---|
| 1115 |
|
---|
[421] | 1116 | state:
|
---|
| 1117 | id:nutrient
|
---|
[428] | 1118 | name:Nutrient locations
|
---|
[421] | 1119 | help:vector of vectors [x,y,energy]
|
---|
| 1120 | type:x
|
---|
| 1121 | flags:32
|
---|
| 1122 |
|
---|
[486] | 1123 | property:
|
---|
[380] | 1124 | id:autorestart
|
---|
| 1125 | name:Restart after extinction
|
---|
| 1126 | help:Restart automatically this experiment after the last creature has died?
|
---|
| 1127 | type:d 0 1
|
---|
| 1128 |
|
---|
| 1129 | state:
|
---|
| 1130 | id:notes
|
---|
| 1131 | name:Notes
|
---|
| 1132 | type:s 1
|
---|
| 1133 | help:~
|
---|
| 1134 | You can write anything here
|
---|
| 1135 | (it will be saved to the experiment file)~
|
---|
| 1136 |
|
---|
| 1137 | state:
|
---|
| 1138 | id:totaltestedcr
|
---|
[421] | 1139 | name:Evaluated Forams
|
---|
| 1140 | help:Total number of the Forams evaluated in the experiment
|
---|
[380] | 1141 | type:d
|
---|
| 1142 | flags:16
|
---|
| 1143 |
|
---|
[486] | 1144 | property:
|
---|
[421] | 1145 | id:logging
|
---|
| 1146 | name:Log statistics to file
|
---|
| 1147 | type:d 0 1 0
|
---|