Hi, I am using solve.QP (from quadprog) to solve a standard quadratic programming problem: min_w -0.5*w'Qw st ... I would like solve.QP to do two things: 1) to start the optimization from a user-supplied initial condition; i.e., from a vector w_0 that satisfies the constraints, and 2) to return the values of the lagrange multiplieres associated with the constraints. I did not find an obvious way in help(solve.QP). Any thoughts? Thanks. Jorge [[alternative HTML version deleted]]
>From: Jorge Aseff <jgaseff at gmail.com> >Date: 2008/02/15 Fri PM 04:51:16 CST >To: r-help at r-project.org >Subject: [R] Quadratic ProgrammingAdrian Trapletti has a function in his tseries package ( the name of the function escapes me ) that uses the solve.QP solver to model some kind of quadratic portfolio problem. I don't remember if it does exactly what you want but take a look at tseries because it's in there and it may be of help to you. Mark>Hi, > >I am using solve.QP (from quadprog) to solve a standard quadratic >programming problem: min_w -0.5*w'Qw st ... I would like solve.QP to do two >things: 1) to start the optimization from a user-supplied initial >condition; i.e., from a vector w_0 that satisfies the constraints, and 2) to >return the values of the lagrange multiplieres associated with the >constraints. I did not find an obvious way in help(solve.QP). Any thoughts? > >Thanks. > >Jorge > > [[alternative HTML version deleted]] > >______________________________________________ >R-help at r-project.org mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code.
G'day Jorge, On Fri, 15 Feb 2008 17:51:16 -0500 "Jorge Aseff" <jgaseff at gmail.com> wrote:> I am using solve.QP (from quadprog) to solve a standard quadratic > programming problem: min_w -0.5*w'Qw st ... I would like solve.QP to > do two things: 1) to start the optimization from a user-supplied > initial condition; i.e., from a vector w_0 that satisfies the > constraints,Not possible. solve.QP is based on the Goldfarb-Idnani algorithm which first calculates the unconstrained solution of the problem and then checks for violated constraints; if such exist, then they are iteratively enforced until all constraints are satisfied. If you want to specify starting values (or have warm starts), then you would need to use other kind of algorithms.> and 2) to return the values of the lagrange multiplieres > associated with the constraints.See: https://stat.ethz.ch/pipermail/r-devel/2007-December/047636.html Hope this helps. Best wishes, Berrwin =========================== Full address ============================Berwin A Turlach Tel.: +65 6516 4416 (secr) Dept of Statistics and Applied Probability +65 6516 6650 (self) Faculty of Science FAX : +65 6872 3919 National University of Singapore 6 Science Drive 2, Blk S16, Level 7 e-mail: statba at nus.edu.sg Singapore 117546 http://www.stat.nus.edu.sg/~statba