Pharmacokinetic and pharmacodynamic models are formulated based on underlying physiology. With extensive data from a large cohort of patients, a population model is formulated based on the Bayesian approach. A few measurements from a new patient, collected at optimal time points, enables the adaptation of the population model to an individual behavior. Patient models are used to optimize the dose based on model predictive control to maintain the drug concentration within the therapeutic window.