CPLEX.jl is an interface to the IBM® ILOG® CPLEX® Optimization
provides an interface to the low-level C API, as well as an implementation of
This package is available free of charge and in no way replaces or alters any functionality of IBM's CPLEX Optimization Studio product.
Note: This wrapper is maintained by the JuMP community and is not
officially supported by IBM. However, we thank IBM for providing us with a
CPLEX license to test
CPLEX.jl on Travis. If you are a commercial customer
interested in official support for CPLEX in Julia, let them know!.
First, you must obtain a copy of the CPLEX software and a license. Then, set the
appropriate environment variable and run
# Linux ENV["CPLEX_STUDIO_BINARIES"] = "/path/to/cplex/bin/x86-64_linux" # OSX ENV["CPLEX_STUDIO_BINARIES"] = "/path/to/cplex/bin/x86-64_osx" # Windows ENV["CPLEX_STUDIO_BINARIES"] = "C:/IBM/CPLEX_Studio128/cplex/bin/x64_win64" import Pkg Pkg.add("CPLEX")
Help! I got
LoadError: Unable to locate CPLEX installation
Which version of CPLEX are you trying to install? Currently, CPLEX.jl only supports 12.8, 12.9, and 12.10 given recent changes to the API.
If you want to support newer versions of CPLEX not listed above, file an issue with the version number you'd like to support. Some steps need to be taken (like checking for new or renamed parameters) before CPLEX.jl can support new versions.
Use with JuMP
You can use CPLEX with JuMP via the
Set solver parameters using
model = Model(CPLEX.Optimizer) set_optimizer_attribute(model, "CPX_PARAM_EPINT", 1e-8)
Parameters match those of the C API in the CPLEX documentation.