Suppose I have a LP in which objective and constraints only involve neighboring variables. That is, I have a matrix variable `X`

and each of my expressions only involve the variables `X[i,j], X[i-1,j], X[i+1,j], X[i,j-1], X[i,j+1]`

. This setup leads to a banded KKT system that can be solved much more efficiently (no need to invert a full matrix).

Will JuMP (and the optimization solvers behind it) automatically detect the banded matrix and call specialized linear solvers that exploit this structure?

As a side question, is there any way to query the size of a JuMP problem (number of variables, constraints, etc.) after it is setup?