Changeset 432 for experiments/frams
- Timestamp:
- 09/08/15 23:37:28 (9 years ago)
- Location:
- experiments/frams/foraminifera/data/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
experiments/frams/foraminifera/data/scripts/foraminifera.expdef
r431 r432 13 13 max_energy_level - maximum energy level reached so far 14 14 gen - generation: 0 haploid, 1 diploid 15 species - species: 0 hibernating 1 nothibernating16 hibernated - 0/1 foram is n't/ishibernated15 species - species: 0 not hibernating 1 hibernating 16 hibernated - 0/1 foram is/isn't hibernated 17 17 reproduce - 0/1 foram isn't/is ready for reproduction 18 18 ~ … … 81 81 //world 82 82 SignalView.mode = 1; 83 ExpParams.world_size = scale(40000);84 83 World.wrldwat = 200; 85 World.wrldsiz = ExpParams.world_size;84 World.wrldsiz = scale(40000); 86 85 World.wrldbnd = 1; 87 86 ExpParams.stress = 1; … … 138 137 ExpState.totaltestedcr = 0; 139 138 ExpState.nutrient = ""; 139 140 ExpParams.iter = 0; 140 141 } 141 142 … … 236 237 ExpState.nutrient = tmpvec; 237 238 File.writeObject(sim_params.*); 238 ExpState.nutrient = null; //vectors are only created for saving and then discarded setForam239 ExpState.nutrient = null; //vectors are only created for saving and then discarded 239 240 240 241 for (var cr in Populations[0]) … … 387 388 else if (cr.lifespan%dir_change == 0) 388 389 { 389 var dir = (Math.rndUni(-ExpParams.zone2_range, ExpParams.zone2_range), Math.rndUni(-ExpParams.zone2_range, ExpParams.zone2_range), 0); //(0.1 * Math.rnd01, 0.1 * Math.rnd01, 0);390 var dir = (Math.rndUni(-ExpParams.zone2_range, ExpParams.zone2_range), Math.rndUni(-ExpParams.zone2_range, ExpParams.zone2_range), 0); 390 391 dir.normalize(); 391 392 dir.scale(-0.08); … … 485 486 function onNutrientsStep(cr) 486 487 { 487 cr.moveAbs(cr.pos_x % ExpParams.world_size, cr.pos_y % ExpParams.world_size, -ExpParams.zone1_range+0.5);488 cr.moveAbs(cr.pos_x % World.wrldsiz, cr.pos_y % World.wrldsiz, -ExpParams.zone1_range+0.5); 488 489 } 489 490 … … 509 510 { 510 511 for (var i = 0; i < ExpParams.nutrientPop; i++) 511 { 512 { 512 513 addNutrient(); 513 514 } … … 524 525 function onStep() 525 526 { 527 528 nutrientGrowth(); 526 529 if (ExpParams.logging == 1) 527 530 { 528 531 createStatistics(); 529 532 } 530 531 nutrientGrowth();532 533 533 534 //reproduction -------------------------------------------- … … 554 555 } 555 556 } 556 557 if (ExpParams.stopping == 1) 558 { 559 if (Simulator.stepNumber == 150000) 560 Simulator.stop(); 561 } 557 562 } 558 563 … … 579 584 } 580 585 581 var log_numbers = [number[ 0][0], number[0][1], number[1][0], number[1][1], Populations[1].size];582 var log_energies = [e_inc[ 0][0], e_inc[0][1], e_inc[1][0], e_inc[1][1], e_nut];586 var log_numbers = [number[1][0], number[1][1], number[0][0], number[0][1], Populations[1].size]; 587 var log_energies = [e_inc[1][0], e_inc[1][1], e_inc[0][0], e_inc[0][1], e_nut]; 583 588 584 589 log(log_numbers, "forams_log.txt"); 585 log(log_energies, "energies_log.txt");590 log(log_energies, "energies_log.txt"); 586 591 } 587 592 … … 609 614 type:d 0 1 0 610 615 group:Foraminifera 616 617 prop: 618 id:iter 619 name:Iteration number 620 type:d 621 622 prop: 623 id:stopping 624 name:Stop after the given number of simulation steps 625 type:d 0 1 0 611 626 612 627 prop: … … 785 800 group:Energy 786 801 type:d 1 1000 10 787 788 prop:789 id:world_size790 name:World size791 type:d 10 10000 20792 group:World793 802 794 803 prop: -
experiments/frams/foraminifera/data/scripts/foraminifera.inc
r430 r432 5 5 { 6 6 colors = ["1.0,1.0,0.0","1.0,0.5,0.0"]; 7 chambers = [ ["0.0,0.0,0.0,", //longitudal 8 "0.98089325428009, 0.00591040402650833, 0.00389722990803421,", 9 "1.90962779521942, -0.256769120693207, -0.16194811463356,", 10 "2.63965249061584, -0.727959632873535, -0.609036147594452,", 11 "3.17575979232788, -1.34843015670776, -1.14828503131866,", 12 "3.55273032188416, -2.22369408607483, -1.3917418718338,", 13 "3.64916682243347, -3.11888360977173, -1.01666414737701,", 14 "3.50461649894714, -3.84039807319641, -0.377427101135254,", 15 "3.15921688079834, -4.50001525878906, 0.261153399944305,", 16 "2.51528453826904, -5.16421365737915, 0.59241509437561,"], 17 ["0.0,0.0,0.0,", //coiled 7 chambers = [ ["0.0,0.0,0.0,", //coiled 18 8 "1.08020961284637, -0.0597195439040661, -0.0393781512975693,", 19 9 "1.08020961284637, -0.0597195439040661, -0.0393781512975693,", … … 25 15 "1.0958571434021, 0.316927701234818, -1.813929438591,", 26 16 "0.903768002986908, 1.11856341362, -2.53161096572876,", 27 "0.21014116704464, 0.295340299606323, -2.45328187942505,"] ]; 17 "0.21014116704464, 0.295340299606323, -2.45328187942505,"], 18 ["0.0,0.0,0.0,", //longitudal 19 "0.98089325428009, 0.00591040402650833, 0.00389722990803421,", 20 "1.90962779521942, -0.256769120693207, -0.16194811463356,", 21 "2.63965249061584, -0.727959632873535, -0.609036147594452,", 22 "3.17575979232788, -1.34843015670776, -1.14828503131866,", 23 "3.55273032188416, -2.22369408607483, -1.3917418718338,", 24 "3.64916682243347, -3.11888360977173, -1.01666414737701,", 25 "3.50461649894714, -3.84039807319641, -0.377427101135254,", 26 "3.15921688079834, -4.50001525878906, 0.261153399944305,", 27 "2.51528453826904, -5.16421365737915, 0.59241509437561,"]]; 28 28 } 29 29 … … 37 37 for (var i = 0; i < chamber_num; i++) 38 38 { 39 rad = getProperty(gen, "chamber_proculus") + getProperty(gen, "chamber_difference") * (i + 1); 39 rad = getProperty(gen, "chamber_proculus") + getProperty(gen, "chamber_difference") * (i + 1); 40 40 geno += "\n" + "p:" + chambers[species][i+1] + "sh=1,sx=" + rad + ",sy=" + rad + ",sz=" + rad + ",vr=" + colors[gen]; 41 41 } … … 46 46 } 47 47 48 if (species == 1) geno += "\nn:p=0,d=\"S\"";48 if (species == 0) geno += "\nn:p=0,d=\"S\""; 49 49 50 50 return geno; … … 55 55 if (mode["opt"] == 0) //initial 56 56 { 57 mode["cr"].user1 = {"min_repro_energies" : [max_chamber_energ[0][getProperty(0, "min_repro_energ")], max_chamber_energ[1][getProperty(1, "min_repro_energ")]], "hibernation" : 1 -mode["species"]};57 mode["cr"].user1 = {"min_repro_energies" : [max_chamber_energ[0][getProperty(0, "min_repro_energ")], max_chamber_energ[1][getProperty(1, "min_repro_energ")]], "hibernation" : mode["species"]}; 58 58 mode["cr"].user2 = {"max_energy_level" : getProperty(0,"energies0"), "gen" : 0, "hibernated" : 0, "species" : mode["species"], "reproduce" : 0}; 59 59 }
Note: See TracChangeset
for help on using the changeset viewer.