Changeset 510 for experiments/frams/foraminifera/data/scripts
- Timestamp:
- 05/19/16 23:30:23 (9 years ago)
- Location:
- experiments/frams/foraminifera/data/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
experiments/frams/foraminifera/data/scripts/foraminifera.expdef
r506 r510 548 548 { 549 549 cr1.localDrive = XYZ.new(0,0,0); 550 var e = ExpProperties.feedtrans*cr1.energy; //TODO efficiency dependent on age 551 e = Math.min(cr2.energy, e*ExpProperties.secPerStep); 550 var e = ExpProperties.feedtrans*cr1.energy*ExpProperties.secPerStep; //TODO efficiency dependent on age 552 551 //Simulator.print("transferring "+e +"("+e*ExpProperties.ingestion+")"+" to "+cr1.name +" ("+ cr1.energy+") " +" from "+cr2.uid+" ("+cr2.energy+") "+ e/ExpProperties.secPerStep+ " per sec"); 553 cr2.energy -= (e + 0.0000001);554 cr1.energy += e*ExpProperties.ingestion;552 var transferred = cr2.transferEnergyTo(cr1, e); 553 cr1.energy -= transferred*(1-ExpProperties.ingestion); 555 554 if (cr1.data->lifeparams->hibernated == 1) 556 555 { -
experiments/frams/foraminifera/data/scripts/foraminifera.inc
r496 r510 126 126 function reproduce_diploid(parent) 127 127 { 128 var energy0 =getEnergy0( getGene(parent,"energies0", 0)[0]); 129 var number = ((1 - (getProperty(parent.data->lifeparams->gen, "e_repro_cost"))) * parent.energy) / energy0; 128 var offspring = gametsDivision(parent.energy,getEnergy0(getGene(parent,"energies0", 0)[0])); 129 var energy0 = offspring->energy; 130 var number = offspring->number; 130 131 131 132 if (ExpProperties.logging == 1)
Note: See TracChangeset
for help on using the changeset viewer.