Optimization Toolbox    

Linear Programming with Dense Columns in the Equalities

The problem is

and you can load the matrices and vectors Aeq, beq, f, lb, and ub into the MATLAB workspace with

The problem in densecolumns.mat has 1677 variables and 627 equalities with lower bounds on all the variables, and upper bounds on 399 of the variables. The equality matrix Aeq has dense columns among its first 25 columns, which is easy to see with a spy plot:

You can use linprog to solve the problem:

Because the iterative display was set using optimset, the results displayed are

You can see the returned values of exitflag, fval, and output:

This time the number of PCG iterations (in output.cgiterations) is nonzero because the dense columns in Aeq are detected. Instead of using a sparse Cholesky factorization, linprog tries to use the Sherman-Morrison formula to solve a linear system involving Aeq*Aeq'. If the Sherman-Morrison formula does not give a satisfactory residual, a PCG iteration is used. See the Main Algorithm section in Large-Scale Linear Programming.


  Linear Programming with Equalities and Inequalities Default Parameter Settings