KNITRO

KNITRO 10.1.1

· 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:

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:

To test functionality, in R:

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

You can test functionality with the old test from Matlab, but substituting knitromatlab for ktrlink, like:

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 makefileKNDIR = /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++ & Javahttps://www.artelys.com/tools/knitro_doc/2_userGuide/otherProgInterfaces.html