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