Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
Fix lincmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Oct 6, 2023
1 parent b4534cb commit 4e2a7a4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/comp.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@ void handleSSbolus_lin(double *yp,
int *canBreak,
solveWith1Pt_fn solveWith1Pt) {
lin_context_c_t *lin = (lin_context_c_t*)(ctx);
rx_solve *rx=(&rx_global);
double ii = getIi(ind, ind->ix[*i]);
double dose = getDose(ind, ind->ix[*i]);
int oral0 = lin->oral0;
int oral0 = rx->linKa;
int linCmt = ind->linCmt;
int cmtOff = ind->cmt- ind->linCmt;
int ret = 1;
rx_solve *rx=(&rx_global);
switch(rx->linNcmt) {
case 3:
if (cmtOff == 0 && oral0 == 1) {
Expand Down Expand Up @@ -274,7 +274,7 @@ double linCmtCompA(rx_solve *rx, unsigned int id, double _t, int linCmt,
double xp, xout;
double *ypLast, *yp;
double Alast0[4] = {0, 0, 0, 0};
int oral0 = (d_ka > 0) ? 1 : 0;
int oral0 = rx->linKa;
if (oral0) {
/* double d_tlag, double d_F, double d_rate1, double d_dur1, */
/* // Oral parameters */
Expand Down Expand Up @@ -381,6 +381,8 @@ double linCmtCompA(rx_solve *rx, unsigned int id, double _t, int linCmt,
xp = xout;
}
}
REprintf("%f: yp[oral0:%d]: %f, lin.v: %f; cp: %f\n",
xout, oral0, yp[oral0], lin.v, yp[oral0]/lin.v);
return(yp[oral0]/lin.v);
}

Expand Down

0 comments on commit 4e2a7a4

Please sign in to comment.