After declaring my model, cvx_end does several presolve steps before passing to the solver. My model gets stuck in eliminate.m, specifically the loop of ‘*STEP 3: Look for variables that we can eliminate without increasing fill-in’*. What could be the reason for this? As I don’t get any error messages, just an infinite loop, it’s hard to see what exactly the problem is.

One things that is possibly related: While constructing my model I loop through a data structure with constraints and objectives, and each row of the data structure requires a different number of variables. That is, I might have variables x(i,1)…x(i, n_i) and x(j,1),…,x(j,n_j), with n_i and n_j different. I tried the approach of How to create a couple of matrix variables with different dimension? where I declare a large matrix of variables with max(n_j) columns. This creates variables that do not end up in the model. Setting dummy constraints on those variables does not resolve the issue. Is it possible that the above is related to my infinite loop in the presolve? If not, what could be the cause? Thanks in advance for any help!