Changeset 405 for experiments/frams
- Timestamp:
- 07/01/15 02:20:26 (9 years ago)
- Location:
- experiments/frams/foraminifera/data/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
experiments/frams/foraminifera/data/scripts/forams_benthic.expdef
r404 r405 70 70 71 71 //radius of the chamber 72 73 //inital genotypes 74 ExpParams.genh = "//0\np:sh=1,sx=" + ExpParams.rads[0] + ",sy=" + ExpParams.rads[0] + ",sz=" + ExpParams.rads[0] + ", rz=3.14159265358979"; 72 ExpParams.rads = [1.2, 0.6]; 73 //inital genotypes 74 ExpParams.genh = "//0\np:sh=1,sx=" + ExpParams.rads[0] + ",sy=" + ExpParams.rads[0] + ",sz=" + ExpParams.rads[0] + ", rz=3.14159265358979"; 75 75 ExpParams.gend = "//0\np:sh=1,sx=" + ExpParams.rads[1] + ",sy=" + ExpParams.rads[1] + ",sz=" + ExpParams.rads[1] + ", rz=3.14159265358979"; 76 76 ExpParams.gend += "\nn:p=0,d=\"S\""; 77 77 ExpParams.e_meta = 0.1; 78 78 ExpParams.feedrate = 0.5; … … 227 227 function onCreaturesStep(cr) 228 228 { 229 230 cr.moveAbs(cr.pos_x, cr.pos_y, 0); //adjustment in z axis 229 //TODO moving inside sediment? 230 cr.moveAbs(cr.pos_x, cr.pos_y, 0); //adjustment in z axis 231 231 var p = cr.getMechPart(0); 232 232 var n = cr.signals.receiveSet("food", ExpParams.food_range); … … 269 269 if (cr.energy > 100) 270 270 { 271 //TODO energy costs dependant on size271 //TODO energy costs dependent on size 272 272 // cr.energy_m = cr.user2["Va"]/cr.user2["vinit"]; 273 273 } … … 277 277 //TODO what is max age value? should there be one? 278 278 Populations[0].kill(cr); 279 279 return; 280 280 } 281 281 … … 283 283 if (cr.lifespan == cr.user2["growth_step"]) 284 284 { 285 286 285 //TODO how size is related to the energy? 286 cr.user2["rsize"] = ExpParams.rads[cr.user2["gen"]] * Math.min(Math.max(float(cr.user2["Va"] / cr.user2["vinit"]) * 0.5, 1.0), 2.5); 287 287 var geno = "//0\np:sh=1,sx=" + cr.user2["rsize"] + ",sy=" + cr.user2["rsize"] + ",sz=" + cr.user2["rsize"] + ", rz=3.14159265358979"; 288 288 if (cr.user2["gen"] == 1) … … 291 291 //TODO maybe it would be nice if they rotated so the "S" would show where they are going (direction/intention) 292 292 } 293 293 var cr2 = Populations[0].add(geno); 294 294 cr2.energy = cr.energy; 295 295 setGenotype(cr2, cr.user1, cr.user2); … … 347 347 { 348 348 cr.user1 = [ {"vamin" : new_user1[0]["vamin"], "amin": new_user1[0]["amin"] }, {"vamin" : new_user1[1]["vamin"], "amin": new_user1[1]["amin"] }]; 349 } 349 } 350 350 351 351 } … … 426 426 prop: 427 427 id:rads 428 name: haploid and diploid radius428 name:Haploid and diploid radius 429 429 type:x 430 430 … … 455 455 prop: 456 456 id:repro_thr 457 name: amount of energy initialcreatures need to gather to reproduce457 name:Energy creatures need to gather to reproduce 458 458 type:d 1 1000 1 459 459 … … 583 583 prop: 584 584 id:foodPop 585 name: food size585 name:Food size 586 586 type:d 1 1000 10 587 587 … … 592 592 type:x 593 593 flags:32 594 -
experiments/frams/foraminifera/data/scripts/forams_repro.inc
r404 r405 108 108 haploids += 1; 109 109 e_inc_h += cr.energy; 110 size_h += ExpParams.rads[0]; //TODO change of size depend ant on gene110 size_h += ExpParams.rads[0]; //TODO change of size dependent on gene 111 111 vmin_h += cr.user1["vamin"]; 112 112 } … … 115 115 diploids += 1; 116 116 e_inc_d += cr.energy; 117 size_d += ExpParams.rads[1]; //TODO change of size depend ant on gene117 size_d += ExpParams.rads[1]; //TODO change of size dependent on gene 118 118 vmin_d += cr.user1[0]["vamin"]; 119 119 }
Note: See TracChangeset
for help on using the changeset viewer.