The CPLEX.jl package provides an unofficial interface for using IBM's CPLEX Optimizer™ from the Julia language. You cannot use CPLEX.jl without having purchased and installed a copy of CPLEX Optimizer™ from IBM. This package is available free of charge and in no way replaces or alters any functionality of IBM's CPLEX Optimizer product.
CPLEX.jl is a Julia interface for the CPLEX optimization software. CPLEX functionality is extensive, so coverage is incomplete, but the basic functionality for solving linear and mixed-integer programs is provided.
CPLEX.jl is intended for use with the MathProgBase solver interface; an internal API, while present, is not documented.
NOTE: CPLEX does not officially support linking to their dynamic C library, which is necessary for use from Julia. However, the steps outlined below have worked for OS-X, Windows, and Linux machines.
First, you must obtain a copy of the CPLEX software and a license; trial versions and academic licenses are available here.
Once CPLEX is installed on your machine, point the
LD_LIBRARY_PATH variable to the directory containing the CPLEX library by adding, for example,
export LD_LIBRARY_PATH="/path/to/cplex/bin/x86-64_linux":$LD_LIBRARY_PATH to your start-up file (e.g.
.bash_profile, adding library path on Ubuntu). On linux, make sure this directory contains
XXX is stands for the version number; on OS-X the file should be named
libcplexXXX.dylib. Alternatively, you can also use the
CPLEX_STUDIO_BINARIES environment variable as follows:
$ CPLEX_STUDIO_BINARIES=/path/to/cplex/bin/x86-64_linux julia -e 'Pkg.add("CPLEX"); Pkg.build("CPLEX")'
At the Julia prompt, run
(or manually clone this module to your
Check that your version is included in
deps/build.jl in the aliases for the library dependency; if not, open an issue.
Currently, CPLEX.jl is compatible only with 64-bit CPLEX and 64-bit Julia on Windows. CPLEX.jl attemps to automatically find the CPLEX library based on the
CPLEX_STUDIO_BINARIES environmental variable set by the CPLEX installer.
Solver parameters can be passed through the
CplexSolver() object, e.g.,
CplexSolver(CPX_PARAM_EPINT=1e-8). Parameters match those of the CPLEX documentation. Additionally, the
mipstart_effortlevel parameter can be used to tell CPLEX how much effort to put into turning warmstarts into feasible solutions, with possible values
15 days ago