Hello,
I have a problem to add an adjacency constraints to my model.
I have an adjacency matrices in dat. file is like that:
param adjacent
S48 S48 0,
S12 S48 0,
S74 S48 1,
S57 S48 0,
S27 S48 0,
S45 S48 0,
S84 S48 1, and so on.
In the main model
set S;
/* stands */
set P;
/* periods */
param adjacent{m in S, n in S} default 0 ;
var x{s in S, p in P} binary;
subject to adjacency{i in S, p in P}: sum{k in S} adjacent[i,k] * x[k,p] <= 1;
then i calculate the main function. however adjacency constraints does not work somehow. I didnt find anything else to improve it. could you please help me to find out what I am doing wrong and how i can fix it?