help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: qp() issues?


From: Juan Pablo Carbajal
Subject: Re: qp() issues?
Date: Wed, 7 Dec 2011 20:02:09 +0100

On Wed, Dec 7, 2011 at 7:21 PM, fork <address@hidden> wrote:
> I am (mostly) successfully using qp(), but I am running into a problem that I
> don't quite understand.  (I will try to explain in the abstract, and I am not
> cutting and pasting the code directly because there is too much going on to 
> see
> the problem directly.)
>
> (I am using Nit's 3.4.3 build on Windows.)
>
> I am trying to model having elements of my decision variable be decrease
> monotonically plus a little bit.  Let's say the optimization variable is x, 
> with
> x = [x1 x2 x3 x4], and I want x2<x1-.1, etc. So I write an inequality matrix
> like A_in=[-1 1 0 0] and A_ub=0; which gives me what I expect (x2<=x1).
> However, when I set A_ub=-.00001, qp() says the problem is infeasible.
>
> The actual decision variable is 86 elements long.   I have packed all the 
> other
> parameters of qp() with upper and lower bounds on all the elements of x and 
> some
> equality constraints to force parts of x to maintain constant relative
> proportions.  (I can imagine there being issues with all the constraints
> stomping on each other.)
>
> Does this issue ring any bells?  Am I making a mistake, or is this a bug?
>
> I am new to optimization, so (as always) feel free to point out the obvious.
>
> I looked at the OCT file, but I don't understand the algorithm enough to have
> anything to say about it (I know I still you owe you a new which() function, 
> and
> I can understand that...)
>
> Thanks again for great software.
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave

Hi,

First adisclaimer: I do not  use qp, but sqp for nonlinear problems,
yours look to be a linear one so it should be ok to use qp.

Do you know direct collocation methods?

If you can right the relation between your variables in the form of a
mapping, like

x(n+1) = x(n) - dx

then you can use equality constraints to enforce the difference. That
is if x is the current value of the  vector variable (of length n) you
want

x(2:n) - x(1:n-1) + dx = 0

I hope this helps

-- 
M. Sc. Juan Pablo Carbajal
-----
PhD Student
University of Zürich
http://ailab.ifi.uzh.ch/carbajal/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]