KNITRO 13.2.0
· KNITRO models/solves mixed-integer programming (MIP) models and mathematical programs with equilibrium constraints (MPEC) (see the KNITRO Documentation for details).
· KNITRO can use OpenMP (local host multi-processing) for some types of algorithms, as well as multistart and Parallel Finite-Difference Gradients. For more details see the KNITRO Documentation.
We are working on documentation of KNITRO OpenMP jobs. Please get in touch research-computing@wharton.upenn.edu if you need details on KNITRO+OpenMP.
Using KNITRO on Wharton’s HPCC
Take a look at /usr/local/demo/optimization/knitro/
, for some examples, a knitro.opt
file (for setting your own options), etc.
Python
KNITRO for Python is available for your use across the cluster. Just add /usr/local/knitro/examples/Python to your PYTHONPATH environment variable by adding the following to either in your job startup script, or globally in your ~/.bashrc file:
export PYTHONPATH=/usr/local/knitro/examples/Python:$PYTHONPATH
For further details: https://www.artelys.com/tools/knitro_doc/2_userGuide/otherProgInterfaces.html
R
The KnitroR library is available for your use across the cluster. Just import the library in your R code to use:
library(KnitroR)
To test functionality, in R:
knitro(objective=function(x) x[1]*x[2], x0=c(1,1))
For further details: https://www.artelys.com/tools/knitro_doc/2_userGuide/gettingStarted/startR.html
MATLAB
KNITRO Matlab is available for your use across the cluster.
As of v9, the command to use it has changed to knitromatlab
(from KNITRO) instead of ktrlink
(from MATLAB). In theory it should work ‘out of the box’, but some of the knitro options may have changed (if you’re loading a knitro.opt
file, or something), and there are a good number of expanded bits as well.
To activate in your MATLAB, add the addpath (below) to one of the following:
- matlab code
- ~/Documents/MATLAB/startup.m
addpath /usr/local/knitro/knitromatlab
You can test functionality with the old test from Matlab, but substituting knitromatlab
for ktrlink
, like:
[x fval] = knitromatlab(@(x)cos(x),1)
For further details: https://www.artelys.com/tools/knitro_doc/2_userGuide/gettingStarted/startMatlab.html
C/C++/Java
See the examples in /usr/local/knitro/examples/C
or C++
or Java
directories. For the C examples, just change the makefile
: KNDIR = /usr/local/knitro
, and all should compile with a make
.
For further details with C: https://www.artelys.com/tools/knitro_doc/2_userGuide/gettingStarted/startCallableLibrary.html
For further details with C++ & Java: https://www.artelys.com/tools/knitro_doc/2_userGuide/otherProgInterfaces.html