Changeset 552


Ignore:
Timestamp:
07/30/16 15:18:59 (5 years ago)
Author:
oriona
Message:

Dir_changed_sec changed from global to ExpProperty?, new divisionCost and energy_nut, direction change counter added in creature lifeparams, lifespan log added.

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

Legend:

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

    r525 r552  
    2727global retColors;
    2828global curColor;
    29 global dir_change_sec;
    3029global max_chamber_volume;
    3130global movePerStep;
     
    9190
    9291        //time
    93         ExpProperties.secPerStep = 480;
     92        ExpProperties.secPerStep = 300;
    9493        ExpProperties.foramSpeedMmPerMin = 0.05;
    9594        movePerStep = getMovePerStep();
     
    106105        ExpProperties.repro_time = 720;
    107106        ExpProperties.gametoPeriod = 21600;
    108         ExpProperties.divisionCost = 15.6;
     107        ExpProperties.divisionCost = 20;
    109108        reprocounter = 0;
    110109
     
    115114        curColor = retColors[0];
    116115        //morphology
    117         dir_change_sec = 30000;
     116        ExpProperties.dir_change_sec = 30000;
    118117        ExpProperties.zone1_range = micronsToFrams(1000);
    119118        ExpProperties.zone2_range = micronsToFrams(3000);
     
    155154        phase = "low";
    156155        nutrientSqrCm = 10;
    157         ExpProperties.foodperiod = 19200;
     156        ExpProperties.foodperiod = 14400;
    158157        ExpProperties.foodPeriodChange = 0;
    159158        ExpProperties.nutrientradius = micronsToFrams(10);
    160         ExpProperties.energy_nut = 100 * energyFromVolume(ExpProperties.nutrientradius,1);
     159        ExpProperties.energy_nut = 200 * energyFromVolume(ExpProperties.nutrientradius,1);
    161160        ExpProperties.nutrient_pop = Math.pow(framsToMicrons(World.wrldsiz)*0.0001,2)/nutrientSqrCm;
    162161        ExpProperties.ingestion = 0.25;
     
    516515        }
    517516        //random move
    518         else if (Simulator.stepNumber%int(dir_change_sec/ExpProperties.secPerStep) == 0)
     517        else if (cr.data->lifeparams->dir_counter >= int(ExpProperties.dir_change_sec/ExpProperties.secPerStep))
    519518        {
    520519                cr.data->lifeparams->dir = randomDir();
     520                cr.data->lifeparams->dir_counter = 0;
    521521                cr.localDrive = cr.data->lifeparams->dir;
    522522                moveEnergyDec(cr);
     
    632632                        {
    633633                                log(createLogVector(cr, cr.data->lifeparams->max_energy_level),ExpProperties.logPref+"fossil_log.txt");
     634                                log(createLogVector(cr, cr.lifespan),ExpProperties.logPref+"lifespan_log.txt");
    634635                        }                       
    635636                        Populations[0].kill(cr);
    636637                        return;
    637638                }
     639
     640                //update direction change counter
     641                cr.data->lifeparams->dir_counter += 1;
    638642
    639643                foramMove(cr);
     
    882886id:maxSteps
    883887name:Stop after the given number of simulation steps
    884 type:d 0 1000000 0
     888type:d 0 10000000 0
    885889
    886890property:
     
    900904name:Ratio of successful gamets
    901905type:f 0.001
     906group:Foraminifera
     907
     908property:
     909id:dir_change_sec
     910name:Number of seconds before direction change
     911type:d 30000
    902912group:Foraminifera
    903913
  • experiments/frams/foraminifera/data/scripts/foraminifera.inc

    r510 r552  
    55{
    66        colors = ["1.0,1.0,0.0","1.0,0.5,0.0"];
    7         retColors = ["1.0,1.0,1.0", "1.0,0.0,0.0"];
     7        retColors = ["1.0,1.0,1.0", "1.0,1.0,0.0"];
    88        chambers = [ ["p:sh=1, sx=0.2, sy=0.2, sz=0.2, rz=3.14159265358979,",
    99"p:0.18421219587326, 0.13, sh=1, sx=0.21, sy=0.21, sz=0.21,",
     
    5555        {
    5656                mode->cr.data->genes = String.deserialize(String.serialize(mode->genes));
    57                 mode->cr.data->lifeparams = {"max_energy_level" : mode->energy0, "gen" : 0,  "hibernated" : 0, "species" : mode->species, "reproduce" : 0, "dir" : randomDir(), "chamber_growth" : -1, "division_time" : -1};
     57                mode->cr.data->lifeparams = {"max_energy_level" : mode->energy0, "gen" : 0,  "hibernated" : 0, "species" : mode->species, "reproduce" : 0, "dir" : randomDir(), "dir_counter" : Math.random(ExpProperties.dir_change_sec), "chamber_growth" : -1, "division_time" : -1};
    5858        }
    5959        else if (mode->opt  == 1) //child
    6060        {
    61                 mode->cr.data->lifeparams = {"max_energy_level" : mode->energy0, "gen" : 1 - mode->parent_lifeparams->gen,  "hibernated" : 0, "species" : mode->parent_lifeparams->species, "reproduce" : 0, "dir" : randomDir(), "chamber_growth" : -1, "division_time" : -1};
     61                mode->cr.data->lifeparams = {"max_energy_level" : mode->energy0, "gen" : 1 - mode->parent_lifeparams->gen,  "hibernated" : 0, "species" : mode->parent_lifeparams->species, "reproduce" : 0, "dir" : randomDir(), "dir_counter" : Math.random(ExpProperties.dir_change_sec), "chamber_growth" : -1, "division_time" : -1};
    6262                mode->cr.data->genes = String.deserialize(String.serialize(mode->parent_genes));
    6363        }
     
    113113                                log(createLogVector(parent2, parent2.energy),ExpProperties.logPref+"repro_energies_log.txt");
    114114                                log(createLogVector(parent, number),ExpProperties.logPref+"repro_num_log.txt");
     115                                log(createLogVector(parent, parent.lifespan),ExpProperties.logPref+"lifespan_log.txt");
     116                                log(createLogVector(parent2, parent2.lifespan),ExpProperties.logPref+"lifespan_log.txt");
    115117                }       
    116118        }
     
    134136                        log(createLogVector(parent, parent.energy),ExpProperties.logPref+"repro_energies_log.txt");
    135137                        log(createLogVector(parent, number),ExpProperties.logPref+"repro_num_log.txt");
     138                        log(createLogVector(parent, parent.lifespan),ExpProperties.logPref+"lifespan_log.txt");
    136139                }       
    137140
Note: See TracChangeset for help on using the changeset viewer.