Abstract
We present pyOpt, an object-oriented framework for formulating and solving nonlinear constrained optimization problems in an efficient, reusable and portable manner. The framework uses object-oriented concepts, such as class inheritance and operator overloading, to maintain a distinct separation between the problem formulation and the optimization approach used to solve the problem. This creates a common interface in a flexible environment where both practitioners and developers alike can solve their optimization problems or develop and benchmark their own optimization algorithms. The framework is developed in the Python programming language, which allows for easy integration of optimization software programmed in Fortran, C, C+ +, and other languages. A variety of optimization algorithms are integrated in pyOpt and are accessible through the common interface. We solve a number of problems of increasing complexity to demonstrate how a given problem is formulated using this framework, and how the framework can be used to benchmark the various optimization algorithms.
Similar content being viewed by others
References
Arlow J, Neustadt I (2002) UML and the unified process: practical object-oriented analysis and design. Addison-Wesley Longman Publishing Co Inc, Boston
Beazley DM (2006) Python essential reference, 3rd edn. Sams Publishing, Indianapolis
Benson S, McInnes L, Moré J, Munson T, Sarich J (2007) TAO toolkit for advanced optimization user’s manual (revision 1.9). Tech Rep ANL/MCS-TM-242, Mathematics and Computer Science Division, Argonne National Laboratory. http://www.mcs.anl.gov/tao
Bersini H, Dorigo M, Langerman S, Geront G, Gambardella L (1996) Results of the first international contest on evolutionary optimisation (1st ICEO). In: IEEE international conference on evolutionary computation, pp 611–615
Bisschop J, Roelofs M (2008) AIMMS—user’s guide. Tech Rep, Paragon Decision Technology, Haarlem, The Netherlands
Blezek D (1998) Rapid prototyping with SWIG. C/C+ + Users J 16(11):61–65
Chittick IR, Martins JRRA (2008) Aero-structural optimization using adjoint coupled post-optimality sensitivities. Struct Multidisc Optim 36(1):59–77
Dahl J, Vandenberghe L (2008) CVXOPT: Python software for convex optimization, documentation. User’s documentation, University of California. http://abel.ee.ucla.edu/cvxopt/
De Jong KA (1975) An analysis of the behavior of a class of genetic adaptive systems. PhD thesis, University of Michigan
Deb K, Pratap A, Agarwal S, Meyarivan T (2002) A fast and elitist multiobjective genetic algorithm: NSGA-II. IEEE Trans Evol Comput 6(2):181–197. doi:10.1109/4235.996017
Eldred MS, Brown SL, Adams BM, Dunlavy DM, Gay DM, Swiler LP, Giunta AA, Hart WE, Watson JP, Eddy JP, Griffin JD, Hough PD, Kolda TG, Martinez-Canales ML, Williams PJ (2007) DAKOTA, a multilevel parallel object-oriented framework for design optimization, parameter estimation, uncertainty quantification, and sensitivity analysis: version 4.0 users manual. Technical Report SAND 2006-6337, Sandia National Laboratories
Fiacco AV, McCormick GP (1968) Nonlinear programming: sequential unconstrained minimization techniques. John Wiley, New York
Fourer R, Gay DM, Kernighan BW (2003) AMPL: a modeling language for mathematical programming, 2nd edn. Brooks/Cole–Thomson Learning, Pacific Grove
Friedlander M, Orban D (2008) NLpy: nonlinear programming in python. Tech Rep, GERAD and École Polytechnique. http://nlpy.sourceforge.net/index.html
Geem ZW, Kim JH, Loganathan GV (2001) A new heuristic optimization algorithm: harmony search. Simulation 76:60–68. doi:10.1177/003754970107600201
Gill PE, Murray W, Saunders MA (2002) SNOPT: an SQP algorithm for large-scale constrained optimization. SIAM J Optim 12:979–1006. doi:10.1137/S0036144504446096
Grant M, Boyd S (2010) CVX: Matlab software for disciplined convex programming, version 1.21. Tech Rep, http://cvxr.com/cvx
Gray J, Moore KT, Naylor BA (2010a) OpenMDAO: An open source framework for multidisciplinary analysis and optimization. In: Proceedings of the 13th AIAA/ISSMO multidisciplinary analysis optimization conference, Fort Worth
Gray J, et al (2010b) OpenMDAO. http://openmdao.org/
Hart W (2003) An introduction to the COLIN optimization interface. In: Genetic and Evolutionary Computation Conference (GECCO), international workshop on memetic algorithms, Chicago, pp 216–221
Hart W (2009) Operations research and cyber-infrastructure, vol 47. Springer, chap Python Optimization Modeling Objects (Pyomo), pp 3–19
Hock W, Schittkowski K (1981) Test examples for nonlinear programming codes. Lecture notes in economics and mathematical systems, vol 187. Springer
Holmström K, Göran A, Edvall M (2010) User’s guide for TOMLAB 7. user’s manual, TOMLAB optimization. http://www.tomlab.biz
Hong U, Hwang K, Park G (2004) A comparative study of software systems from the optimization viewpoint. Struct Multidisc Optim 27:460–468
Jacobs J, Etman L, van Keulen F, Rooda J (2004) Framework for sequential approximate optimization. Struct Multidisc Optim 27:384–400. doi:10.1007/s00158-004-0398-8
Jansen P, Perez RE, Martins JRRA (2010) Aerostructural optimization of nonplanar lifting surfaces. J. Aircr 47(5):1490–1503. doi:10.2514/1.44727
Jansen PW, Perez RE (2011) Constrained structural design optimization via a parallel augmented lagrangian particle swarm optimization approach. Comput Struct. doi:10.1016/j.compstruc.2011.03.011
Jones E, Oliphant T, Peterson P, et al (2001) SciPy: open source scientific tools for Python. http://www.scipy.org/
Kiwiel KC (1985) Methods of descent for nondifferentiable optimization. In: Lecture notes in mathematics, vol 1133. Springer–Verlag, Berlin
Kraft D (1988) A software package for sequential quadratic programming. Tech Rep DFVLR-FB 88-28, DLR German Aerospace Center—Institute for Flight Mechanics, Köln, Germany
Kreisselmeier G, Steinhauser R (1979) Systematic control design by optimizing a vector performance index. In: IFAC symposium on computer-aided design of control systems, international federation of active controls. Zurich, Switzerland
Kroshko DK (2010) OpenOpt. Tech Rep, http://openopt.org
Kuntsevich A, Kappel F (1997) SolvOpt manual: the solver for local nonlinear optimization problems. Tech Rep, Institute for Mathematics. Karl–Franzens University of Graz, Graz, Autria
Langtangen HP (2008) Python scripting for computational science, texts in computational science and engineering, vol 3, 3rd ed. Springer
Lawrence CT, Tits AL (1996) Nonlinear equality constraints in feasible sequential quadratic programming. Optim Methods Softw 6:265–282
Lawson CL, Hanson RJ (1974) Solving least square problems. Prentice-Hall, Englewood Cliffs
Lee KS, Geem ZW (2005) A new meta-heuristic algorithm for continuous engineering optimization: harmony search theory and practice. Comput Methods Appl Mech Eng 194:3902–3933. doi:10.1016/j.cma.2004.09.007
Lofberg J (2004) YALMIP: A toolbox for modeling and optimization in MATLAB. In: CACSD conference. Taipei, Taiwan
Martins JRRA, Sturdza P, Alonso JJ (2003) The complex-step derivative approximation. ACM Trans Math Softw 29(3):245–262. doi:10.1145/838250.838251
Martins JRRA, Marriage C, Tedford N (2009) pyMDO: an object-oriented framework for multidisciplinary design optimization. ACM Trans Math Softw 36(4). doi:10.1145/1555386.1555389
Meza JC (1994) OPT+ +: an object oriented class library for nonlinear optimization. Technical Report SAND 1994-8225, Sandia National Laboratories
Meza JC, Oliva RA, Hough PD, Williams PJ (2007) OPT+ +: an object oriented toolkit for nonlinear optimization. ACM Trans Math Softw 33(2):12:1–12:27. doi:10.1145/1236463.1236467
Mitchell S (2009) puLP: an LP modeler in Python, documentation. User’s documentation, COIN-OR Foundation, Inc. https://www.coin-or.org/PuLP/
Mittelmann H (2010) Decision tree for optimization software. Tech Rep, School of Mathematical and Statistical Sciences, Arizona State University. http://plato.asu.edu/guide.html
Oliphant TE (2007) Python for scientific computing. Comput Sci Eng 9(3):10–20
Perez RE, Martins JRRA (2010) pyOpt. http://pyopt.org/
Peterson P (2009) F2PY: a tool for connecting Fortran and Python programs. Int J Comput Sci Eng 4(4):296–305
Poon NMK, Martins JRRA (2007) An adaptive approach to constraint aggregation using adjoint sensitivity analysis. Struct Multidisc Optim 30(1):61–73
Powell MJD (1994) Advances in optimization and numerical analysis. Kluwer Academic, Dordrecht, chap A direct search optimization method that models the objective and constraint functions by linear interpolation, pp 51–67
Rosenbrock HH (1960) An automatic method for finding the greatest or least value of a function. Comput J 3:175–184
Rosenthal RE (2008) GAMS—a user’s guide. Tech Rep, GAMS Development Corporation, Washington
Schittkowski K (1986) NLPQL: a Fortran subroutine for solving constrained nonlinear programming problems. Ann Oper Res 5(2):485–500
Schittkowski K (1987) More test problems for nonlinear programming codes. Lecture notes in economics and mathematical systems, vol 282
Schlüter M, Gerdts M (2009) The oracle penalty method. J Glob Optim 47(2):293–325. doi:10.1007/s10898-009-9477-0
Schlüter M, Egea J, Banga J (2009) Extended ant colony optimization for non-convex mixed integer nonlinear programming. Comput Oper Res 36(7):2217–2229
Shor N (1985) Minimization methods for non-differentiable functions. In: Springer series in computational mathematics, vol 3. Springer–Verlag, Berlin
Svanberg K (1987) The method of moving asymptotes—a new method for structural optimization. Int J Numer Methods Eng 24(2):359–373. doi:10.1002/nme.1620240207
Svanberg K (1995) A globally convergent version of MMA without linesearch. In: First World congress of structural and multidisciplinary optimization. Goslar, Germany
TANGO project (2007) Trustable algorithms for nonlinear general optimization. Tech Rep, Applied Mathematics Department at IMECC-UNICAMP and Computer Science Department at IME-USP. http://www.ime.usp.br/~egbirgin/tango/
Tedford NP, Martins JRRA (2010) Benchmarking multidisciplinary design optimization algorithms. Optim Eng 11(1):159–183
Vanderplaats GN (1973) CONMIN—a Fortran program for constrained function minimization. Technical Memorandum TM X-62282, NASA Ames Research Center, Moffett Field, California
Venter G, Sobieszczanski-Sobieski J (2004) Multidisciplinary optimization of a transport aircraft wing using particle swarm optimization. Struct Multidisc Optim 26:121–131. doi:10.1007/s00158-003-0318-3
Woodruff D, Watson JP, Hart W (2011) PySP: modeling and solving stochastic programs in Python. In: 12th INFORMS computing society conference. Monterey, CA
Wrenn G (1989) An indirect method for numerical optimization using the Kreisselmeier–Steinhauser function. Contractor report NASA CR-4220, NASA Langley Research Center, Hampton
Xu E (2009) pyIPOpt: an IPOPT connector to Python. User’s manual. http://code.google.com/p/pyipopt/
Zhou JL, Tits AL (1996) An SQP algorithm for finely discretized continuous minimax problems and other minimax problems with many objective functions. SIAM J Optim 6(2):461–487
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Perez, R.E., Jansen, P.W. & Martins, J.R.R.A. pyOpt: a Python-based object-oriented framework for nonlinear constrained optimization. Struct Multidisc Optim 45, 101–118 (2012). https://doi.org/10.1007/s00158-011-0666-3
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00158-011-0666-3