s="comment">%       minimize     u(k) - u(0)</span>
<span class="comment">%       subject to   g_i  &gt;= 0</span>
<span class="comment">%                    u(j) &lt;= u(i) + g_i^T(a_j - a_i), for all i,j</span>
<span class="comment">%                    u(i) &gt;= u(j), for all (i,j) in Pweak</span>
<span class="comment">%</span>
<span class="comment">% and:</span>
<span class="comment">%       maximize     u(k) - u(0)</span>
<span class="comment">%       subject to   g_i  &gt;= 0</span>
<span class="comm