[Avida-SVN] r2445 - development/source/main
barrick at myxo.css.msu.edu
barrick at myxo.css.msu.edu
Sun Mar 9 21:38:18 PDT 2008
Author: barrick
Date: 2008-03-10 00:38:18 -0400 (Mon, 10 Mar 2008)
New Revision: 2445
Modified:
development/source/main/cPopulation.cc
Log:
Assert was blocking code that works great and is useful; changed it to block an infinite loop. Fixed some indenting.
Modified: development/source/main/cPopulation.cc
===================================================================
--- development/source/main/cPopulation.cc 2008-03-10 03:43:43 UTC (rev 2444)
+++ development/source/main/cPopulation.cc 2008-03-10 04:38:18 UTC (rev 2445)
@@ -124,7 +124,7 @@
assert(!(m_world->GetConfig().DEMES_USE_GERMLINE.Get()
&& (m_world->GetConfig().DEMES_PROB_ORG_TRANSFER.Get()>0.0)));
assert(!(m_world->GetConfig().DEMES_USE_GERMLINE.Get()
- && (m_world->GetConfig().DEMES_REPLICATE_SIZE.Get()>1)));
+ && (m_world->GetConfig().MIGRATION_RATE.Get()>0.0)));
#ifdef DEBUG
const int birth_method = m_world->GetConfig().BIRTH_METHOD.Get();
@@ -2177,19 +2177,19 @@
int max_msrndx = 0;
for (int i=0; i < cell_array.GetSize(); i++) {
if (cell_array[i].IsOccupied()) {
- if (cell_array[i].GetOrganism()->GetPhenotype().OK()) {
- // Get measurement, exclude parent
- if (parent_cell.GetID() != cell_array[i].GetID()) {
- msr = random();
- } else {
- msr = 0.0;
- }
+ if (cell_array[i].GetOrganism()->GetPhenotype().OK()) {
+ // Get measurement, exclude parent
+ if (parent_cell.GetID() != cell_array[i].GetID()) {
+ msr = random();
+ } else {
+ msr = 0.0;
+ }
- if (max_msr < msr) {
- max_msr = msr;
- max_msrndx = i;
- }
- }
+ if (max_msr < msr) {
+ max_msr = msr;
+ max_msrndx = i;
+ }
+ }
}
}
KillOrganism(cell_array[max_msrndx]);
@@ -2463,6 +2463,7 @@
deme.IncTimeUsed();
CheckImplicitDemeRepro(deme);
}
+
}
// Loop through all the demes getting stats and doing calculations
More information about the Avida-cvs
mailing list