Skip to main content

Gurobi optimizer does not work with CVX

Answered

Comments

2 comments

  • Eli Towle
    Gurobi Staff Gurobi Staff

    The deprecation warning suggests that CVX passes an \( \texttt{env} \) struct to the gurobi() function. This usage was deprecated with the release of Gurobi 9.5. I see the following additional output when I run \( \texttt{cvx_setup} \) on my MacBook:

    8 solvers skipped:
    ...
        Gurobi_20   unknown    /Library/gurobi950/macos_universal2/matlab
            params.OutputFlag must be a scalar
        Gurobi_21   unknown    /Library/gurobi951/macos_universal2/matlab
          params.OutputFlag must be a scalar

    Based on your CVX forum post, you encounter the same issue. Another CVX user reported a similar issue. It looks like the CVX-Gurobi interface needs to be updated to work with Gurobi 9.5.0+. There's no easy way to investigate what the problem is; the "params.OutputFlag must be a scalar" error comes from the \( \texttt{cvx_gurobi} \) function, which is saved as an obfuscated P-code file.

    You could try modeling your problem using Gurobi's supported MATLAB interface instead.

    0
  • Areen Shiyahin
    Gurobi-versary
    First Comment
    First Question

    Thanks a lot! It seems as you said, the CVX-Gurobi interface needs to be updated in order to work with Gurobi 9.5.0+. Actually the comments, on the post that is similar to mine, in CVX forum were quite helpful as well and I could get some tips. The one that solved my issue was installing Gurobi version 9.1.2.

    0

Please sign in to leave a comment.