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. Note: only SNOPT and SLSQP are currently supported.

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(‘SNOPT’)

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.