ConstraintSolver.jl icon indicating copy to clipboard operation
ConstraintSolver.jl copied to clipboard

1D element constraint for variable arrays

Open Wikunia opened this issue 5 years ago • 0 comments

This is the third of several issues for the element constraint. (See #196 and #197 ) It's also the more formal issue for #195 and #164

It would be great to index variable 1D arrays with a variable like:

@variable(m, 1 <= c[1:7] <= 10, Int)
@variable(m, 1 <= idx <= 7, Int)
@constraint(m, c[idx] == 5)

Wikunia avatar Dec 05 '20 16:12 Wikunia