[SciPy-User] linear objective, non-linear constraint

Gustavo Goretkin gustavo.goretkin at gmail.com
Wed Nov 18 09:24:21 EST 2015


I have what is a linear program, except for a non-linear constraint of the
form
S^2 + C^2 = 1. The other constraints are linear, as is the objective.

I'm trying to use optimize.minimize interface and the SLSQP solver (which I
believe is the only solver that supports non-linear and equality
constraints), but I get

  status: 6
 success: False
    njev: 1
    nfev: 1
     fun: -0.0
       x: array([ 5.,  5.,  1.,  0.,  0.,  6.,  6.,  4.,  4.,  6.,
4.,  4.,  6.])
 message: 'Singular matrix C in LSQ subproblem'
     jac: array([-0., -0., -0., -0., -1., -0., -0., -0., -0., -0.,
-0., -0., -0.,  0.])
     nit: 1

Is this because the objective is not positive definite? Or is there
another reason?

I've looked below, but I don't see where in the fortan code that the
mode gets set to 6
https://github.com/scipy/scipy/blob/v0.16.1/scipy/optimize/slsqp/slsqp_optmz.f
https://github.com/scipy/scipy/blob/a9fb36bc44bad4bbd2c1a41cb43c6f10925b38ae/scipy/optimize/slsqp.py#L405
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20151118/8fdb51ea/attachment.html>


More information about the SciPy-User mailing list