'Multi Dimensional Binary Decision Variable in CPLEX

I am trying to write a binary decision variable with 4 dimensions in CPLEX. The DV is X[i][j][k][d] it is 1 if vehicle v which started the route at depot d goes to node j from node i. When I write it as dvar boolean X[i in S][j in S][k in K][d in M]; but then it gives a solution like [[[0,0]][[0,1]][[0,0]]] and the objective function is 0.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source