You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.
Sorry if this is not clear. I just wanted to make a note of this before I forget it completely. I'll revert tomorrow if it's not clear. This isn't a bug (well...). Just an inconsistency I thought I'd feedback.
The LinearConstraintCollection and GoldfarbIdnani are inconsistent in their approach to constraints.
GoldfarbIdnani uses assumes a matrix-vector constraint set where the first n are equality constraints and the remainder are GreaterThanOrEqualTo.
However the LinearConstraintMatrix.FromMatrix() method has an identical API, takes the first n to be equality constraints BUT takes the remainder to be LessThanOrEqualTo.
This behaviour is not consistent and not documented so it's very difficult for a user to spot this inconsistency (it took me a long time to figure out where my code was going wrong today). I haven't checked the repercussions of this but my instinct tells me the FromMatrix() method should change to be consistent with the convention of GoldfarbIdnani. If they're not self-consistent then I'm not really clear what purpose the FromMatrix method is serving.
Thanks,
Alex
The text was updated successfully, but these errors were encountered:
Almost sure this is a bug, and thank you very much for catching that. According to QuadProg's documentation, the constraints are indeed in the form A^T b >= b0 and therefore should have been interpreted as such.
The FromMatrix method was mostly being used to check constant violations from the existing unit tests, and they are not used in the main body of any of the optimization methods. I think it should be safe to change them directly.
Hi @cesarsouza,
Sorry if this is not clear. I just wanted to make a note of this before I forget it completely. I'll revert tomorrow if it's not clear. This isn't a bug (well...). Just an inconsistency I thought I'd feedback.
The LinearConstraintCollection and GoldfarbIdnani are inconsistent in their approach to constraints.
GoldfarbIdnani uses assumes a matrix-vector constraint set where the first n are equality constraints and the remainder are GreaterThanOrEqualTo.
However the LinearConstraintMatrix.FromMatrix() method has an identical API, takes the first n to be equality constraints BUT takes the remainder to be LessThanOrEqualTo.
This behaviour is not consistent and not documented so it's very difficult for a user to spot this inconsistency (it took me a long time to figure out where my code was going wrong today). I haven't checked the repercussions of this but my instinct tells me the FromMatrix() method should change to be consistent with the convention of GoldfarbIdnani. If they're not self-consistent then I'm not really clear what purpose the FromMatrix method is serving.
Thanks,
Alex
The text was updated successfully, but these errors were encountered: