blob: 2d8c93e0746796377afe3f2eb79de069e4c47d71 [file] [log] [blame]
Austin Schuh9049e202022-02-20 17:34:16 -08001JuMP
2=====
3
4`JuMP <https://github.com/JuliaOpt/JuMP.jl>`_ supports the OSQP solver using the `MathOptInterface interface <https://github.com/JuliaOpt/MathOptInterface.jl>`_.
5You can define a JuMP model to be solved via OSQP as follows
6
7
8.. code:: julia
9
10 # Load JuMP and OSQP
11 using JuMP, OSQP
12
13 # Create OSQP Solver instance
14 s = OSQPMathProgBaseInterface.OSQPSolver(verbose=false)
15
16 # Create JuMP model
17 model = Model(solver=s)
18
19 ...
20
21Note that here we set the verbosity to :code:`false`.
22After defining your model, you can solve it by just calling
23
24.. code:: julia
25
26 solve(model)
27
28
29For more details on how to create and modify the models, see the `JuMP Documentation <https://www.juliaopt.org/JuMP.jl/stable/>`_.