From d7e21f082f7b3a91b2ab61ea012296d48f49a440 Mon Sep 17 00:00:00 2001 From: Gilles Date: Wed, 17 Jan 2024 11:38:23 +0100 Subject: [PATCH] trop bien --- src/hiv-ops.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/hiv-ops.cc b/src/hiv-ops.cc index 910c0cf..6c0bd28 100644 --- a/src/hiv-ops.cc +++ b/src/hiv-ops.cc @@ -146,12 +146,15 @@ void GetOlderOperation::ProcessAgent(Agent* agent) { const auto& transition_proba = sparam->hiv_transition_matrix[person->state_][year_population_category]; for (size_t i = 0; i < transition_proba.size(); i++) { - if (random->Uniform() < transition_proba[i]) { + if (random->Uniform() < transition_proba[i] && person->newly_infected==false) { person->state_ = i; break; } } - + if(person->newly_infected==true){ + std::cout << "W"; + person->newly_infected=false; + } // Possibly die - if not, just get older bool stay_alive{true};