[SciPy-user] Problem with NLP in OpenOpt

Dark Wind darkwind.87@gmail....
Thu Nov 15 02:56:06 CST 2007


I am using NLP of OpenOpt to solve a NonLinear programming problem. I
am using scipy_cobyla solver.
The initial point that I have provided is feasible, but I am getting a message:
starting solver scipy_cobyla (license: BSD )  with problem  unnamed
solver scipy_cobyla has finished solving the problem unnamed
istop:  -100
Solver:   Time Elapsed = 0.75 	CPU Time Elapsed = 0.750110139697
NO FEASIBLE SOLUTION is obtained (max residual = 1.29567664921e-005)

All other solvers cannot take h constraint and some others require
extra additions.

Following is my code:
from scikits.openopt import NLP

f = lambda x: 1*x[0] + 7*x[5] + 3*x[10] + 8*x[15]
x0 = [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]


h1 = lambda x: x[0]**2 + x[1]**2 + x[2]**2 + x[3]**2 -1
h2 = lambda x: x[0]*x[4]+x[1]*x[5]+x[2]*x[6]+x[3]*x[7]
h3 = lambda x: x[0]*x[8]+x[1]*x[9]+x[2]*x[10]+x[3]*x[11]
h4 = lambda x: x[0]*x[12]+x[1]*x[13]+x[2]*x[14]+x[3]*x[15]
h5 = lambda x: x[4]**2+x[5]**2+x[6]**2+x[7]**2-1
h6 = lambda x: x[4]*x[8]+x[5]*x[9]+x[6]*x[10]+x[7]*x[11]
h7 = lambda x: x[4]*x[12]+x[5]*x[13]+x[6]*x[14]+x[7]*x[15]
h8 = lambda x: x[8]**2+x[9]**2+x[10]**2+x[11]**2-1
h9 = lambda x: x[8]*x[12]+x[9]*x[13]+x[10]*x[14]+x[11]*x[15]
h10 = lambda x: x[12]**2+x[13]**2+x[14]**2+x[15]**2-1



The initial value x0 satisfies the constraints hi's but i am still
getting that there is no feasible solution.

Can anyone help me with this?

Thank you

More information about the SciPy-user mailing list