Cplex



  1. Cplex Python
  2. Cplex Download

IBM ILOG CPLEX Optimization Studio (often informally referred to simply as CPLEX) is an optimization software package. In 2004, the work on CPLEX earned the first INFORMS Impact Prize. CPLEX Optimizer provides flexible, high-performance mathematical programming solvers for linear programming, mixed integer programming, quadratic programming and quadratically constrained programming problems. The NEOS Server optimization solvers represent the state-of-the-art in computational optimization. Optimization problems are solved automatically with minimal input from the user. Here I’ve selected CPLEX and Gurobi, since they are among the leading commercial solvers, and PuLP, which is a powerful open-source modeling package in Python. I’ll provide a side-by-side. There is a tile for ILOG CPLEX Optimization Studio and in it a link 'download'. Clicking this results in a message that the resource is currently unavailable. I tried this on three subsequent.

Forum

Come and discuss all things fingerprinting. From AFIS to breaking news to chemical applications to general commentary on the state of our discipline.

Take me there

Journal Feed

Keep up on industry related articles from the Journal of Forensic Sciences

Take me there

Smiley Files

Examples of remarkable faces and symbols within fingerprints. Submitted by latent print examiners found during actual case work.

Take me there!

Testimony

Take the knowledge out of the books and onto the stand. Fingerprint testimony from Examiners during real trials.

Take me there!

Resources

Want to know the big picture? Links to such resources as the OIG report on the Mayfield Error, NAS and PCAST reports, the Fingerprint Source Book, etc.

Take me there!

OMPR (Optimization Modeling Package) is a DSL to model and solve Mixed Integer Linear Programs. It is inspired by the excellent Jump project in Julia.

Here are some problems you could solve with this package:

  • What is the cost minimal way to visit a set of clients and return home afterwards?
  • What is the optimal conference time table subject to certain constraints (e.g. availability of a projector)?

The Wikipedia article gives a good starting point if you would like to learn more about the topic.

I am always happy to get bug reports or feedback.

Install

CRAN

Development version

To install the current development version use devtools:

Available solver bindings

PackageDescriptionBuild LinuxBuild WindowsTest coverage
ompr.roiBindings to ROI (GLPK, Symphony, CPLEX etc.)

Cplex Python

A simple example:

API

These functions currently form the public API. More detailed docs can be found in the package function docs or on the website

DSL

Cplex mixed integer programming
  • MIPModel() create an empty mixed integer linear model (the old way)
  • MILPModel() create an empty mixed integer linear model (an alternative way; experimental, especially suitable for large models)
  • add_variable() adds variables to a model
  • set_objective() sets the objective function of a model
  • set_bounds() sets bounds of variables
  • add_constraint() add constraints
  • solve_model() solves a model with a given solver
  • get_solution() returns the column solution (primal or dual) of a solved model for a given variable or group of variables
  • get_row_duals() returns the row duals of a solution (only if it is an LP)
  • get_column_duals() returns the column duals of a solution (only if it is an LP)

Backends

There are currently two backends. A backend is the function that initializes an empty model.

  • MIPModel() is the standard MILP Model
  • MILPModel() is another backend specifically optimized for linear models and is about 1000 times faster than MIPModel(). It has slightly different semantics, as it is vectorized. Currently experimental.

Solver

Solvers are in different packages. ompr.ROI uses the ROI package which offers support for all kinds of solvers.

  • with_ROI(solver = 'glpk') solve the model with GLPK. Install ROI.plugin.glpk
  • with_ROI(solver = 'symphony') solve the model with Symphony. Install ROI.plugin.symphony
  • with_ROI(solver = 'cplex') solve the model with CPLEX. Install ROI.plugin.cplex
  • … See the ROI package for more plugins.

Further Examples

Please take a look at the docs for bigger examples.

Knapsack

Bin Packing

An example of a more difficult model solved by symphony.

License

Currently GPL.

Contributing

Please post an issue first before sending a PR.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Related Projects

Cplex Download

  • CVXR - an excellent package for “object-oriented modeling language for convex optimization”. LP/MIP is a special case.
  • ROML follows a similiar approach, but it seems the package is still under initial development.