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