SETS:

vec:c;
pointset:u,y,s;
mat(pointset,vec):A;
diagmat(pointset,pointset)|&1#EQ#&2:D;

ENDSETS

DATA:

pointnumber=100;
pointset=1..pointnumber;

dim=2;
vec=1..dim;

!A=
3 3
3 4
2 2
3 1
4 3
;

!D= 1  1 1 -1 -1;

A=95, 89, 53, 84, 60, 96, 34, 79, 31, 64, 14, 43, 
  32, 68, 60, 55, 74, 84, 53, 36, 50, 39, 38, 61, 
  70, 91, 55, 61, 40, 94, 33, 80, 64, 85, 35, 82, 
  59, 39, 80, 67, 50, 81, 79, 96, 
  6, 64, 49, 79, 55, 41, 25, 76, 48, 97, 70, 64, 54, 61, 
    48, 100, 7, 55, 16, 45, 70, 79, 11, 100, 85, 77, 69, 67, 
  90, 85, 90, 73, 64, 72, 68, 83

88, 56, 31, 23, 99, 77, 39, 27, 
  66, 8, 70, 27, 93, 20, 37, 16, 85, 18, 4, 7, 70, 40, 
    44, 5, 28, 11, 17, 14, 62, 31, 98, 5, 38, 5, 28, 18, 45, 
  4, 92, 58, 59, 33, 51, 5, 44, 38, 52, 5, 65, 9, 
    100, 55, 65, 44, 16, 19, 93, 50, 49, 8, 93, 19, 
    54, 7, 87, 28, 11, 31, 28, 3, 22, 42, 
  84, 7, 37, 40, 91, 40, 76, 36, 44, 52, 76, 11, 36, 22, 20, 
35, 91, 57, 84, 35, 35, 51, 64, 17, 52, 6, 16, 
  31, 20, 34, 85, 12, 34, 52, 25, 38, 38, 
    9, 85, 5, 76, 19, 34, 30, 6, 19, 48, 27
;

D=1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1;

alfa=100;

ENDDATA

min=alfa*@SUM(pointset:y)+@SUM(pointset:s);

@FOR(pointset(k):[supp]
 D(k,k)*(@SUM( mat(k,h): 
             @SUM(mat(j,h):
                  @SUM( pointset(j): 
                        A(k,h)*A(j,h)*D(j,j)*u(j)
                       )    
                  ) 
             )   -gamma 
          ) + y(k)  > 1
);

@FOR(pointset(k):
 @FREE(u(k));
 u(k) < s(k);
u(k) > -s(k)
);

@FOR(vec(i):c(i) =   @SUM( mat(k,i  ): A(k,i)*D(k,k)* u(k)   );@FREE(c(i))
);

@FREE(gamma);