[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Core function SQP
From: |
Olaf Till |
Subject: |
Re: Core function SQP |
Date: |
Mon, 1 Aug 2011 12:39:42 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Tue, Jul 26, 2011 at 02:43:10PM +0200, Juan Pablo Carbajal wrote:
> Hi,
> I have a question regarding the use of sqp.m in octave 3.5.0+
>
> He example in the help works fine, but if we add inequalities
> constraints it fails (or I do not know how to specify them)
> The code is below
>
> function r = g (x)
> r = [ sumsq(x)-10;
> x(2)*x(3)-5*x(4)*x(5);
> x(1)^3+x(2)^3+1 ];
> endfunction
>
> function obj = phi (x)
> obj = exp(prod(x)) - 0.5*(x(1)^3+x(2)^3+1)^2;
> endfunction
>
> function l = h(x)
> l = 1 - x.^2;
> endfunction
>
> x0 = [-1.8; 1.7; 1.9; -0.8; -0.8];
>
> [x, obj, info, iter, nf, lambda] = sqp (x0, @phi, @g, @h)
> error: sqp: operator *: nonconformant arguments (op1 is 5x10, op2 is 0x0)
> error: called from:
> error: sqp.m at line 472, column 9
>
> As far as I can understand, qp returns empty LAMBDA vector when the
> solution is not feasible. This condition is not being checked in sqp
> and LAMBDA is used when it is empty.
>
> Any suggestion?
>
> Thanks
>
> --
> M. Sc. Juan Pablo Carbajal
> -----
> PhD Student
> University of Zürich
> www.ailab.ch/carbajal
Hi Juan Pablo,
I'm moving this thread to an Octave list, since it is unrelated to
Octave Forge.
You've seen a known problem. It seems that knowbody had an idea as yet
how to recover from the situation of qp returning an empty lambda,
i.e. problem not feasible. In the meantime, one could at least make
sqp abort in this case. But this would only make the error message a
bit more specific for you ...
Olaf
- Re: Core function SQP,
Olaf Till <=