Search code examples
matlabmathematical-optimizationsolver

Yalmip communicating with Matlab Quadprog, Setting options


I face problem with setting options of Quadprog solver through Yalmip, .

Options = sdpsettings('solver','quadprog','quadprog.Algorithm', ... 
                      'interior-point-convex','quadprog.Display', ...
                      'iter','quadprog.Diagnostics', 'on');
diagnostics = solvesdp(Constraints , Objective, Options);

But none of these option settings work. In particular, it does not display the progress iteratively. The documentation, or FAQ did not help much either.


Solution

  • To have a consistent solver-agnostic way to control display level, it is always controlled through the verbose option. Set it to 2 and you will set the iteration display options. Before the call to quadprog, the code inside YALMIP looks like this

    switch options.verbose
    case 0
        options.quadprog.Display = 'off';
    case 1
        options.quadprog.Display = 'final';
    otherwise
        options.quadprog.Display = 'iter';
    end
    

    Having said that, it will not get you any further. In recent version of MATLAB, they have removed the iteration display for some bizarre reason. If you read the help on quadprog, it states Currently, only 'final' and 'off' are valid values for the parameter Display ('iter' is not available).

    Finally, if you are in academia and some anything but minor QPs, install a better QP solver. Quadprog is mediocre at best. Solvers such as cplex, gurobi, xpress and mosek all have (full functionality) free academic versions.