octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #47314] optim package: quadprog() equality con


From: Ray Zimmerman
Subject: [Octave-bug-tracker] [bug #47314] optim package: quadprog() equality constraints have opposite sign
Date: Fri, 25 Mar 2016 14:18:45 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/601.5.17 (KHTML, like Gecko) Version/9.1 Safari/601.5.17

Follow-up Comment #8, bug #47314 (project octave):

I don't know why you say that lambda's should be inherently non-negative. That
is certainly true for inequality constraints, but if you have a set of
equality constraints you can have some multipliers negative and others
positive ... and yes, the sign is significant.

For example, in my application, in power systems, these lambdas refer to the
nodal prices of energy in a power grid. These prices can be positive at some
nodes, while negative at others ... and it matters that I be able to know
which ones are which. So, to answer your question ... yes, I do need these
lambdas for something and their signs do matter.

For an equality constraint, such as A*x = b, it can be implemented as either
...

 A * x =  b, or
-A * x = -b

Both are correct and yield lambdas of opposite signs. One simply needs to pick
a convention. Currently, quadprog in Octave and quadprog in Matlab have chosen
opposite conventions. So, currently I have to check whether I'm calling
quadprog from Matlab or quadprog from Octave and either swap the sign on the
constraints or swap the sign on the lambda to get consistent answers.

In my view, this is purely a question of Matlab compatibility and not a
question of correctness. Both are correct. There is no value to having them
behave differently. There is value to having them behave identically.

My 2 cents.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47314>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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