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