How to build a constraint with summation?

@chisquared

The error that appears is exactly this BoundsError: attempt to access 8-element Array{Int64,1} at index [1,5]