Skip to content

Commit

Permalink
trop bien
Browse files Browse the repository at this point in the history
  • Loading branch information
GillesCattani committed Jan 17, 2024
1 parent 48201c3 commit d7e21f0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/hiv-ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down

0 comments on commit d7e21f0

Please sign in to comment.