SETS:

slots:x,b,c;

mat(slots,slots)|((&1#LE#(&2+tt-1))#AND# (&1#GE#&2)) #OR# ((&1#LE#&2+tt-1-slotnumb)   );

ENDSETS

DATA:

tt=5;

slotnumb=12;
slots=1..slotnumb;

!b=  2   2 3 4 4 4 5 7 8 9 9 10
   11 11 12 9 8 8 7 5 4 4 3 2 ;

!c= 5 4 4 3 3 3 2 2 1 1 1 1
   1 1 2 2 2 2 2 3 4 4 5 5;
b= 7 7 7 7 7 7 7 7 7 7 7 7 ;
c= 1 1 1 1 1 1 1 1 1 1 1 1 ;

ENDDATA

MIN=@SUM(slots:c*x);

@FOR(slots(i): [v] @SUM(mat(i,j): x(j)) > b(i) );  

!vincolo da aggiungere dopo la prima esecuzione;
!@SUM(slots: x) = 17;