{Model of antibiotic decay, PD/PK and Physiological Tolerance}
{Hill function for antibiotic concentration dependent growth}
{MIC can increase with density}
{Simulation used in Udekwu et al. Functional relationship between bacterial cell density} {and the efficacy of antibiotics, JAC 63:745-757,2009}
METHOD EULER
STARTTIME = 0
STOPTIME=100
DT = 0.01
DTOUT =.1
fmaxs=1 {Maximum growth rate sensitive}
fmins= -5{Minimum growth rate sensitive}
micMAX = 100 {Maximum MIC}
micMin=1 {Minimum MIC}
micK=5e7 {Density at which MIC is half it Maximum value}
kn=1e10 {Saturation density}
pd=0.2 {Magnitude of the density effect, 1-full, 0 none}
k=1 {Hill Coefficient}
init A = 50 {Initial Antibiotic concentration}
amax = 50 {Antibiotic concentration added at Lambda interval}
init S=5e4 {Initial density of sensitive bacteria}
d = 0.5 {Antibiotic decay rate}
d/dt (A) = -d*A + ADD {change in the concentration of the antibiotic}
mic1=micMIN + pd*micMAX*(S/(S+MicK))
psisx = ((fmaxs-fmins)*(A/mic1)^k)/((A/mic1)^k - fmins/fmaxs)
psis=fmaxs-psisx
d/dt (S) =S*psis*(1-S/Kn) {Change in the density of sensitive bacteria state 1}
dose = 8{dosing interval Lambda}
init TT=0
d/dt (TT) = 1-GT
ADD = IF TT > dose THEN amax/DT ELSE 0
GT= IF TT >dose THEN dose/DT ELSE 0