Evaluation of Optimization Solvers in Mathematica with focus on Optimal Control Problems

This thesis involves optimization of optimal control problems using collocation methods in Wolfram SystemModeler and Mathematica. Three optimization solvers are evaluated and compared: FindMinimum in Mathematica, IPOPT and KNITRO. They are evaluated by letting them solve optimal control problems with use of the numerical method direct collocation. Two test problems are used; they represent a batch reactor and a free floating robot. An interface between IPOPT and Mathematica is created. Direct collocation is based on discretizing the state and control variables of the optimal control problem with use of collocation points. In this thesis three numerical methods are used to approximate the derivatives of the state variables in the optimal control problem. The three methods are Euler method, backward differentiation method and the use of Lagrange basis polynomials. The results are obtained by investigating the optimal trajectories of the variables, the optimal cost function, the number of iterations and the total time spent during optimization. The conclusion is that FindMinimum is not as good as the other two solvers. It performs worst in all studied aspects. The main reason is that it does not have a good algorithm to solve constrained optimization problems. IPOPT and KNITRO are equally good with respect to number of iterations and optimal results, but in the timing aspect is IPOPT slower because of slow function evaluations. Acknowledgements This thesis has been performed at Wolfram MathCore in Linköping. I would like to thank my supervisor Peter Aronsson and all colleagues at Wolfram MathCore. I would also like to thank my supervisor and examiner Stig Larsson at the Department of Mathematical Sciences, Chalmers University. Rebecka Nylin, Gothenburg June 7, 2013