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

Add inexplicit indexing warning when adding constraints #937

Closed
jac0320 opened this issue Jan 13, 2017 · 1 comment
Closed

Add inexplicit indexing warning when adding constraints #937

jac0320 opened this issue Jan 13, 2017 · 1 comment

Comments

@jac0320
Copy link

jac0320 commented Jan 13, 2017

So I was using a 3-dimensional variable, when adding constraints, I use the sum() generator and gave an explicit indexing with two indices, it automatically assumed the third index to be 1. It could be challenging in debugging the model especially when a complex variable is given.

Do you think it is necessary to have a warning message to notify users for implied index?

julia> @variable(m, x[1:5,1:5,1:10], Bin);

julia> @constraint(m, sum(x[i,j] for i=1:3, j=1:2)>=4)
x[1,1,1] + x[1,2,1] + x[2,1,1] + x[2,2,1] + x[3,1,1] + x[3,2,1] ≥ 4

Thanks.

@mlubin
Copy link
Member

mlubin commented Jan 13, 2017

Thanks for the report. This is a duplicate of #653 which goes back to an upstream issue in Julia.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants