Closed LebedevRI closed 1 month ago
@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]
Fix is https://github.com/jump-dev/JuMP.jl/pull/3756
This is the recommended syntax:
using JuMP
model = Model()
x = [@variable(model, [1:5], base_name="x[$i]") for i in 1:10]
@odow thank you!
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: