[Top][All Lists]

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

qp(): how do I get a simple inequality constraint?

From: forkandwait
Subject: qp(): how do I get a simple inequality constraint?
Date: Thu, 22 Sep 2011 20:28:45 +0000 (UTC)
User-agent: Loom/3.14 (

Hi all,

I am trying to use qp to do an example in Caswell's Matrix Population Models
2001 (p147).  (I also know very little about optimization, so please bear with

Octave's qp seems to have different parameters than either ML's quadprog or
Caswell's 2001 version of qp.  Since I don't really know what is going on, I am
trying to work the example "formally".

Here is the set up.  The problem in Caswell is posed as:

min (p'*G*p)/2 + f'*p

subject to C*p <= b

In his sample code to qp (with no initial guess of x0), that is written as:

p = qp(G, f, C, b)

However the Octave documentation states that with qp(X0,H,Q,A,B), A*x = b --
i.e. that A and b define an EQUALITY constraint, not an inequality constraint.

How do I get an inequality constraint like Caswell's, and make sure not to have
any equality constraints?  Do I use A_LB and set the other parameters == []?

Thanks for any help!

reply via email to

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