Declaring large number of variables in JuMP

Hi people,

Is it expected for this code to utilize such a significant amount of memory, given the following Julia code that defines variables within a JuMP optimization model?

using JuMP, CPLEX
m = Model(CPLEX.Optimizer)
@variable(m, x[1:1000, 1:1000, 1:6, 1:60])

Is there anything that I could do to try to solve this version of the problem with this amount of variables?

1 Like

So this has 6 * 60 * 1000^2 = 360,000,000 i.e. 3.6 x 10^8 variables (and this even without constraints!).

To quote Oscar:

There is not much to say without a model formulation (and unlikely to be solvable without a commercial solver and a lot more RAM in your machine.)

1 Like