Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cohort update time condition #395

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion model/Host/Human.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion model/Host/Human.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading