void ReportEnvironmental::LogIndividualData( IIndividualHuman * individual ) { Report::LogIndividualData( individual ); if( individual->IsInfected() ) { // Get infection incidence by route NewInfectionState::_enum nis = individual->GetNewInfectionState(); LOG_VALID_F( "nis = %d\n", ( nis ) ); auto mcw = individual->GetMonteCarloWeight(); if ( nis == NewInfectionState::NewAndDetected || nis == NewInfectionState::NewInfection /*|| nis == NewInfectionState::NewlyDetected*/ ) { auto inf = individual->GetInfections().back(); StrainIdentity strain; inf->GetInfectiousStrainID( &strain ); if( strain.GetGeneticID() == 0 ) { enviro_infections_counter += mcw; } else if( strain.GetGeneticID() == 1 ) { contact_infections_counter += mcw; } } } }
std::vector< std::pair<int,int> > IndividualHumanMalaria::GetInfectingStrainIds() const { std::vector< std::pair<int,int> > strainIds; StrainIdentity strain; for (auto inf : infections) { inf->GetInfectiousStrainID(&strain); strainIds.push_back( std::make_pair( strain.GetAntigenID(), strain.GetGeneticID() ) ); } return strainIds; }