Path: news.mathworks.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!news.mathforum.org!not-for-mail
From: Torsten Hennig <Torsten.Hennig@umsicht.fhg.de>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Which to use (quadprog or fmincon)?
Date: Mon, 15 Dec 2008 02:44:27 EST
Organization: The Math Forum
Lines: 88
Message-ID: <9303149.1229327097884.JavaMail.jakarta@nitrogen.mathforum.org>
References: <Xns9B72911B0AAD8ejhericholtmamcom@216.168.3.30>
NNTP-Posting-Host: nitrogen.mathforum.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: support1.mathforum.org 1229327097 19829 144.118.30.135 (15 Dec 2008 07:44:57 GMT)
X-Complaints-To: news@news.mathforum.org
NNTP-Posting-Date: Mon, 15 Dec 2008 07:44:57 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:507005


> 
> OK, here's a re-formulation of a question I asked
> earlier
> today:
> 
> What's the best way to solve this problem:
> 
> Minimize:  c1 x1 + q1*x1*x1 + c2 x2 + q2*x2*x2 . . .
> 
> (I have about 3,000 x variables)
> 
> Subject to:
> many constraints like 
> 
> x1 <= 40;
> x1 + x2 = 7;
> 
> all x >=0;
> 
> Now, I know a few things about this problem:
> 
> 1) It's quadratic.
> 2) The Hessian is sparse, and well structured (only
> entries
> on the diagonal
> 3) all variables are >= 0.
> 
> 
> I'd like to use quadprog, but it seems like that's
> not
> feasible, as if I use the problem as stated, it will
> use
> the medium scale, which uses a dense Hessian, which
> will
> kill performance.
> 
> If I want to use the large-scale, I can re-write my
> constraints:
> 
> x1 <= 40;  becomes  x1 + slack1 = 40, etc, etc.  But
> the docs for the large scale say that I if I use the
> Aeq and beq entries, I can't pass bounds.  So how do
> I limit my xs and slacks to be >=0?
> 
> Also, the large-scale docs imply that I cannot have
> more
> constraints than variables, which means that if every
> x has an absolute upper bound (i.e. x1 <= 40), that
> blows all my rows, and I don't have enough left to do
> 
> the linear combinations.
> 
> It seems like I must be mis-understanding something
> about
> quadprog, because it seems like my problem is perfect
> for a structured approach (I can compute Hx quickly,
> etc, 
> etc).
> 
> If I want to stick with MATLAB (and not NAG, or
> TOMLAB),
> am I reduced to using fmincon, which seems like
> overkill,
> even though it does have the advantage that I can
> pass
> in arbitrary numbers of constraints, and gradients
> and
> such, since I know all that information?
> 
> 
> 
> 
> Thanks for any clues,
> 
> 
> Eric 


The following link might be interesting for you:

http://plato.asu.edu/sub/nlores.html

Here a list of codes for the solution of quadratic
programming problems is given.
Especially notice the link to the MATLAB code called MINQ.

Best wishes
Torsten.