Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2D element constraint for constant arrays #197

Open
Wikunia opened this issue Dec 5, 2020 · 0 comments
Open

2D element constraint for constant arrays #197

Wikunia opened this issue Dec 5, 2020 · 0 comments
Labels

Comments

@Wikunia
Copy link
Owner

Wikunia commented Dec 5, 2020

This is the second of several issues for the element constraint. (See #196 )

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

c = rand(1:100, (5, 5))
@variable(m, 1 <= idx <= 5, Int)
@variable(m, 1 <= idy <= 5, Int)
@constraint(m, c[idx, idy] == 5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant