# TACO: a toolkit for AMPL control optimization

- 402 Downloads
- 3 Citations

## Abstract

We describe a set of extensions to the AMPL modeling language to conveniently model mixed-integer optimal control problems for ODE or DAE dynamic processes. These extensions are realized as AMPL user functions and suffixes and do not require intrusive changes to the AMPL language standard or implementation itself. We describe and provide TACO, a Toolkit for AMPL Control Optimization that reads AMPL *stub.nl* files and detects the structure of the optimal control problem. This toolkit is designed to facilitate the coupling of existing optimal control software packages to AMPL. We discuss requirements, capabilities, and the current implementation. Using the example of the multiple shooting code for optimal control MUSCOD-II, a direct and simultaneous method for DAE-constrained optimal control, we demonstrate how the problem information provided by the TACO toolkit is interfaced to the solver. In addition, we show how the MS-MINTOC algorithm for mixed-integer optimal control can be used to efficiently solve mixed-integer optimal control problems modeled in AMPL. We use the AMPL extensions to model three control problem examples and we discuss how those extensions affect the representation of optimal control problems. Solutions to these problems are obtained by using MUSCOD-II and MS-MINTOC inside the AMPL environment. A collection of further AMPL control models is provided on the web site http://mintoc.de. MUSCOD-II and MS-MINTOC have been made available on the NEOS Server for Optimization, using the TACO toolkit to enable input of AMPL models.

## Keywords

Mixed-integer optimal control Differential-algebraic equations Domain specific languages Mathematical modeling## Mathematics Subject Classification (2010)

49M37 68N15 90-04 93A30## Notes

### Acknowledgments

The research leading to these results has received funding from the European Union Seventh Framework Programme FP7/2007-2013 under grant agreement n^{o} FP7-ICT-2009-4 248940. The first author acknowledges a travel grant by Heidelberg Graduate Academy, funded by the German Excellence Initiative. We thank Hans Georg Bock, Johannes P. Schlöder, and Sebastian Sager for permission to use the optimal control software package MUSCOD-II and the mixed-integer optimal control algorithm MS-MINTOC. This work was also supported by the Office of Advanced Scientific Computing Research, Office of Science, U.S. Department of Energy, under Contract DE-AC02-06CH11357, and by the Directorate for Computer and Information Science and Engineering of the National Science Foundation under award NSF-CCF-0830035.

## References

- 1.Abhishek, K., Leyffer, S., Linderoth, T.: FilMINT: an outer approximation-based solver for mixed-integer nonlinear programs. INFORMS J. Comput.
**22**(4), 555–567 (2010). http://joc.journal.informs.org/content/22/4/555.abstract - 2.Achtziger, W., Kanzow, C.: Mathematical programs with vanishing constraints: optimality conditions and constraint qualifications. Math. Program. Ser. A
**114**, 69–99 (2008). http://www.mathematik.uni-wuerzburg.de/~kanzow/paper/VanishCP.pdf - 3.Åkesson, J., Årzén, K., Gräfvert, M., Bergdahl, T., Tummescheit. H.: Modeling and optimization with Optimica and JModelica.org–languages and tools for solving large-scale dynamic optimization problems. Comput. Chem. Eng.
**34**(11), 1737–1749 (2008). http://www.sciencedirect.com/science/article/pii/S009813540900283X - 4.Albersmeyer, J.: Adjoint based algorithms and numerical methods for sensitivity generation and optimization of large scale dynamic systems. PhD thesis, Ruprecht-Karls-Universität Heidelberg (2010). http://www.ub.uni-heidelberg.de/archiv/11651
- 5.Andreani, R., Birgin, E., Martinez, J., Schuverdt, M.: On augmented Lagrangian methods with general lower-level constraints. SIAM J. Optim.
**18**, 1286–1309 (2007). http://www.optimization-online.org/DB_FILE/2005/03/1085.pdf - 6.Andreani, R., Birgin, E., Martinez, J., Schuverdt, M.: Augmented Lagrangian methods under the constant positive linear dependence constraint qualification. Math Program
**111**, 5–32 (2008). http://www.ime.usp.br/~egbirgin/publications/abms.pdf - 7.Barton, P., Pantelides, C.: gPROMS—a combined discrete/continuous modelling environment for chemical processing systems. Simul. Ser.
**25**, 25–34 (1993)Google Scholar - 8.Bauer, I., Bock, H., Körkel, S., Schlöder, J.: Numerical methods for initial value problems and derivative generation for DAE models with application to optimum experimental design of chemical processes. In: Scientific Computing in Chemical Engineering II, pp 282–289. Springer, Berlin (1999). http://hgs.iwr.uni-heidelberg.de/expdesign/people/skoerkel/publications/?name=scce99-bauer.ps.gz&type=application/postscript
- 9.Belotti, P.: Couenne: a user’s manual. Tech. rep., Lehigh University (2009). http://www.coin-or.org/Couenne/couenne-user-manual.pdf
- 10.Betts, J., Eldersveld, S., Huffman, W.: Sparse nonlinear programming test problems (Release 1.0). Tech. rep. BCSTECH-93-074, Boeing Computer Services (1993)Google Scholar
- 11.Bock, H., Plitt, K.: A multiple shooting algorithm for direct solution of optimal control problems. In: Proceedings of the 9th IFAC World Congress, pp 242–247. Pergamon Press, Budapest (1984). http://www.iwr.uni-heidelberg.de/groups/agbock/FILES/Bock1984.pdf
- 12.Bonami, P., Biegler, L., Conn, A., Cornuéjols, G., Grossmann, I., Laird, C., Lee, J., Lodi, A., Margot, F., Sawaya, N., Wächter, A.: An algorithmic framework for convex mixed integer nonlinear programs. Discrete Optim
**5**(2), 186–204 (2008). http://www.sciencedirect.com/science/article/pii/S1572528607000448 Google Scholar - 13.Box, G., Hunter, W., MacGregor, J., Erjavec, J.: Some problems associated with the analysis of multiresponse data. Technometrics
**15**, 33–51 (1973). http://www.jstor.org/stable/1266823 Google Scholar - 14.Bryson, A., Ho, Y.: Applied optimal control: optimization, estimation, and control. Wiley, Hoboken (1975)Google Scholar
- 15.Byrd, R.H., Hribar, M.E., Nocedal, J.: An interior point algorithm for large scale nonlinear programming. SIAM J. Optim.
**9**(4), 877–900 (1999)MathSciNetzbMATHCrossRefGoogle Scholar - 16.Byrd, R.H., Gilbert, J.C., Nocedal, J.: A trust region method based on interior point techniques for nonlinear programming. Math. Program.
**89**, 149–185 (2000). http://www.ece.northwestern.edu/~nocedal/PSfiles/nitro.ps.gz Google Scholar - 17.Byrd, R.H., Nocedal, J., Waltz, R.A.: Knitro: an integrated package for nonlinear optimization. In: di Pillo, G., Roma, M. (eds.) Large-scale nonlinear optimization, pp 35–59. Springer, Berlin (2006). http://www.ziena.com/papers/integratedpackage.pdf
- 18.Cesari, L.: Optimization—theory and applications. Springer, Berlin (1983)zbMATHGoogle Scholar
- 19.Conn, A.R., Gould, N.I.M., Toint, P.L.: LANCELOT: A Fortran Package for Large-Scale Nonlinear Optimization (Release A). Springer, Heidelberg (1992)zbMATHGoogle Scholar
- 20.Cuthrell, J., Biegler, L.: On the optimization of differential-algebraic process systems. AIChE
**33**, 1257–1270 (1987). http://onlinelibrary.wiley.com/doi/10.1002/aic.690330804/abstract - 21.Diehl, M.: Real-time optimization for large scale nonlinear processes. PhD thesis, Ruprecht-Karls-Universität Heidelberg (2001). http://archiv.ub.uni-heidelberg.de/volltextserver/volltexte/2001/1659/
- 22.Diehl, M., Leineweber, D., Schäfer, A.: MUSCOD-II Users’ Manual. IWR Preprint 2001–25, Interdisciplinary Center for Scientific Computing (IWR), Ruprecht-Karls-Universität Heidelberg, Im Neuenheimer Feld 368, 69120 Heidelberg, Germany (2001). http://www.iwr.uni-heidelberg.de/groups/agbock/FILES/muscod_manual.pdf
- 23.Diehl, M., Bock, H., Kostina, E.: An approximation technique for robust nonlinear optimization. Math. Program.
**107**, 213–230 (2006). https://lirias.kuleuven.be/bitstream/123456789/70656/1/06-226.pdf Google Scholar - 24.Dolan, E., Moré, J., Munson, T.: Benchmarking Optimization Software with COPS 3.0. Tech. rep. ANL/MCS-TM-273, Mathematics and Computer Science Division, Argonne National Laboratory, 9700 South Cass Avenue, Argonne, IL 60439, USA (2004). http://www.mcs.anl.gov/~more/cops/cops3.pdf
- 25.Elmqvist, H., Brück, D.: Dymola–dynamic modeling language. User’s manual, Dynasim AB (2001)Google Scholar
- 26.Fletcher, R., Leyffer, S.: User manual for filterSQP. Tech. rep., University of Dundee (1999). http://www.mcs.anl.gov/~leyffer/papers/SQP_manual.pdf
- 27.Floudas, C., Pardalos, P., Adjiman, C., Esposito, W., Gumus, Z., Harding, S., Klepeis, J., Meyer, C., Schweiger, C.: Handbook of Test Problems for Local and Global Optimization. Kluwer, Dordrecht (1999)CrossRefGoogle Scholar
- 28.Fourer, B., Ferris, M.C., Gay, D.M.: Expressing complementarity problems and communicating them to solvers. SIAM J. Optim.
**9**, 991–1009 (1999). http://ftp2.cs.wisc.edu/math-prog/tech-reports/98-02.pdf - 29.Fourer, R., Gay, D., Kernighan, B.: A modeling language for mathematical programming. Manage. Sci.
**36**, 519–554 (1990). http://www.jstor.org/pss/2632268 Google Scholar - 30.Fourer, R., Gay, D.M., Kernighan, B.W.: AMPL: A Modelling Language for Mathematical Programming, 2nd edn. Books/Cole-Thomson Learning (2003)Google Scholar
- 31.Gay, D.M.: Hooking your solver to AMPL. Tech. rep., Bell Laboratories, Murray Hill, NJ (1993; revised 1994, 1997). http://www.ampl.com/REFS/download.html#pdf
- 32.Gill, P., Murray, W., Saunders, M., Wright, M.: User’s guide for NPSOL Version 5.0: a Fortran package for nonlinear programming. Report SOL 86–1, Dept. of Mathematics, University of California, San Diego (1998) http://cam.ucsd.edu/~peg/papers/npdoc.pdf
- 33.Gill, P., Murray, W., Saunders, M.: SNOPT: An SQP algorithm for large-scale constrained optimization. SIAM J. Optim.
**12**, 979–1006 (2002). http://www.stanford.edu/group/SOL/papers/SNOPT-SIGEST.pdf - 34.Gropp, W., Moré, J.: Optimization environments and the NEOS Server. In: Buhmann M, Iserles A (eds.) Approximation theory and optimization, pp 167–182. Cambridge University Press, Cambridge (1997). ftp://ftp.mcs.anl.gov/pub/tech_reports/reports/P654.ps.Z
- 35.Hatz, K.: Estimating parameters in optimal control problems. Ruprecht-Karls-Universität Heidelberg, Diploma thesis (2008)Google Scholar
- 36.Kameswaran, S., Biegler, L.: Advantages of nonlinear-programming-based methodologies for inequality path-constrained optimal control problems - a numerical study. SIAM J. Sci. Comput.
**30**, 957–981 (2008). http://numero.cheme.cmu.edu/uploads/paper12.pdf - 37.Kirches, C.: Fast numerical methods for mixed-integer nonlinear model-predictive control. PhD thesis, Ruprecht-Karls-Universität Heidelberg (2010). http://www.ub.uni-heidelberg.de/archiv/11636/
- 38.Kočvara, M., Stingl, M.: PENNON–a code for convex nonlinear and semidefinite programming. Optim. Methods Softw.
**18**(3), 317–333 (2003). http://web.mat.bham.ac.uk/kocvara/pennon/paper_OMS.pdf - 39.Kočvara, M., Stingl, M.: PENNON User’s Guide (Version 0.9). PENOPT (2008). http://www.penopt.com/doc/pennon0_9.pdf.
- 40.Kühl, P., Milewska. A., Diehl, M., Molga, E., Bock, H.: NMPC for runaway-safe fed-batch reactors. In: Proc. Int. Workshop on Assessment and Future Directions of NMPC, pp. 467–474 (2005). http://www.kuleuven.be/optec/OLD/research/subgroups/fastMPC/publications/Kuehl2005.pdf
- 41.Leineweber, D.: Analyse und Restrukturierung eines Verfahrens zur direkten Lösung von Optimal-Steuerungsproblemen. Ruprecht-Karls-Universität Heidelberg, Diploma thesis (1995)Google Scholar
- 42.Leineweber, D.: Efficient reduced SQP methods for the optimization of chemical processes described by large sparse DAE models, Fortschritt-Berichte VDI Reihe 3, Verfahrenstechnik, vol. 613. VDI Verlag, Düsseldorf (1999)Google Scholar
- 43.Leineweber, D., Bauer, I., Schäfer, A., Bock, H., Schlöder, J.: An efficient multiple shooting based reduced SQP strategy for large-scale dynamic process optimization (Parts I and II). Comput. Chem. Eng.
**27**, 157–174 (2003). http://www.iwr.uni-heidelberg.de/groups/agbock/USER_PAGES/LEINEWEBER_DANIEL/WWW/mc2_part1.pdf, http://www.iwr.uni-heidelberg.de/groups/agbock/USER_PAGES/LEINEWEBER_DANIEL/WWW/mc2_part2.pdf Google Scholar - 44.Leyffer, S.: User manual for MINLP. University of Dundee (1998)Google Scholar
- 45.Logsdon, J., Biegler, L.: Decomposition strategies for large-scale dynamic optimization problems. Chem. Eng. Sci.
**47**(4), 851–864 (1992). http://www.sciencedirect.com/science/article/pii/000925099280272E Google Scholar - 46.Maria, G.: An adaptive strategy for solving kinetic model concomitant estimation-reduction problems. Can. J. Chem. Eng.
**67**, 825 (1989). http://onlinelibrary.wiley.com/doi/10.1002/cjce.5450670514/abstract Google Scholar - 47.Mattsson, S., Elmqvist, H., Broenink, J.: Modelica: an international effort to design the next generation modelling language. J. A Benelux Q. J. Autom. Control
**38**(3), 16–19 (1997), special issue on Computer Aided Control System Design, CACSD (1998). https://www.modelica.org/publications/papers/CACSD97Modelica.pdf - 48.Milewska, A.: Modelling of batch and semibatch chemical reactors—safety aspects. PhD thesis, Warsaw University of Technology (2006)Google Scholar
- 49.Moessner-Beigel, M.: Optimale Steuerung für Industrieroboter unter Berücksichtigung der getriebebedingten Elastizität. Diploma thesis Ruprecht-Karls-Universität Heidelberg (1995)Google Scholar
- 50.Murtagh, B., Saunders, M.: MINOS 5.4 user’s guide. Report SOL 83–20R, Department of Operations Research, Stanford University (1993)Google Scholar
- 51.Nocedal, J., Wright, S.: Numerical Optimization, 2nd edn. Springer, Berlin (2006)zbMATHGoogle Scholar
- 52.Petzold, L., Li, S., Cao, Y., Serban, R.: Sensitivity analysis of differential-algebraic equations and partial differential equations. Comput. Chem. Eng.
**30**, 1553–1559 (2006). http://www.sciencedirect.com/science/article/pii/S0098135406001487 - 53.Plitt, K.: Ein superlinear konvergentes Mehrzielverfahren zur direkten Berechnung beschränkter optimaler Steuerungen. Diploma thesis Rheinische Friedrich-Wilhelms-Universität Bonn (1981)Google Scholar
- 54.Potschka, A., Bock, H., Schlöder, J.: A minima tracking variant of semi-infinite programming for the treatment of path constraints within direct solution of optimal control problems. Optim. Methods Softw.
**24**(2), 237–252 (2009). http://www.tandfonline.com/doi/abs/10.1080/10556780902753098 - 55.Rothschild, B., Sharov, A., Kearsley, A., Bondarenko, A.: Estimating growth and mortality in stage-structured populations. J. Plankton Res.
**19**, 1913–1928 (1997). http://plankt.oxfordjournals.org/content/19/12/1913.full.pdf Google Scholar - 56.Rutquist, P., Edvall, M.: PROPT–Matlab Optimal Control Software. User’s manual, TOMLAB Optimization (2010). http://tomopt.com/docs/TOMLAB_PROPT.pdf
- 57.Sager, S.: Numerical methods for mixed-integer optimal control problems. Der andere Verlag, Tönning, Lübeck, Marburg (2005). http://mathopt.uni-hd.de/PUBLICATIONS/Sager2005.pdf
- 58.Sager, S.: A benchmark library of mixed-integer optimal control problems. In: Proceedings MINLP09 (2011). http://mathopt.uni-hd.de/PUBLICATIONS/Sager2011b.pdf
- 59.Sager, S., Bock, H., Diehl, M.: The integer approximation error in mixed-integer optimal control. Math. Program. A (2011). doi: 10.1007/s10107-010-0405-3. http://mathopt.uni-hd.de/PUBLICATIONS/Sager2011.pdf
- 60.von Stryk, O.: User’s guide for DIRCOL (Version 2.1): a direct collocation method for the numerical solution of optimal control problems. Tech. rep., Technische Universität München, Germany (1999)Google Scholar
- 61.Tjoa, I.B., Biegler, L.: Simultaneous solution and optimization strategies for parameter estimation of differential-algebraic equations systems. Ind. Eng. Chem. Res.
**30**, 376–385 (1991). http://pubs.acs.org/doi/abs/10.1021/ie00050a015 - 62.Vanderbei, R., Shanno, D.: An interior point algorithm for nonconvex nonlinear programming. COAP
**13**, 231–252 (1999). http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.25.4065&rep=rep1&type=pdf - 63.Wächter, A., Biegler, L.: On the implementation of an interior-point filter line-search algorithm for Large-Scale Nonlinear Programming. Math. Program.
**106**(1), 25–57 (2006). http://www.springerlink.com/content/r31116mp70171220/