SETS:
 
nodi/1..18/:x,c;
 
arc(nodi,nodi)
/  1, 3, 1, 5, 1, 13, 1, 18, 2, 8, 2, 11, 2, 13, 2, 14, 3, 5, 3, 7, 3, 9, 3, 
 11, 3, 15, 3, 16, 3, 18, 4, 8, 4, 9, 4, 10, 4, 11, 4, 14, 4, 15, 5, 11, 5, 
 13, 5, 16, 5, 17, 5, 18, 6, 12, 6, 14, 6, 15, 7, 10, 7, 11, 7, 12, 8, 9, 8, 
 11, 8, 13, 8, 14, 10, 12, 10, 18, 11, 12, 12, 13, 12, 17, 13, 18, 14, 17, 
 16, 18 
/;
 
ENDSETS
 
DATA:
c=
5 3 2 4 7 6 12 10 3 5 
3 4  2 11 7 9 10 15  ;
 
 
ENDDATA
 
min=@SUM(nodi:c*x);
 
@FOR(arc(i,j):x(i)+x(j) > 1 );
 
 !@FOR(nodi:@GIN(x));