diff --git a/model/Clinical/CMDecisionTree.cpp b/model/Clinical/CMDecisionTree.cpp index c201a8fc..cd52798e 100644 --- a/model/Clinical/CMDecisionTree.cpp +++ b/model/Clinical/CMDecisionTree.cpp @@ -183,7 +183,7 @@ class CMDTUncomplicated : public CMDecisionTree { if ( ((hostData.pgState & Episode::SICK) && !(hostData.pgState & Episode::COMPLICATED)) || (hostData.pgState & Episode::MALARIA) ) { - if (latest.time + memory >= sim::now()) + if (latest.time + memory >= sim::nowOrTs0()) return positive.exec( hostData ); else return negative.exec( hostData ); diff --git a/model/Host/Human.cpp b/model/Host/Human.cpp index 797fe4a0..307f0ea1 100644 --- a/model/Host/Human.cpp +++ b/model/Host/Human.cpp @@ -112,7 +112,7 @@ Human::Human(SimTime dateOfBirth) : { // Initial humans are created at time 0 and may have dateOfBirth in past. Otherwise dateOfBirth must be now. assert( dateOfBirth == sim::nowOrTs1() || (sim::now() == sim::zero() && dateOfBirth < sim::now()) ); - + HumanHet het = hetSample(rng); withinHostModel = WithinHost::WHInterface::createWithinHostModel( rng, het.comorbidityFactor ); diff --git a/unittest/CMDecisionTreeSuite.h b/unittest/CMDecisionTreeSuite.h index 173c472d..1d06e56f 100644 --- a/unittest/CMDecisionTreeSuite.h +++ b/unittest/CMDecisionTreeSuite.h @@ -48,7 +48,8 @@ class CMDecisionTreeSuite : public CxxTest::TestSuite UnittestUtil::EmpiricalWHM_setup(); - human.reset( UnittestUtil::createHuman(sim::zero()).release() ); + human.reset( UnittestUtil::createHuman(sim::nowOrTs0()).release() ); + ETS_ASSERT( human.get() != 0 ); whm = dynamic_cast(UnittestUtil::setHumanWH( *human, unique_ptr(new WHMock()) ));