pyoptsparse_driver.py

OpenMDAO Wrapper for pyoptsparse. pyoptsparse is based on pyOpt, which is an object-oriented framework for formulating and solving nonlinear constrained optimization problems, with additional MPI capability. Note: only SNOPT and SLSQP are currently supported.

class openmdao.drivers.pyoptsparse_driver.pyOptSparseDriver[source]

Bases: openmdao.core.driver.Driver

Driver wrapper for pyoptsparse. pyoptsparse is based on pyOpt, which is an object-oriented framework for formulating and solving nonlinear constrained optimization problems, with additional MPI capability. pypptsparse has interfaces to the following optimizers: ALPSO, CONMIN, FSQP, IPOPT, NLPQLP, NSGA2, PSQP, SLSQP, SNOPT, NLPY_AUGLAG, NOMAD. Note that some of these are not open source and therefore not included in the pyoptsparse source code.

pyOptSparseDriver supports the following:

equality_constraints

inequality_constraints

two_sided_constraints

Options:

options[‘exit_flag’] : int(0)

0 for fail, 1 for ok

options[‘optimizer’] : str(‘SLSQP’)

Name of optimizers to use

options[‘print_results’] : bool(True)

Print pyOpt results if True

options[‘pyopt_diff’] : bool(True)

Set to True to let pyOpt calculate the gradient

options[‘title’] : str(‘Optimization using pyOpt_sparse’)

Title of this optimization run

run(problem)[source]

pyOpt execution. Note that pyOpt controls the execution, and the individual optimizers (i.e., SNOPT) control the iteration.

Args:

problem : Problem

Our parent Problem.