# Declaring large number of variables in JuMP

**URL:** https://discourse.julialang.org/t/declaring-large-number-of-variables-in-jump/105214
**Category:** Optimization (Mathematical)
**Tags:** jump
**Created:** [October 20, 2023, 4:56am UTC](https://discourse.julialang.org/t/declaring-large-number-of-variables-in-jump/105214 "2023-10-20T04:56:00Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![jd-foster](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jd-foster/32/35824_2.png) [@jd-foster](https://discourse.julialang.org/u/jd-foster)
#### Post date: [October 20, 2023, 5:41am UTC](https://discourse.julialang.org/t/declaring-large-number-of-variables-in-jump/105214/2 "2023-10-20T05:41:48Z")

</div>

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:

> [@Largest number of variables that SCS.jl can handle](https://discourse.julialang.org/t/largest-number-of-variables-that-scs-jl-can-handle/100929/11):
>
> As a general rule of thumb, I tend to think of problems with \<10^4 variables as easy, 10^5 as getting a bit hard, 10^6 as hard, and 10^7 as very hard. 10^8 as nigh impossible.
> 
> Why is the problem so large? What are you modeling? Have you looked at ways to simplify the problem?

> [@Josa9321](#):
>
> Is there anything that I could do to try to solve this version of the problem with this amount of variables?

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.)

---

_[View the full topic](https://discourse.julialang.org/t/declaring-large-number-of-variables-in-jump/105214)._
