https://github.com/jump-dev/mosektools.jl
MosekTools is the MathOptInterface.jl implementation for the MOSEK solver
https://github.com/jump-dev/mosektools.jl
Last synced: 6 months ago
JSON representation
MosekTools is the MathOptInterface.jl implementation for the MOSEK solver
- Host: GitHub
- URL: https://github.com/jump-dev/mosektools.jl
- Owner: jump-dev
- License: mit
- Created: 2019-02-23T09:28:09.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-09-09T21:04:45.000Z (over 2 years ago)
- Last Synced: 2024-04-12T04:14:57.308Z (almost 2 years ago)
- Language: Julia
- Size: 643 KB
- Stars: 29
- Watchers: 11
- Forks: 8
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# MosekTools.jl
[](https://github.com/jump-dev/MosekTools.jl/actions?query=workflow%3ACI)
[](https://codecov.io/gh/jump-dev/MosekTools.jl)
[MosekTools.jl](https://github.com/jump-dev/MosekTools.jl) is the
[MathOptInterface.jl](https://github.com/jump-dev/MathOptInterface.jl)
implementation for the MOSEK solver.
The low-level solver API for MOSEK is found in the package [Mosek.jl](https://github.com/MOSEK/Mosek.jl).
## Affiliation
MosekTools.jl is maintained by the JuMP community and is not officially
supported by MOSEK. However, [Mosek.jl](https://github.com/MOSEK/Mosek.jl) _is_ an officially supported product of
MOSEK.
## Getting help
If you need help, please ask a question on the [JuMP community forum](https://jump.dev/forum).
If you have a reproducible example of a bug, please [open a GitHub issue](https://github.com/jump-dev/MosekTools.jl/issues/new).
## License
`MosekTools.jl` is licensed under the [MIT License](https://github.com/jump-dev/MosekTools.jl/blob/master/LICENSE.md).
The underlying solver is a closed-source commercial product for which you must
[obtain a license](https://www.mosek.com).
## Installation
Install MosekTools as follows:
```julia
import Pkg
Pkg.add("MosekTools")
```
In addition to installing the MosekTools.jl package, this will also download
and install the latest version of Mosek.jl.
Follow the instructions at [Mosek.jl](https://github.com/MOSEK/Mosek.jl) to
obtain and install an appropriate license.
## Use with JuMP
To use Mosek with JuMP, use `Mosek.Optimizer`:
```julia
using JuMP
import Mosek
import MosekTools
model = Model(Mosek.Optimizer)
set_silent(model)
set_attribute(model, "MSK_DPAR_INTPNT_CO_TOL_DFEAS", 1e-7)
set_attribute(model, "MSK_IPAR_OPTIMIZER", Mosek.MSK_OPTIMIZER_INTPNT)
```
Note that even though the optimizer is `Mosek.Optimizer`, you must additionally
import `MosekTools`.
## Options
All other parameters can be found in the [Mosek documentation](https://docs.mosek.com/latest/opt-server/param-groups.html).
For integer parameters, pass either the value, or the corresponding
constant defined in the `Mosek` package.
```julia
using JuMP
import Mosek
import MosekTools
model = Model(Mosek.Optimizer)
set_attribute(model, "MSK_IPAR_OPTIMIZER", Mosek.MSK_OPTIMIZER_INTPNT)
set_attribute(model, "MSK_IPAR_OPTIMIZER", 4)
set_attribute(model, "MSK_IPAR_CACHE_LICENSE", Mosek.MSK_ON)
set_attribute(model, "MSK_IPAR_CACHE_LICENSE", 1)
set_attribute(model, "MSK_IPAR_CACHE_LICENSE", Mosek.MSK_OFF)
set_attribute(model, "MSK_IPAR_CACHE_LICENSE", 0)
```