Skip to content

Commit

Permalink
Fix central compartment with linCmt() ka models
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Aug 28, 2024
1 parent 130f927 commit 2bd74de
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/genModelVars.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,10 @@ static inline int populateStateVectors(SEXP state, SEXP sens, SEXP normState, in
int prop = tb.dprop[i];
int pass = 0;
if (tb.linCmt){
if (tb.hasDepotCmt && !strcmp("depot", tb.ss.line[tb.di[i]])){
if (tb.hasDepotCmt == 1 && !strcmp("depot", tb.ss.line[tb.di[i]])){
pass = 1;
} else if (tb.hasCentralCmt && !strcmp("central", tb.ss.line[tb.di[i]])) {
} else if ((tb.hasCentralCmt == 1 || tb.hasDepotCmt == 1) &&
!strcmp("central", tb.ss.line[tb.di[i]])) {
pass = 1;
}
}
Expand Down

0 comments on commit 2bd74de

Please sign in to comment.