I (eventually) want to run an MIQP where the objective is a simple sum of squares say sum((Y-XB)^2). Without even getting to the constraints or the integer part of the problem, I’m running into issues simply formulating the objective for large X and Y (say X~500x1000 and Y~500x1). Specifically, I get an “OutofMemoryError()”, note that I’m not solving anything yet just setting up the model. I have a simple function snippet below I’ve been using to see how big I can make X before things break. The use of “dot()” may be silly/naive to more experienced julia users, it was just working faster then writing out the whole thing as a sum. So far I’ve made it up to n=500 and p=900 before the error appears (applying @time to this shows the output: “64.652337 seconds (1.81 M allocations: 18.305 GB, 19.55% gc time)”)
I’m working on a cluster and have to request memory for jobs, so theoretically I could request more though that puts me further down the queue. So if there are glaring inefficiencies here or nice tricks to use, any input would be great!
W = Y-X*B