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