[Scipy-tickets] [SciPy] #1851: Non-negative variables for minimize function when using "slsqp" algorithm
SciPy Trac
scipy-tickets@scipy....
Mon Feb 25 06:32:44 CST 2013
#1851: Non-negative variables for minimize function when using "slsqp" algorithm
----------------------------+-----------------------------------------------
Reporter: prisz | Owner: dlaxalde
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: scipy.optimize | Version: 0.11.0
Keywords: |
----------------------------+-----------------------------------------------
Context:
I wanted to constrain the variables to be non-negative in an optimization
problem.
Summary:
This is an edge case bug with parameter "bounds" in function "minimize"
when using slsqp algorithm.
Details:
The documentation states that this can be done by giving a value to the
parameter 'bounds' so that it is "(min, max) pairs for each element in x,
defining the bounds on that parameter. Use None for one of min or max when
there is no bound in that direction"
Problem:
[(0.0, None),...] doesn't work, only [(0.00000001,None), ...] or [(0.0,
1e+99), ...] does.
The problem is caused by the line
https://github.com/scipy/scipy/blob/v0.11.0/scipy/optimize/slsqp.py#L319
which is inadequate for the edge case [(0.0, None),....]
--
Ticket URL: <http://projects.scipy.org/scipy/ticket/1851>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.
More information about the Scipy-tickets
mailing list