[FlopCpp] I've a problem with Flopc++

Andrea Rossi icecream8900 at live.com
Fri Jan 4 07:52:56 EST 2013


Hello,
I'm a italian student and I'm coding a project for University Logistic course.
My problem is how code the attached constraint (constraint.jpg) of my logistic model in Flopc++ .I have written this code.
    MP_set Levels(n);
    MP_set Sheets(n);
    MP_binary_variable y(Sheets);
    MP_binary_variable x(Levels, Sheets);
    MP_index i, j, s;
    MP_subset<2> ls ( Levels, Sheets );
    
    MP_constraint cTwo( Sheets );
    cTwo( Sheets ) =
         sum( ls(i, j).such_that( j > i ), x(i, j)) + y( Sheets ) == 1;

Thank you.

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/flopcpp/attachments/20130104/4043f69d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: constraint.jpg
Type: image/jpeg
Size: 22675 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/flopcpp/attachments/20130104/4043f69d/attachment-0001.jpg>


More information about the FlopCpp mailing list