Hi,
I want to know the CVX code for the following problem:
s & R are m-dimensional vector.

minimize (d) (d is a declared vector of dim m)
s.t
d>=0
s’=s+d
s’i>= 1+ s’j if Ri>Rj

Basically, i want to compare every element of s’ with every other element of s’, provided the condition on R holds.
Thanks

ADDED: Hi, There is no example as such in the CVX user guide. The problem is with the pairwise comparison part. I am trying to put the constraint that whenever Ri>Rj, the S’i>=1 +S’j. And this should happen for all i,j (i= 1…m, j=1…m). This constraint is extensively used in pairwise ranking algorithm. Is it possible to write this in CVX? Thanks

Hi,
There is no example as such in the CVX user guide. The problem is with the pairwise comparison part.
I am trying to put the constraint that whenever Ri>Rj, the S’i>=1 +S’j. And this should happen for all i,j (i= 1…m, j=1…m). This constraint is extensively used in pairwise ranking algorithm.
Is it possible to write this in CVX?
Thanks

I’m going to move your “answer” (which is not an answer, of course :P) to your text above, where it belongs. As the name implies, answer posts are reserved for answers to the original question. Comments are reserved for discussions like these.

Again, I need to ask, what have you tried? If Ri and Rj are constants then I see no reason why this would not work. If they are variables, then of course it will not work, as the model is not convex.