fmin_slsqp(func, x0, eqcons=(), f_eqcons=None, ieqcons=(), f_ieqcons=None, bounds=(), fprime=None, fprime_eqcons=None, fprime_ieqcons=None, args=(), iter=100, acc=1e-06, iprint=1, disp=None, full_output=0, epsilon=1.4901161193847656e-08, callback=None)
Python interface function for the SLSQP Optimization subroutine originally implemented by Dieter Kraft.
Exit modes are defined as follows :
-1 : Gradient evaluation required (g & a) 0 : Optimization terminated successfully 1 : Function evaluation required (f & c) 2 : More equality constraints than independent variables 3 : More than 3*n iterations in LSQ subproblem 4 : Inequality constraints incompatible 5 : Singular matrix E in LSQ subproblem 6 : Singular matrix C in LSQ subproblem 7 : Rank-deficient equality constraint subproblem HFTI 8 : Positive directional derivative for linesearch 9 : Iteration limit reached
Objective function. Must return a scalar.
Initial guess for the independent variable(s).
A list of functions of length n such that eqcons[j](x,*args) == 0.0 in a successfully optimized problem.
Returns a 1-D array in which each element must equal 0.0 in a successfully optimized problem. If f_eqcons is specified, eqcons is ignored.
A list of functions of length n such that ieqcons[j](x,*args) >= 0.0 in a successfully optimized problem.
Returns a 1-D ndarray in which each element must be greater or equal to 0.0 in a successfully optimized problem. If f_ieqcons is specified, ieqcons is ignored.
A list of tuples specifying the lower and upper bound for each independent variable [(xl0, xu0),(xl1, xu1),...] Infinite values will be interpreted as large floating values.
A function that evaluates the partial derivatives of func.
A function of the form :None:None:`f(x, *args)`
that returns the m by n array of equality constraint normals. If not provided, the normals will be approximated. The array returned by fprime_eqcons should be sized as ( len(eqcons), len(x0) ).
A function of the form :None:None:`f(x, *args)`
that returns the m by n array of inequality constraint normals. If not provided, the normals will be approximated. The array returned by fprime_ieqcons should be sized as ( len(ieqcons), len(x0) ).
Additional arguments passed to func and fprime.
The maximum number of iterations.
Requested accuracy.
The verbosity of fmin_slsqp :
Overrides the iprint interface (preferred).
If False, return only the minimizer of func (default). Otherwise, output final objective function and summary information.
The step size for finite-difference derivative estimates.
Called after each iteration, as callback(x)
, where x
is the current parameter vector.
The final minimizer of func.
The final value of the objective function.
The number of iterations.
The exit mode from the optimizer (see below).
Message describing the exit mode from the optimizer.
Minimize a function using Sequential Least Squares Programming
minimize
Interface to minimization algorithms for multivariate functions. See the 'SLSQP' :None:None:`method`
in particular.
Examples are given in the tutorial <tutorial-sqlsp>
.
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them