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