KNITRO.jl
The KNITRO.jl package provides an interface for using the KNITRO solver from the Julia language. You cannot use KNITRO.jl without having purchased and installed a copy of KNITRO from Ziena Optimization. This package is available free of charge and in no way replaces or alters any functionality of Ziena's KNITRO solver.
KNITRO functionality is extensive, so coverage is incomplete, but the basic functionality for solving linear, nonlinear, and mixed-integer programs is provided. Documentation is available on ReadTheDocs.
Setting up KNITRO on Linux and OS X
-
First, you must obtain a copy of the KNITRO software and a license; trial versions and academic licenses are available here.
-
Once KNITRO is installed on your machine, point the
LD_LIBRARY_PATH
(Linux) orDYLD_LIBRARY_PATH
(OS X) variable to the KNITRO library by adding, e.g.,
export LD_LIBRARY_PATH="$HOME/knitro-9.0.1-z/lib:$LD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH="$HOME/knitro-9.0.1-z/lib:$DYLD_LIBRARY_PATH"
to your start-up file (e.g. .bash_profile
).
-
To activate KNITRO for your computer you will need a valid Ziena license file (which looks like
ziena_lic_*.txt
). The simplest procedure is to copy each license into yourHOME
directory. -
At the Julia prompt, run
julia> Pkg.add("KNITRO")
- Test that KNITRO works by runnning
julia> Pkg.test("KNITRO")
Setting up KNITRO on Windows
Note that currently only 64-bit Windows is supported. That is, you must use 64-bit Julia and install the Win64 version of KNITRO.
-
First, you must obtain a copy of the KNITRO software and a license; trial versions and academic licenses are available here.
-
Once KNITRO is installed on your machine, add the directory containing
knitro.dll
to thePATH
environment variable, as described in the KNITRO documentation. -
To activate KNITRO for your computer you will need a valid Ziena license file (which looks like
ziena_lic_*.txt
). The simplest procedure is to copy each license into yourHOME
directory. -
At the Julia prompt, run
julia> Pkg.add("KNITRO")
- Test that KNITRO works by runnning
julia> Pkg.test("KNITRO")
MathProgBase Interface
KNITRO implements the solver-independent MathProgBase interface,
and so can be used within modeling software like JuMP.
The solver object is called KnitroSolver
. All options listed in the KNITRO documentation may be passed directly. For example, you can run all algorithms by saying KnitroSolver(KTR_PARAM_ALG=KTR_ALG_MULTI)
.