diff --git a/model/Host/Human.cpp b/model/Host/Human.cpp index c616b580..797fe4a0 100644 --- a/model/Host/Human.cpp +++ b/model/Host/Human.cpp @@ -144,7 +144,7 @@ void Human::removeFirstEvent(interventions::SubPopRemove::RemoveAtCode code ) for( auto it = removeAtList.begin(), end = removeAtList.end(); it != end; ++it ){ auto expIt = subPopExp.find( *it ); if( expIt != subPopExp.end() ){ - if( expIt->second > sim::nowOrTs0() ){ + if( expIt->second >= sim::nowOrTs0() ){ // removeFirstEvent() is used for onFirstBout, onFirstTreatment // and onFirstInfection cohort options. Health system memory must // be reset for this to work properly; in theory the memory should diff --git a/model/Host/Human.h b/model/Host/Human.h index 800a7f08..971bac60 100644 --- a/model/Host/Human.h +++ b/model/Host/Human.h @@ -164,7 +164,7 @@ inline SimTime Human::age( SimTime time ) const { inline bool Human::isInSubPop( interventions::ComponentId id ) const { auto it = subPopExp.find( id ); if( it == subPopExp.end() ) return false; // no history of membership - else return it->second > sim::nowOrTs0(); // added: has expired? + else return it->second >= sim::nowOrTs0(); // added: has expired? } inline uint32_t Human::getCohortSet() const {