I'm having some trouble modeling this constraint in Julia
right now I have
for k=1:v
for j = 2:nodes
@constraint(model,sum(x[i,j,k] for i=1:nodes) == sum(x[j,i,k] for i=1:n))
end
end
where nodes is the customer set, n includes the depot and the depot clone. K is the number of vehicles, i is the start node and j is the end node.
I am not sure that you asked a real question but here is how I would model this constraint in julia :
If you are not in a complete graph, be sure that you have well defined your variable x[i, j, k] so that it is equal to 0 when there is no arc between i and j.