Changeset 475 for experiments/frams
- Timestamp:
- 03/13/16 01:20:30 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
experiments/frams/foraminifera/data/scripts/foraminifera.expdef
r474 r475 84 84 //time 85 85 ExpParams.secPerStep = 60; 86 ExpParams.foramSpeedMmPerMin = 0. 1;86 ExpParams.foramSpeedMmPerMin = 0.05; 87 87 movePerStep = getMovePerStep(); 88 88 … … 100 100 //morphology 101 101 dir_change = 30000; 102 ExpParams.zone1_range = micronsToFrams( 3000);103 ExpParams.zone2_range = micronsToFrams( 6000);102 ExpParams.zone1_range = micronsToFrams(1000); 103 ExpParams.zone2_range = micronsToFrams(3000); 104 104 init_chambers(); 105 105 ExpParams.chamber_proculus_haplo = micronsToFrams(50); … … 112 112 for (var i = 0; i < chambers[0].size; i++) 113 113 { 114 max_chamber_energ[j].add((( Math.pow(getProperty(j, "chamber_proculus"),3) + Math.pow(getProperty(j, "chamber_proculus") + (i) * getProperty(j, "chamber_difference"),3))*(i+1))/2);114 max_chamber_energ[j].add(((energyFromVolume(getProperty(j, "chamber_proculus")) + energyFromVolume(getProperty(j, "chamber_proculus") + (i) * getProperty(j, "chamber_difference")))*(i+1))/2); 115 115 } 116 116 } … … 132 132 //nutrients 133 133 ExpParams.nutrientsize = micronsToFrams(10); 134 ExpParams.energy_nut = 100 * Math.pow(ExpParams.nutrientsize, 3);134 ExpParams.energy_nut = 100 * energyFromVolume(ExpParams.nutrientsize); 135 135 ExpParams.nutrientPop = 1; 136 136 ExpParams.feedrate = 100; … … 141 141 142 142 @include "standard_placement.inc" 143 144 function energyFromVolume(radius) 145 { 146 return 4.0/3.0*Math.pi*Math.pow(radius,3); 147 } 143 148 144 149 function getMovePerStep() … … 258 263 function setForamMeta(cr, gen) 259 264 { 260 cr.idleen = (ExpParams.e_meta * max_chamber_energ[gen][Math.min(lastChamberNum(cr), max_chamber_energ[gen].size-1)])*ExpParams.secPerStep; 265 //cr.idleen = (ExpParams.e_meta * max_chamber_energ[gen][Math.min(lastChamberNum(cr), max_chamber_energ[gen].size-1)])*ExpParams.secPerStep; 266 cr.idleen = (ExpParams.e_meta * cr.energy)*ExpParams.secPerStep; 261 267 } 262 268 … … 384 390 if (cr.user2["hibernated"] == 0) 385 391 { 386 cr.energy_m += (ExpParams.energy_move * max_chamber_energ[cr.user2["gen"]][Math.min(lastChamberNum(cr), (max_chamber_energ[cr.user2["gen"]].size)-1)])*ExpParams.secPerStep; 392 //cr.energy_m += (ExpParams.energy_move * max_chamber_energ[cr.user2["gen"]][Math.min(lastChamberNum(cr), (max_chamber_energ[cr.user2["gen"]].size)-1)])*ExpParams.secPerStep; 393 cr.energy_m += (ExpParams.energy_move * cr.energy)*ExpParams.secPerStep; 387 394 } 388 395 } … … 457 464 else 458 465 { 459 cr.idleen = (ExpParams.energy_hib * max_chamber_energ[cr.user2["gen"]][Math.min(lastChamberNum(cr), (max_chamber_energ[cr.user2["gen"]].size)-1)])*ExpParams.secPerStep; //hibernate 466 //cr.idleen = (ExpParams.energy_hib * max_chamber_energ[cr.user2["gen"]][Math.min(lastChamberNum(cr), (max_chamber_energ[cr.user2["gen"]].size)-1)])*ExpParams.secPerStep; //hibernate 467 cr.idleen = (ExpParams.energy_hib * cr.energy)*ExpParams.secPerStep; //hibernate 460 468 } 461 469 cr.user2["hibernated"] = 1 - cr.user2["hibernated"]; … … 496 504 function deathConditions(cr) 497 505 { 498 if ((cr.energy <= ExpParams.e_death_level) || (Math.rnd01 < ExpParams.hunted_prob))506 if ((cr.energy <= getProperty(cr.user2["species"],"e_death_level")) || (Math.rnd01 < ExpParams.hunted_prob)) 499 507 return 1; 500 508 else … … 781 789 782 790 prop: 791 id:e_death_level_haplo 792 name:Minimal level of energy to sustain life of haploid 793 type:f 0 20 4 794 group:Foraminifera 795 796 prop: 797 id:e_death_level_diplo 798 name:Minimal level of energy to sustain life of diploid 799 type:f 0 20 0.25 800 group:Foraminifera 801 802 prop: 783 803 id:energy_hib 784 804 name:Energy used for hibernation during one step … … 820 840 name:Mutation probability 821 841 type:f 0 1 0 822 group:Foraminifera823 824 prop:825 id:e_death_level826 name:Minimal level of energy to sustain life827 type:f 0 20 0828 842 group:Foraminifera 829 843
Note: See TracChangeset
for help on using the changeset viewer.