[Avida-SVN] r2256 - branches/energy/source/main
beckma24 at myxo.css.msu.edu
beckma24 at myxo.css.msu.edu
Tue Jan 8 11:20:13 PST 2008
Author: beckma24
Date: 2008-01-08 14:20:13 -0500 (Tue, 08 Jan 2008)
New Revision: 2256
Modified:
branches/energy/source/main/cAvidaConfig.h
branches/energy/source/main/cPopulation.cc
Log:
added config option FRAC_ENERGY_PASSED_TO_CHILD_DEME
Modified: branches/energy/source/main/cAvidaConfig.h
===================================================================
--- branches/energy/source/main/cAvidaConfig.h 2008-01-07 15:37:19 UTC (rev 2255)
+++ branches/energy/source/main/cAvidaConfig.h 2008-01-08 19:20:13 UTC (rev 2256)
@@ -444,11 +444,11 @@
CONFIG_ADD_VAR(ENERGY_GIVEN_AT_BIRTH, int, 0, "Energy given to offspring upon birth.");
CONFIG_ADD_VAR(FRAC_PARENT_ENERGY_GIVEN_AT_BIRTH, double, 0.5, "Fraction of perent's energy given to offspring.");
CONFIG_ADD_VAR(FRAC_ENERGY_DECAY_AT_BIRTH, double, 0.0, "Fraction of energy lost due to decay during reproduction.");
+ CONFIG_ADD_VAR(FRAC_ENERGY_PASSED_TO_CHILD_DEME, double, 1.0, "Fraction of energy passed from parent to child deme.");
CONFIG_ADD_VAR(NUM_INST_EXC_BEFORE_0_ENERGY, int, 0, "Number of instructions executed before energy is exhausted.");
CONFIG_ADD_VAR(ENERGY_CAP, int, -1, "Maximum amount of energy that can be stored in an organism. -1 means the cap is set to Max Int"); // TODO - is this done?
CONFIG_ADD_VAR(APPLY_ENERGY_METHOD, int, 0, "When should rewarded energy be applied to current energy?\n0 = on divide\n1 = on completion of task\n2 = on sleep");
CONFIG_ADD_VAR(FRAC_ENERGY_TRANSFER, double, 0.0, "Fraction of replaced organism's energy take by new resident");
-// CONFIG_ADD_VAR(ENERGY_VERBOSE, bool, 0, "Print energy and merit values. 0/1 (off/on)");
CONFIG_ADD_VAR(LOG_SLEEP_TIMES, bool, 0, "Log sleep start and end times. 0/1 (off/on)\nWARNING: may use lots of memory.");
// CONFIG_ADD_VAR(FIX_METABOLIC_RATE, bool, 0, "When activated the metabolic rate of all orgiansims are equal. 0/1 (off/on)"); // TODO - check for correctness
CONFIG_ADD_VAR(BCAST_HOPS, int, 1, "Distance a message will travel");
Modified: branches/energy/source/main/cPopulation.cc
===================================================================
--- branches/energy/source/main/cPopulation.cc 2008-01-07 15:37:19 UTC (rev 2255)
+++ branches/energy/source/main/cPopulation.cc 2008-01-08 19:20:13 UTC (rev 2256)
@@ -3304,7 +3304,7 @@
cGenotype* new_genotype = m_world->GetClassificationManager().GetGenotypeInjected(genome, lineage_label);
/*****TEMP*****/
- new_genotype->GetGenome().SetEnergy(genome.GetEnergy());
+ new_genotype->GetGenome().SetEnergy(genome.GetEnergy() * m_world->GetConfig().FRAC_ENERGY_PASSED_TO_CHILD_DEME.Get());
// The rest is done by InjectGenotype();
InjectGenotype( cell_id, new_genotype );
More information about the Avida-cvs
mailing list