Hello, I'm writing the following code for the problem attached in the photo (I've taken v(S)=2) and I'm getting an error. Can someone help me?
param n:=7;
param m:=2;
set V := 1..n;
set Vprima := 2..n;
set A := {(i,j) in V cross V : i < j};
set NOT := {(i,j) in Vprima cross Vprima : i != j};
param c{1..n,1..n};
set S := 0 .. n - 1;
set SS := 0 .. 2**n - 1;
set POW {k in SS} := {i in S: (k div 2**i) mod 2 = 1};
let c[1,2]:=1;
let c[1,3]:=6;
let c[1,4]:=2;
let c[1,5]:=2;
let c[1,6]:=5;
let c[1,7]:=1;
let c[2,3]:=2;
let c[2,4]:=6;
let c[2,5]:=2;
let c[2,6]:=8;
let c[2,7]:=9;
let c[3,4]:=1;
let c[3,5]:=6;
let c[3,6]:=6;
let c[3,7]:=9;
let c[4,5]:=8;
let c[4,6]:=10;
let c[4,7]:=11;
let c[5,6]:=2;
let c[5,7]:=4;
let c[6,7]:=1;
var x{Vprima,Vprima}, binary;
minimize Costo: sum{(i,j) in A} c[i,j] * x[i,j];
subject to R0 {j in V}:
x[1, j] in {0, 1, 2};
subject to R1: sum{j in 2..n} x[1, j] = 2 * m;
subject to R2 {k in 2..n}:
sum{(i,j) in A} x[i, k] + sum{(i,j) in A} x[k, j] = 2;
subject to R3:
sum{i in S, j in S} x[i, j] <= card(S) - 2;
Thanks!!!