We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
using JuMP model = Model() @variable(model, x[1:10][1:5])
results in
5-element Vector{VariableRef}: x[1] x[2] x[3] x[4] x[5]
... so the outer dimension is "lost". Should this be diagnosed?
Perhaps the intended behavior is
using JuMP model = Model() x = [@variable(model, [1:5], base_name="x[$i]") for i in 1:10]
I encountered this when creating a 3-dimensional variable, which is a vector of symmetrical 2D matrixes:
x = [@variable(model, [1:5,1:5], base_name="x[$f]", Symmetric, Bin) for f in 1:10]
The text was updated successfully, but these errors were encountered:
@variable(model, x[1:10][1:5])
This is not valid JuMP syntax.
We should throw an error instead of silently dropping the [1:10]
[1:10]
Sorry, something went wrong.
Fix is #3756
This is the recommended syntax:
@odow thank you!
Successfully merging a pull request may close this issue.
results in
... so the outer dimension is "lost".
Should this be diagnosed?
Perhaps the intended behavior is
I encountered this when creating a 3-dimensional variable, which is a vector of symmetrical 2D matrixes:
The text was updated successfully, but these errors were encountered: