2023 - A Coruña - Spain

PAGE 2023: Methodology - New Tools
Freya Bachmann

Computing Optimal Drug Dosing with Constraints on Model States in NONMEM

Freya Bachmann (1), Gilbert Koch (2), Robert J. Bauer (3), Britta Steffens (2), Gabor Szinnai (4), Marc Pfister (2), Johannes Schropp (1)

(1) Department of Mathematics and Statistics, University of Konstanz, Germany, (2) Pediatric Pharmacology and Pharmacometrics, University Children's Hospital Basel (UKBB), University of Basel, Switzerland, (3) ICON Clinical Research LLC, Blue Bell, PA, USA, (4) Pediatric Endocrinology and Diabetology, University Children's Hospital Basel (UKBB), University of Basel, Switzerland


Recently, we implemented the optimal drug dosing algorithm OptiDose [1] in NONMEM [2] utilizing standard commands. This allows users to solve their own optimal dosing tasks, i.e., to compute optimal drug doses with any pharmacometrics (PMX) model for a given dosing scenario. Optimal doses are associated with a model response as close as possible to a desired therapeutic goal. In [2], doses are optimal with regard to efficacy, but do not account for safety. As it is essential to avoid unfavorable conditions associated with adverse effects, both efficacy and safety need to be incorporated in clinical meaningful optimization. As such, we presented [3] an enhanced method including constraints on model states, so-called state constraints, in OptiDose to compute optimal doses with respect to efficacy while avoiding undesired and potentially harmful conditions of the patient.

The objectives of this work are to realize this method in NONMEM, namely to (i) compute optimal drug doses subject to state constraints, and to (ii) give relevant but substantially different examples: minimizing tumor weight while avoiding myelosuppression, and eradicating bacteria with minimal AUC of the drug.


Solving an optimal dosing task with state constraints requires a PMX model with fixed model parameters and fixed dosing scenario. Further, an appropriate objective function and an inequality state constraint characterize the therapeutic goal and/ or favorable conditions of the patient. 

Optimal doses are associated with the PMX model response which minimizes the objective function while satisfying the state constraint. Based on the augmented Lagrangian approach [4], this state-constrained optimization problem is reformulated as an unconstrained optimization problem by adding a penalty function to the objective function. An appropriate choice is, e.g., the Powell-Hestenes-Rockefellar [4] penalty function. Moreover, in presence of state constraints, an appropriate objective function can be defined without previously [2] mandatory reference function characterizing the desired dynamic of the therapeutic goal.  

In NONMEM, the data file, as well as model parameters and doses THETA are coded as before [2]. In $DES, PMX model equations and, if necessary, additional differential equations computing the objective and/ or penalty function value are provided. In the $ERROR block, the output Y is assigned to be the sum of objective and penalty function value. Several optimizations for increasing penalty parameter can be carried out utilizing $EST -2LL.


Proposed approach is applied to two different optimal dosing examples covering relevant dosing tasks in PMX. 

First, a tumor growth inhibition [5] model is combined with the Friberg myelosuppression [6] model. The therapeutic goal is to minimize tumor weight given as sum of proliferating and apoptotic cells while a state constraint holds, e.g., the neutrophil count remains at all times above a certain threshold. The optimal doses reduce tumor weight as much as possible without neutrophils dropping below the threshold. Any higher doses would result in undesirably low neutrophil counts.  

Second, a PKPD model with adaptive drug resistance is applied for a pediatric cancer patient under antibiotic treatment [7]. The therapeutic goal is to minimize AUC of the drug while satisfying a state constraint on the bacterial count, e.g., at each time point below a certain threshold, or at final time only, or as mean value on the time interval. The optimal doses eradicate bacteria with the lowest possible AUC. Any lower doses would not result in sufficient bacterial eradication. 

In both examples, the optimal doses satisfy the necessary first-order optimality conditions, thus the state constraint is fulfilled. Computations were performed within seconds in NONMEM and verified utilizing the original OptiDose software implemented in MATLAB.


Developed enhanced method optimizes drug dosing including constraints on model states in NONMEM utilizing existing routines. Hence, optimal drug doses complying with efficacy and safety criteria can be computed.

[1] Bachmann F, Koch G, Pfister M, Szinnai G, Schropp J (2021). OptiDose: Computing the Individualized Optimal Drug Dosing Regimen Using Optimal Control. J Optim Theory Appl 189:46–65
[2] Bachmann F, Koch G, Bauer RJ, Steffens B, Szinnai G, Pfister M, Schropp J (2023). Computing optimal drug dosing with OptiDose: implementation in NONMEM. J Pharmacokinet Pharmacodyn. https://doi.org/10.1007/s10928-022-09840-w
[3] Bachmann F (2019). OptiDose: Computing the optimal individual dosing regimen with constraints on model states to include side effects. ACoP10 Trainee Award.
[4] Birgin EG, Castillo RA, Martínez JM (2005). Numerical Comparison of Augmented Lagrangian Algorithms for Nonconvex Problems. Comput Optim Applic 31:31–55.
[5] Koch G, Walz A, Lahu G, Schropp J (2009). Modeling of tumor growth and anticancer of combination therapy. J Pharmacokinet Pharmacodyn 36(2):179-197
[6] Friberg LE, Henningsson A, Mass H, Nguyen L, Karlsson MO (2002). Model of chemotherapy-induced myelosuppresion with parameter consistency across drugs. J Clin Oncol 20(24):4713-4721
[7] Alhadab AA, Ahmed MA, Brundage RC (2018). Amikacin Pharmacokinetic-Pharmacodynamic Analysis in Pediatric Cancer Patients. Antimicrob Agents Chemother. 2018;62(4):e01781-17

Reference: PAGE 31 (2023) Abstr 10369 [www.page-meeting.org/?abstract=10369]
Oral: Methodology - New Tools
Click to open PDF poster/presentation (click to open)