Advertisement

Structural and Multidisciplinary Optimization

, Volume 45, Issue 1, pp 101–118 | Cite as

pyOpt: a Python-based object-oriented framework for nonlinear constrained optimization

  • Ruben E. Perez
  • Peter W. Jansen
  • Joaquim R. R. A. Martins
Research Paper

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.

Keywords

Optimization algorithms Constrained optimization Nonlinear programming Object-oriented programming Python Aerostructural optimization 

References

  1. Arlow J, Neustadt I (2002) UML and the unified process: practical object-oriented analysis and design. Addison-Wesley Longman Publishing Co Inc, BostonGoogle Scholar
  2. Beazley DM (2006) Python essential reference, 3rd edn. Sams Publishing, IndianapolisGoogle Scholar
  3. 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
  4. 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–615Google Scholar
  5. Bisschop J, Roelofs M (2008) AIMMS—user’s guide. Tech Rep, Paragon Decision Technology, Haarlem, The NetherlandsGoogle Scholar
  6. Blezek D (1998) Rapid prototyping with SWIG. C/C+ + Users J 16(11):61–65Google Scholar
  7. Chittick IR, Martins JRRA (2008) Aero-structural optimization using adjoint coupled post-optimality sensitivities. Struct Multidisc Optim 36(1):59–77CrossRefGoogle Scholar
  8. Dahl J, Vandenberghe L (2008) CVXOPT: Python software for convex optimization, documentation. User’s documentation, University of California. http://abel.ee.ucla.edu/cvxopt/
  9. De Jong KA (1975) An analysis of the behavior of a class of genetic adaptive systems. PhD thesis, University of MichiganGoogle Scholar
  10. 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 CrossRefGoogle Scholar
  11. 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 LaboratoriesGoogle Scholar
  12. Fiacco AV, McCormick GP (1968) Nonlinear programming: sequential unconstrained minimization techniques. John Wiley, New YorkzbMATHGoogle Scholar
  13. Fourer R, Gay DM, Kernighan BW (2003) AMPL: a modeling language for mathematical programming, 2nd edn. Brooks/Cole–Thomson Learning, Pacific GroveGoogle Scholar
  14. Friedlander M, Orban D (2008) NLpy: nonlinear programming in python. Tech Rep, GERAD and École Polytechnique. http://nlpy.sourceforge.net/index.html
  15. Geem ZW, Kim JH, Loganathan GV (2001) A new heuristic optimization algorithm: harmony search. Simulation 76:60–68. doi: 10.1177/003754970107600201 CrossRefGoogle Scholar
  16. 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 CrossRefzbMATHMathSciNetGoogle Scholar
  17. Grant M, Boyd S (2010) CVX: Matlab software for disciplined convex programming, version 1.21. Tech Rep, http://cvxr.com/cvx
  18. 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 WorthGoogle Scholar
  19. Gray J, et al (2010b) OpenMDAO. http://openmdao.org/
  20. 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–221Google Scholar
  21. Hart W (2009) Operations research and cyber-infrastructure, vol 47. Springer, chap Python Optimization Modeling Objects (Pyomo), pp 3–19Google Scholar
  22. Hock W, Schittkowski K (1981) Test examples for nonlinear programming codes. Lecture notes in economics and mathematical systems, vol 187. SpringerGoogle Scholar
  23. Holmström K, Göran A, Edvall M (2010) User’s guide for TOMLAB 7. user’s manual, TOMLAB optimization. http://www.tomlab.biz
  24. Hong U, Hwang K, Park G (2004) A comparative study of software systems from the optimization viewpoint. Struct Multidisc Optim 27:460–468CrossRefGoogle Scholar
  25. 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 CrossRefGoogle Scholar
  26. Jansen P, Perez RE, Martins JRRA (2010) Aerostructural optimization of nonplanar lifting surfaces. J. Aircr 47(5):1490–1503. doi: 10.2514/1.44727 CrossRefGoogle Scholar
  27. 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 Google Scholar
  28. Jones E, Oliphant T, Peterson P, et al (2001) SciPy: open source scientific tools for Python. http://www.scipy.org/
  29. Kiwiel KC (1985) Methods of descent for nondifferentiable optimization. In: Lecture notes in mathematics, vol 1133. Springer–Verlag, BerlinGoogle Scholar
  30. 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, GermanyGoogle Scholar
  31. 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, SwitzerlandGoogle Scholar
  32. Kroshko DK (2010) OpenOpt. Tech Rep, http://openopt.org
  33. 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, AutriaGoogle Scholar
  34. Langtangen HP (2008) Python scripting for computational science, texts in computational science and engineering, vol 3, 3rd ed. SpringerGoogle Scholar
  35. Lawrence CT, Tits AL (1996) Nonlinear equality constraints in feasible sequential quadratic programming. Optim Methods Softw 6:265–282CrossRefGoogle Scholar
  36. Lawson CL, Hanson RJ (1974) Solving least square problems. Prentice-Hall, Englewood CliffsGoogle Scholar
  37. 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 CrossRefzbMATHGoogle Scholar
  38. Lofberg J (2004) YALMIP: A toolbox for modeling and optimization in MATLAB. In: CACSD conference. Taipei, TaiwanGoogle Scholar
  39. 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 CrossRefzbMATHMathSciNetGoogle Scholar
  40. 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
  41. Meza JC (1994) OPT+ +: an object oriented class library for nonlinear optimization. Technical Report SAND 1994-8225, Sandia National LaboratoriesGoogle Scholar
  42. 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 CrossRefGoogle Scholar
  43. Mitchell S (2009) puLP: an LP modeler in Python, documentation. User’s documentation, COIN-OR Foundation, Inc. https://www.coin-or.org/PuLP/
  44. 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
  45. Oliphant TE (2007) Python for scientific computing. Comput Sci Eng 9(3):10–20CrossRefGoogle Scholar
  46. Perez RE, Martins JRRA (2010) pyOpt. http://pyopt.org/
  47. Peterson P (2009) F2PY: a tool for connecting Fortran and Python programs. Int J Comput Sci Eng 4(4):296–305CrossRefGoogle Scholar
  48. Poon NMK, Martins JRRA (2007) An adaptive approach to constraint aggregation using adjoint sensitivity analysis. Struct Multidisc Optim 30(1):61–73CrossRefGoogle Scholar
  49. 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–67Google Scholar
  50. Rosenbrock HH (1960) An automatic method for finding the greatest or least value of a function. Comput J 3:175–184CrossRefMathSciNetGoogle Scholar
  51. Rosenthal RE (2008) GAMS—a user’s guide. Tech Rep, GAMS Development Corporation, WashingtonGoogle Scholar
  52. Schittkowski K (1986) NLPQL: a Fortran subroutine for solving constrained nonlinear programming problems. Ann Oper Res 5(2):485–500CrossRefMathSciNetGoogle Scholar
  53. Schittkowski K (1987) More test problems for nonlinear programming codes. Lecture notes in economics and mathematical systems, vol 282Google Scholar
  54. Schlüter M, Gerdts M (2009) The oracle penalty method. J Glob Optim 47(2):293–325. doi: 10.1007/s10898-009-9477-0 CrossRefGoogle Scholar
  55. 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–2229CrossRefzbMATHMathSciNetGoogle Scholar
  56. Shor N (1985) Minimization methods for non-differentiable functions. In: Springer series in computational mathematics, vol 3. Springer–Verlag, BerlinGoogle Scholar
  57. 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 CrossRefzbMATHMathSciNetGoogle Scholar
  58. Svanberg K (1995) A globally convergent version of MMA without linesearch. In: First World congress of structural and multidisciplinary optimization. Goslar, GermanyGoogle Scholar
  59. 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/
  60. Tedford NP, Martins JRRA (2010) Benchmarking multidisciplinary design optimization algorithms. Optim Eng 11(1):159–183CrossRefMathSciNetGoogle Scholar
  61. Vanderplaats GN (1973) CONMIN—a Fortran program for constrained function minimization. Technical Memorandum TM X-62282, NASA Ames Research Center, Moffett Field, CaliforniaGoogle Scholar
  62. 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 CrossRefGoogle Scholar
  63. Woodruff D, Watson JP, Hart W (2011) PySP: modeling and solving stochastic programs in Python. In: 12th INFORMS computing society conference. Monterey, CAGoogle Scholar
  64. Wrenn G (1989) An indirect method for numerical optimization using the Kreisselmeier–Steinhauser function. Contractor report NASA CR-4220, NASA Langley Research Center, HamptonGoogle Scholar
  65. Xu E (2009) pyIPOpt: an IPOPT connector to Python. User’s manual. http://code.google.com/p/pyipopt/
  66. 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–487CrossRefzbMATHMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag 2011

Authors and Affiliations

  • Ruben E. Perez
    • 1
  • Peter W. Jansen
    • 1
  • Joaquim R. R. A. Martins
    • 2
  1. 1.Department of Mechanical and Aerospace EngineeringRoyal Military College of CanadaKingstonCanada
  2. 2.Department of Aerospace EngineeringUniversity of MichiganAnn ArborUSA

Personalised recommendations