Changeset 488 for experiments/frams


Ignore:
Timestamp:
03/27/16 12:31:03 (9 years ago)
Author:
oriona
Message:

Reproduction treshold dependent on gene.

Location:
experiments/frams/foraminifera/data/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • experiments/frams/foraminifera/data/scripts/foraminifera.expdef

    r487 r488  
    148148        //nutrients
    149149        changePeriod = 0;
    150         phase = "high";
     150        phase = "low";
    151151        ExpProperties.foodperiod = 3600;
    152152        ExpProperties.foodPeriodChange = 0;
     
    158158        ExpState.totaltestedcr = 0;
    159159        ExpState.nutrient = "";
     160       
     161        addSpecies({"min_repro_energies" : [4,6]});
     162        addSpecies({"min_repro_energies" : [4,8]});
    160163}
    161164
     
    233236        }       
    234237        //add new foram with random energy bewtween starting energy and reproduction treshold
    235         addForam(species, iter, Math.rndUni(0,species_genes[species]->min_repro_energies[ploid]),ploid);
     238        addForam(species, iter, int(Math.rndUni(0,species_genes[species]->min_repro_energies[ploid])),ploid);
    236239}
    237240
  • experiments/frams/foraminifera/data/scripts/foraminifera.inc

    r487 r488  
    243243function foramReproduce(cr)
    244244{
    245         var properEnergy = cr.energy >= energyFromVolume(max_chamber_volume[0][getGene(cr, "min_repro_energies",0)[cr.data->lifeparams->gen]],0);
     245        var properEnergy = cr.energy >= energyFromVolume(max_chamber_volume[cr.data->lifeparams->gen][getGene(cr, "min_repro_energies",0)[cr.data->lifeparams->gen]],0);
    246246        var reproduced = 0;     
    247247
Note: See TracChangeset for help on using the changeset viewer.