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