MathOptInterface: How to create a 2-dimensional variable?

I am new to MOI and am looking for something equivalent to JuMP’s @variable(model, x[P,M] >=0).

You can’t do this in MOI. Stick with JuMP.

1 Like

Okay, good to know. Thanks for the suggestion.

The distinction is really:

  • if you are a modeler trying to solve optimization problems, use JuMP
  • if you are a developer trying to code high-level optimization algorithms, use JuMP (as an example,
  • if you are a solver author wanting to link a new solver to JuMP, use MathOptInterface.
1 Like

Thank your Oscar for the distinction. I’ll re-evaluate what I need for my use-case.