ABSTRACT

Optimal Control Problems (OCPs) represent a model for a wide variety of real-life phenomena. Some of these applications include the control of infectious diseases, the continuous stirred tank reactor (CSTR), biological populations, population harvesting, etc.

This chapter presents the basics of optimal control. It then discusses the uses of indirect and direct transcription methods for solving them numerically using MATLAB® and Python. It also discusses the use of the gekko Python for solving the optimal control problems.

The chapter consists of six sections, organized as follows. The statement of the problem is in the first section. The second and third sections discuss the necessary conditions for the optimal control. Ideas about some of numerical methods for solving the optimal control problems are presented in Section 4. Section 5 discusses the numerical solution of optimal control problems based on the indirect transcription methods. The numerical methods for solving optimal control problems based on the direct transcription methods are presented in Section 6.