solving delay differential equations in s-adapt by method ... · solving delay differential...

34
Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski 1 Robert J. Bauer 2 1 Department of Pharmaceutical Sciences, University at Buffalo, Buffalo, NY, USA 2 ICON Development Solutions, Ellicott City, USA

Upload: others

Post on 21-Aug-2020

15 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

Solving Delay Differential Equations in S-ADAPT by

Method of Steps

Wojciech Krzyzanski1

Robert J. Bauer2

1Department of Pharmaceutical Sciences, University at Buffalo, Buffalo, NY, USA 2ICON Development Solutions, Ellicott City, USA

Page 2: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

Cell Populations of PharmacodynamicInterest

• hematopoietic cells (RBC, WBC, PLT)• bacteria and viruses• neoplastic cells

Cell PopulationProduction Loss

tissue uptakesenescencerandom destructionmaturation

mitosisdifferentiationmaturation

• parasites

Page 3: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

Erythropoiesis

Eliott et al., Exp. Hematol. 36:1573 (2008)

Page 4: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

kin

S(t)

Rkin

S(t-TR)C(t)

)()( Rinin TtSktSkdtdR

−⋅−⋅=

γλ

γ

++=

C(t)SCC(t)S1S(t)

50

max

Basic Lifespan-based Indirect Response

Krzyzanski and Jusko, JPB 27: 467 (1999).

Page 5: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

0 5 10 15Seru

m rH

uEPO

Con

cent

ratio

n, IU

/L

10

100

1000

10000

Time, day0 5 10 15 20

Ret

icul

ocyt

es, %

1

2

3

4

5

6

7

Data from K Cheung et al. Clin. Pharmacol. Ther. 64: 412 (1998)

kin kin kin

S(t)C(t)

S(t-TP) S(t-TP-TR)P R

Stimulation of Reticulocyte Production by Epoetin Alfa

EPO serum concentrations (upper panel) and reticulocyte counts (lower panel) after subcutaneous administration of EPO doses of 450, 900, 1350, and 1800 IU/kg.

)TTS(tk)TS(tkdtdR

RPinPin −−⋅−−⋅=

Page 6: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

General Form of DDE System

x(t) = vector of states at time t.T1, …, Tp = delay times.x0 = state vector in the past.

The rate of change of x depends not only on the current value x(t), but also on the system states before times T1 , …, Tp: x(t-T1),…, x(t-Tp).

))Tt(x),...,Tt(x),Tt(x),t(x,t(fdtdx

p21 −−−=

x(t)= x0, for t ≤ 0

for t > 0

Page 7: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

DDE Solvers

•DELSOL (Fortran)Willie DR and Baker CTH. DELSOL – a numerical code for the solutions of systems of delay-differential equations. Appl. Numer. Math. 9:223-234 (1992).

•RETARD, RADAR5 (Fortran)Hairer E, Norsett SP, and Wanner G. Solving Ordinary Differential Equations I: Nonstiff Problems. . Berlin, Springer, 1993.http://univaq.it/~guglielm/guglielmi_eng.html#SO

•dde23 (MATLAB)Shampine LF and Thompson S. Solving DDEs in MATLAB. Appl. Num. Math. 37:441-458 (2001).http://www.radford.edu/~thompson/webddes/index.html

Algorithms based on the Runge-Kutta Method:

Page 8: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

Methods of Steps: Example)1t(x

dtdx

−−= 10)t(x = for t ≤ 0

1st step: Find solution for 0< t <1:0< t <1 ⇒ -1 < t-1 < 0 ⇒ x(t-1)= 10

for 0< t

10dtdx

−=

t1010)t(x −=2nd step: Find solution for 1< t <2:

1< t <2 ⇒ 0 < t-1 < 1 ⇒ x(t-1)= 10 – 10(t-1)

))1t(1010(dtdx

−−−=

2)1t(5)1t(10)t(x −+−−=3rd step: Find solution for 2 < t <3:

1< t <2 ⇒ 1 < t-1 < 2 ⇒ x(t-1)= -10(t-2) + 5(t-2)2

))2t(5)2t(10(dtdx 2−+−−−=

32 )1t(35)2t(55)t(x −−−+−=

Page 9: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

Methods of Steps: Numerical

)2t(xdt

dy2 −−=

10dt

dy3 −=

)1t(xdtdx

−−= 10)t(x = for t ≤ 0

To find a solution for 0< t <3: y1(t)=x(t), y2(t)=x(t-1)

for 0< t

)t(ydt

dy2

1 −=

Since t -2 > 0 for some t, we need to calculate x(t-2): y3(t)=x(t-2)

)3t(xdt

dy3 −−=

Since t -3 < 0 for all 0 < t <3 : x(t-3) = 10 and

Initial conditions: y1(0)= 10, y2(0) = 10, y3(0) = 10

)t(ydt

dy3

2 −=

Page 10: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

Method of Steps

Driver RD. Ordinary and Delay Differential Equations. New York, Springer-Verlag, 1977. http://www.radford.edu/~thompson/webddes/tutorial.html

•If for a time interval ti < t < ti+1 (“a step”) the delay ti+1- T is less than ti, then delayed state y(t-T) defined by its values for times less than ti, which makes y(t-T) a “known” variable.

•If all delayed variables become “known” over the time interval ti < t < ti+1, then for this time interval the system does not have unknown delay variables and becomes an ODE system.

• Methods of steps transforms a system of DDEs into a system of ODEs.

Page 11: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

Methods of Steps: NONMEM

• Delay is introduced to the state variables using ALAG.• Limited number of ODEs (99).• Limited number of ALAGs (20).

Page 12: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

S-ADAPT

http://bmsr.usc.edu/Software/BMSRsoftware.html

Page 13: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

Implementation of Methods of Steps in S-ADAPT

∑ ∑= =

−−++=b rm

1j

n

1kp1kj ))Tt(x),...,Tt(x),t(x,t(h)t(r)t(b

dtdx

τi = i1T1+i2T2+…+ipTp

⎩⎨⎧

++≤≤<++−−

= Ti...Ti t if ,x

ttTi...Ti if ),Ti...Tit(x)t(y

pp110

lastpp11pp11i...ii p21

Vector of all possible delay times:

Vector of all possible delay states:

S-ADAPT:•Determines the derivatives of yi1…ip from the original DDE systems. •Creates a new ODE systems for yi1…ip. •Uses LSODA to calculate the solution.•Reports y0…0 as the solution to the DDE system.

Page 14: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

Implementation of Methods of Steps in S-ADAPT

• Mapping integer combinations of the delay times.

• Filtering and sorting delay times.• Creating the ODE system.• Bolus and zero-order infusion input.• Handling the time dependent DDE

systems.

Page 15: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

S-ADAPT Library DDE Routines

Tdroutines.for

Tdelay.incThis files contains global variables specific to DDE routines that are not in globals.inc

Page 16: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

S-ADAPT User Defined DDE Routines

Model_Del.for

Page 17: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

Multiple IV Boluses to One Compartment with Delayed Elimination

)Tt(Ak)tt(DosedtdA m

1ii −⋅−−δ⋅= ∑

=for t >0

A(t) = A0, for t ≤ 0

D = 10 doseBolus times t1 = 0,t2 = 1, t3 = 2,t4 = 3 k = 1 elimination rate constant.T = 2 delayA0 = 0 past

MATLAB dde23 generated solution

Page 18: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

User Defined Model

Page 19: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

Output Subroutine

Page 20: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

Symbol Subroutine

Page 21: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

Model Compilation in S-ADAPT

Page 22: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

S-ADAPT Table for Simulations

Page 23: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

Model Input

Page 24: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

Model Output

Page 25: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

S-ADAPT vs. MATLAB

MATLAB: RelTol=10-4 AbsTol=10-6

S-ADAPT: RelTol=10-8 AbsTol=10-8

Page 26: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

PK/PD Model of rHuEPO Stimulatory Effect on RBC Production

S. Woo et al., J. Pharmacokinet. Pharmacodyn. 34:849-868 (2007).

Page 27: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

Model Equations( ) pTtppteloffonEPO VAkCkkRCkCRkk

dtdC

⋅+⋅+−⋅+⋅⋅−=

TtppptT AkVCk

dtdA

⋅−⋅⋅=

RkRCkCRkkdtdR

degoffonsyn ⋅−⋅+⋅⋅−=

( ) RCkkCRkdt

dRCintoffon ⋅+−⋅⋅=

)TTTt(I)TTt(S)TTTt(Sk

)TTt(I)Tt(S)TTt(Skdt

dRET

RET2P1PRET2PRET2P1Pin

2P1P2P2P1Pin

−−−⋅−−⋅−−−⋅

−−−⋅−⋅−−⋅=

)TTTTt(I)TTTt(S)TTTTt(Sk

)TTTt(I)TTt(S)TTTt(Skdt

dRBC

RBCRET2P1PRBCRET2PRBCRET2P1Pin

RET2P1PRET2PRET2P1PinM

−−−−⋅−−−⋅−−−−⋅

−−−−⋅−−⋅−−−⋅=

)t(RCSC)t(RCS1)t(S

50

max

+⋅

+=)t(HbIC

)t(HbI1)t(I50

max

Δ+Δ⋅

−= )t(RBCMCH)t(Hb ⋅=

Page 28: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

S-ADAPT Del_Diffeq and Del_Otput

Page 29: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

S-DAPT Dosing and Parameters

Page 30: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

C and ATS-ADAPT MATLAB

Page 31: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

R and RCS-ADAPT MATLAB

Page 32: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

RET and RBCMS-ADAPT MATLAB

Page 33: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

Conclusions

• The methods of steps transforms a system of DDEs into a systems of ODEs.

• S-ADAPT implementation of the methods of steps allows solving DDEs with a constant past and bolus inputs.

• S-ADAPT solutions are identical with MATLAB dde23 generated solutions given the same tolerance levels for numerical error.

• S-ADAPT is the first program designed for population PK/PD analysis that is capable of solving arbitrary DDE models

Page 34: Solving Delay Differential Equations in S-ADAPT by Method ... · Solving Delay Differential Equations in S-ADAPT by Method of Steps Wojciech Krzyzanski1 ... Hairer E, Norsett SP,

Acknowledgments

• Aman Singh, Department of Pharmaceutical Sciences, University at Buffalo.

• NIH Grant GM57980 from the National Institutes of General Medical Sciences.

Please e-mail [email protected] for• S-ADAPT DDE solver routines.• S-ADAPT codes for presented examples.