Skip to content

Commit

Permalink
allow parasite migration within a single
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis Zaman committed Jul 31, 2020
1 parent ca1f311 commit f4dc270
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion avida-core/source/main/cPopulation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@ bool cPopulation::ActivateParasite(cOrganism* host, Systematics::UnitPtr parent,
// @TODO - activate parasite target selection should account for hardware type
cOrganism* target_organism = NULL;
// If there's any migration turned on ... try this first
if(m_world->GetConfig().NUM_DEMES.Get() > 1 && m_world->GetConfig().DEMES_PARASITE_MIGRATION_RATE.Get() > 0.0 && m_world->GetConfig().DEMES_MIGRATION_METHOD.Get() == 4 && m_world->GetRandom().P(m_world->GetConfig().DEMES_PARASITE_MIGRATION_RATE.Get())){
if(m_world->GetConfig().NUM_DEMES.Get() > 0 && m_world->GetConfig().DEMES_PARASITE_MIGRATION_RATE.Get() > 0.0 && m_world->GetConfig().DEMES_MIGRATION_METHOD.Get() == 4 && m_world->GetRandom().P(m_world->GetConfig().DEMES_PARASITE_MIGRATION_RATE.Get())){
cDeme& deme = GetDeme(m_world->GetMigrationMatrix().GetProbabilisticDemeID(host_cell.GetDemeID(), m_world->GetRandom(),true));

// Implementation #1 - Picks randomly of ALL cells in to-deme and then finds if the one it chose was occupied
Expand Down

0 comments on commit f4dc270

Please sign in to comment.