Optimizer
- class pyoptsparse.pyOpt_optimizer.Optimizer(*args, **kwargs)[source]
This is the base optimizer class that all optimizers inherit from. We define common methods here to avoid code duplication.
- Parameters:
- namestr
Optimizer name
- categorystr
Typically local or global
- defaultOptionsdictionary
A dictionary containing the default options
- informsdict
Dictionary of the inform codes
- getInform(infocode=None)[source]
Get optimizer result inform code at exit
- Parameters:
- infocodeint
Integer information code
- pyoptsparse.pyOpt_optimizer.OPT(optName, *args, **kwargs)[source]
This is a simple utility function that enables creating an optimizer based on the ‘optName’ string. This can be useful for doing optimization studies with respect to optimizer since you don’t need massive if-statements.
- Parameters:
- optNamestr or enum
Either a string identifying the optimizer to create, e.g. “SNOPT”, or an enum accessed via
pyoptsparse.Optimizers
, e.g.Optimizers.SNOPT
.- *args, **kwargsvaries
Passed to optimizer creation.
- Returns:
- optpyOpt_optimizer inherited optimizer
The desired optimizer