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 is supported right now.
-
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 is supported right now.
-
gradfunc
(dv_dict, func_dict)[source]¶ Function that evaluates and returns the gradient of the objective function and constraints. This function is passed to pyOpt’s Optimization object and is called from its optimizers.
Args: dv_dict : dict
Dictionary of design variable values.
func_dict : dict
Dictionary of all functional variables evaluated at design point.
Returns: sens_dict : dict
Dictionary of dictionaries for gradient of each dv/func pair
fail : int
0 for successful function evaluation 1 for unsuccessful function evaluation
-
objfunc
(dv_dict)[source]¶ Function that evaluates and returns the objective function and constraints. This function is passed to pyOpt’s Optimization object and is called from its optimizers.
Args: dv_dict : dict
Dictionary of design variable values.
Returns: func_dict : dict
Dictionary of all functional variables evaluated at design point.
fail : int
0 for successful function evaluation 1 for unsuccessful function evaluation
-