To model the process of sterilization by heating in the food industry, we d
erive an optimal control problem with state and control constraints governe
d by a nonlinear heat equation. A discretized form of the problem can then
be expressed as a large-scale continuous optimization problem and solved by
a special sequential quadratic programming method. The model provides usef
ul insights for example, when maximizing the retention of vitamins, the com
puted optimal control differs from the one typically used in industry and c
an be generalized.