[Avida-SVN] r2662 - in development: source/main tests/energy_deme_level_res
beckma24 at myxo.css.msu.edu
beckma24 at myxo.css.msu.edu
Fri Jun 20 11:30:16 PDT 2008
Author: beckma24
Date: 2008-06-20 14:30:16 -0400 (Fri, 20 Jun 2008)
New Revision: 2662
Modified:
development/source/main/cDeme.cc
development/source/main/cPopulation.cc
development/tests/energy_deme_level_res/test_list
Log:
fixed code that caused test to fail
Modified: development/source/main/cDeme.cc
===================================================================
--- development/source/main/cDeme.cc 2008-06-20 17:37:24 UTC (rev 2661)
+++ development/source/main/cDeme.cc 2008-06-20 18:30:16 UTC (rev 2662)
@@ -276,20 +276,6 @@
if(resetResources) {
deme_resource_count.ReinitializeResources(additional_resource);
- if(m_world->GetConfig().ENERGY_ENABLED.Get() == 1) {
- cPopulation& pop = m_world->GetPopulation();
- for (int i=0; i<GetSize(); i++) {
- int cellid = GetCellID(i);
- cPopulationCell& cell = m_world->GetPopulation().GetCell(cellid);
- if(cell.IsOccupied()) {
- cOrganism* organism = cell.GetOrganism();
- cPhenotype& phenotype = organism->GetPhenotype();
- phenotype.SetEnergy(cell.UptakeCellEnergy(1.0));
- phenotype.SetMerit(cMerit(cMerit::EnergyToMerit(phenotype.GetStoredEnergy() * phenotype.GetEnergyUsageRatio(), m_world)));
- pop.UpdateMerit(cell.GetID(), (phenotype.GetMerit()).GetDouble());
- }
- }
- }
}
}
Modified: development/source/main/cPopulation.cc
===================================================================
--- development/source/main/cPopulation.cc 2008-06-20 17:37:24 UTC (rev 2661)
+++ development/source/main/cPopulation.cc 2008-06-20 18:30:16 UTC (rev 2662)
@@ -1109,10 +1109,10 @@
Note: New deme competition fitness functions are added in PopulationActions.cc by subclassing
cActionAbstractCompeteDemes and overriding cActionAbstractCompeteDemes::Fitness(cDeme&). (Don't forget
- to register the action and add it to the events file).
+to register the action and add it to the events file).
Another note: To mimic the behavior of the other version of CompeteDemes (which is kept around
- for backwards compatibility), change the config option DEMES_REPLICATE_SIZE to be the size of
+for backwards compatibility), change the config option DEMES_REPLICATE_SIZE to be the size of
each deme.
*/
void cPopulation::CompeteDemes(const std::vector<double>& fitness) {
Modified: development/tests/energy_deme_level_res/test_list
===================================================================
--- development/tests/energy_deme_level_res/test_list 2008-06-20 17:37:24 UTC (rev 2661)
+++ development/tests/energy_deme_level_res/test_list 2008-06-20 18:30:16 UTC (rev 2662)
@@ -13,7 +13,7 @@
email = beckma24 at msu.edu ; Email address for the test's creator
[consistency]
-enabled = no ; Is this test a consistency test?
+enabled = yes ; Is this test a consistency test?
long = no ; Is this test a long test?
[performance]
More information about the Avida-cvs
mailing list