Numerical algorithms for solving the optimal control problem of simple bioreactors