Dear there,<br><br>I am wondering how to express this constraint in flopcpp:<br>const int L = 3;<br>MP_set K(L);<br>MP_variable z(K);<br>Mp_variable x(K);<br>MP_constraint balance(K);<br><br>and here is the constraint in question:<br>
for k=1,...,K, balance(k):<br>z(k) = sum_{i=1}^k ( k - i ) * x(i);<br><br>The problem is that FlopC++ doesn&#39;t seem to allow MP_set in direct computation (k - i). <br><br>Sincerely Yours,<br>Michael<br><br><br><br clear="all">
<br>-- <br>Best regards,<br>Michael Chen<br><br>