modopt.optimize

modopt.optimize(prob, solver='SLSQP', **kwargs)[source]

Optimize given problem with the specified solver.

Only performant algorithms can be used with this function and is made available for users who are only interested in solving their optimization problems with solvers in the modOpt library. Developers of instructional algorithms are recommended to use Optimizer subclasses such as SLSQP, Newton, OpenSQP, etc. directly.

Parameters
probProblem or ProblemLite

The problem to be solved. Needs to be an instance of Problem or ProblemLite.

solverstr, default=’SLSQP’

The solver to be used. Available solvers are 'SLSQP', 'PySLSQP', 'COBYLA', 'BFGS', 'LBFGSB', 'NelderMead', 'COBYQA', 'TrustConstr', 'OpenSQP', 'SNOPT', 'IPOPT', 'CVXOPT', and 'ConvexQPSolvers'.

**kwargs

Additional keyword arguments to be passed to the solver.

Returns
dict

The results of the optimization.