Changeset 590
- Timestamp:
- 08/22/16 01:26:47 (8 years ago)
- Location:
- experiments/frams/foraminifera/data/scripts
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
experiments/frams/foraminifera/data/scripts/foraminifera.expdef
r588 r590 27 27 global max_chamber_volume; 28 28 global movePerStep; 29 global nutrientenergywaiting;30 29 global reprocounter; 31 30 global changePeriod; … … 37 36 global chamber_vis_denominator; 38 37 global curRadius; 38 global nutrient_num_counter; 39 global wrldsizSquareMeters; 39 40 40 41 @include "foraminifera.inc" … … 85 86 World.wrldwat = 200; 86 87 World.wrldsiz = micronsToFrams(100000); 88 wrldsizSquareMeters = Math.pow(framsToMicrons(World.wrldsiz)*0.000001,2); 87 89 World.wrldbnd = 1; 88 90 … … 166 168 167 169 reprocounter = 0; 168 nutrient energywaiting= 0;170 nutrient_num_counter = 0; 169 171 changePeriod = 0; 170 172 phase = "low"; … … 801 803 } 802 804 805 function getNumberCounter(counter, increase, unit) 806 { 807 var result = 0; 808 counter += increase; 809 result = int(counter/unit); 810 counter -= result*unit; 811 return {"counter" : counter, "number" : result}; 812 } 813 803 814 function nutrientGrowth() 804 815 { 805 if (ExpProperties.food PeriodChange > 0)816 if (ExpProperties.foodfluxChange > 0) 806 817 { 807 818 changePeriod += 1; 808 819 if (phase=="low" && changePeriod >= secToSimSteps(23328000)) //9 months 809 820 { 810 ExpProperties.food period = ExpProperties.foodperiod/ExpProperties.foodPeriodChange;821 ExpProperties.foodflux = ExpProperties.foodflux/ExpProperties.foodfluxChange; 811 822 phase = "high"; 812 823 changePeriod = 0; … … 815 826 else if (phase == "high" && changePeriod >= secToSimSteps(7776000)) //3 months 816 827 { 817 ExpProperties.food period = ExpProperties.foodperiod*ExpProperties.foodPeriodChange;828 ExpProperties.foodflux = ExpProperties.foodflux*ExpProperties.foodfluxChange; 818 829 phase = "low"; 819 830 changePeriod = 0; 820 831 } 821 832 } 822 nutrientenergywaiting = nutrientenergywaiting + 1; 823 if (nutrientenergywaiting >= secToSimSteps(ExpProperties.foodperiod)) 824 { 825 for (var i = 0; i < ExpProperties.nutrient_pop; i++) 826 { 827 addNutrient(); 828 } 829 830 nutrientenergywaiting = 0.0; 831 Simulator.checkpoint(); 832 833 if (ExpProperties.logging == 1) 834 { 835 log([ExpProperties.nutrient_pop],ExpProperties.logPref+"nutrients_log.txt"); 836 } 833 834 var nutrientNum = getNumberCounter(nutrient_num_counter, ExpProperties.foodflux*wrldsizSquareMeters*ExpProperties.secPerStep,ExpProperties.energy_nut*0.000000000001); 835 836 nutrient_num_counter = nutrientNum["counter"]; 837 838 for (var i = 0; i < nutrientNum["number"]; i++) 839 { 840 addNutrient(); 841 } 842 843 if (ExpProperties.logging == 1 && nutrientNum["number"] > 0) 844 { 845 log([nutrientNum["number"]],ExpProperties.logPref+"nutrients_log.txt"); 837 846 } 838 847 … … 1216 1225 1217 1226 property: 1218 id:food period1219 name: Time between food occurrences1220 type:f 0 1 000000 144001221 group:Energy 1222 1223 property: 1224 id:food PeriodChange1227 id:foodflux 1228 name:POM flux in grams per second per square meter 1229 type:f 0 1 0.0000000075631 1230 group:Energy 1231 1232 property: 1233 id:foodfluxChange 1225 1234 name:Set variable feed rate 1226 1235 type:f 0 -1 0 -
experiments/frams/foraminifera/data/scripts/foraminifera.inc
r581 r590 241 241 242 242 //if creature has proper energy 243 if ( properEnergy && cr.signals.size == 0)243 if ( properEnergy ) 244 244 { 245 245 //reproduce with probability repro_prob -
experiments/frams/foraminifera/data/scripts/foraminifera.show
r569 r590 19 19 { 20 20 var nutrient_multiple = 200; 21 Params = { "food period" : [28800,14400,7200], "feedtrans" : [0.0005,0.001,0.002],"energy_nut" :[nutrient_multiple*144.54,nutrient_multiple*544.54,nutrient_multiple*944.54], "stress" : [0,1], "visualize" : [0,1]};21 Params = { "foodflux" : [0.0000000037815,0.0000000075631,0.000000015126], "feedtrans" : [0.0005,0.001,0.002],"energy_nut" :[nutrient_multiple*144.54,nutrient_multiple*544.54,nutrient_multiple*944.54], "stress" : [0,1], "visualize" : [0,1]}; 22 22 ShowProperties.visualize=1; 23 23 ExpProperties.secPerStep=50; … … 63 63 } 64 64 65 function ShowProperties_food period_set()65 function ShowProperties_foodflux_set() 66 66 { 67 setShowParam("food period");67 setShowParam("foodflux"); 68 68 } 69 69 … … 91 91 92 92 property: 93 id:food period94 name:F eeding period93 id:foodflux 94 name:Food flux 95 95 type:d 0 2 1 ~Low~Medium~High 96 96 … … 98 98 id:feedtrans 99 99 name:Energy transfer 100 type:d 0 2 1 ~0.0 5~0.125~0.25100 type:d 0 2 1 ~0.0001~0.001~0.01 101 101 102 102 property: 103 103 id:energy_nut 104 104 name:Nutrient energy 105 type:d 0 2 1 ~ 0.5~1.5~3105 type:d 0 2 1 ~28908~108908~188908 106 106 107 107 property:
Note: See TracChangeset
for help on using the changeset viewer.