I am having issues with adding the below constraint using sum_expr and an index dependent on outside variables. It seems that when computing the choices of w, it isn't able to call the current choices for v, j, and k. Note that s[j,k] is an external data matrix.
Hello,
I am having issues with adding the below constraint using sum_expr and an index dependent on outside variables. It seems that when computing the choices of w, it isn't able to call the current choices for v, j, and k. Note that s[j,k] is an external data matrix.
add_constraint(sum_expr(sum_expr(b[j,k]*z[r,d,k,v,j,w], w=1:( v-s[j,k])), j=1:2) >= a[r,d,k,v]-u[r,d,k,v], r=1:2, d=1:2,k=1:2, v=1:10)
Is there an existing solution to this? Or do I just need to rewrite this formulation? If so, any suggestions would be appreciated!