Questions tagged [cplex]

CPLEX is a fast commercial linear, quadratic, and mixed-integer optimizer. CPLEX offers a number of pre and post-processing tools allowing the software to substantially reduce the number of variables (columns) and constraints (rows) of a model. It is possible to solve models via an interactive shell, OPL (Optimization Programming Language), or a number of interfaces to programming languages, such as C, C++, Java, C#, Python, and MATLAB.

CPLEX is a commercial mathematical optimizer now owned and sold by IBM. It can solve continuous and mixed-integer optimization problems with linear and convex quadratic constraints and objectives and second-order cone problems. The core solver is written in C, but APIs are available for C, C++, Java, C#, Python, and MATLAB.

User's guide and API reference is available in the following formats:

  • PDF (for V12.1)
  • HTML (for V12.3 and up)

For troubleshooting questions that may involve back-and-forth (including posting attachments), or technical discussions about the algorithms, consider posting your question on the official IBM developerWorks forum instead.

2272 questions
58
votes
13 answers

Best open source Mixed Integer Optimization Solver

I am using CPLEX for solving huge optimization models (more than 100k variables) now I'd like to see if I can find an open source alternative, I solve mixed integer problems (MILP) and CPLEX works great but it is very expensive if we want to scale…
16
votes
7 answers

mathematical optimization library for Java --- free or open source recommendations?

Does anyone know of such a library that performs mathematical optimization (linear programming, convex optimization, or more general types of problems)? I'm looking for something like MATLAB, but with the ability to handle larger problems. Do I have…
12
votes
2 answers

Solving an integer linear program: why are solvers claiming a solvable instance is infeasible?

I'm trying to solve integer programming problems. I've tried both use SCIP and LPSolve For example, given the final values of A and B, I want to solve for valA in the following C# code: Int32 a = 0, b = 0; a = a*-6 + b + 0x74FA - valA; b = b/3 + a +…
Craig Gidney
  • 17,763
  • 5
  • 68
  • 136
11
votes
1 answer

How to make cplex not output to terminal

I am using the IBM cplex optimizer to solve an optimization problem and I don't want all terminal prints that the optimizer does. Is there a member that turns this off in the IloCplex or IloModel class? These are the prints about cuts and…
DiegoNolan
  • 3,766
  • 1
  • 22
  • 26
10
votes
1 answer

Docplex vs CPLEX Python API

What is the difference between Docplex and CPLEX Python API? Is any of them faster than the other?
Snochacz
  • 685
  • 1
  • 8
  • 23
9
votes
1 answer

How Can an Elastic SubProblem in PuLP be used as a Constraint?

In Python PuLP, a linear programming constraint can be turned into an elastic subproblem. http://www.coin-or.org/PuLP/pulp.html?highlight=lpsum#elastic-constraints Solving the subproblem optimizes the distance from the target value. Of course, the…
8
votes
2 answers

Interpretation of GAP in CPLEX

This is a part of the engine-log output that I get from a small-scale mixed integer linear optimization problem that I solved in CPLEX 12.7.0 Nodes Cuts/ Node Left Objective IInf Best Integer …
8
votes
1 answer

Speed of CPLEX vs CPLEX using SCIP

I am new to LP and have only briefly used PuLP in Python. Why is there a speed difference between SCIP 3.2.1 - CPLEX 12.63 and CPLEX 12.6.3? Doesn't SCIP still use CPLEX for solving? Why will someone use SCIP with CPLEX solver, instead of using…
Nyxynyx
  • 61,411
  • 155
  • 482
  • 830
8
votes
1 answer

How to disable the output messages in CPLEX solver?

I am using Pulp modeler with python to solve an integer programming problem. I am using IBM CPLEX as a solver. When I run my Python program, I have a lot of output messages in the console like: The CPLEX Optimizers will solve problems up to 1000…
Learning
  • 183
  • 6
7
votes
1 answer

Cplex installation "Could not find a version that satisfies..." and "No matching distribution" for Apple M1

I am trying to run cplex on my M1. I am hoping I can get it to run on python 3.8/9 because I also need to run tensorflow (which I run through miniconda for M1). When I try to pip install it within the miniconda python environment, I get the…
chiennifer
  • 135
  • 6
7
votes
2 answers

Representing Travelling Salesman as Linear Expression

I've seen online that one can write the travelling salesman problem as a linear expression and compute it using software such as CPLEX for java. I have a 1000 towns and need to find a short distance. I plan on partitioning these 1000 towns into…
6
votes
2 answers

Comparison between CPLEX and Gurobi

Gurobi and CPLEX are solvers that have been very popular in recent years. CPLEX is easier for academics in terms of the license. It is also said to be very high in performance. But Gurobi is claimed to be the fastest solver in recent years, with…
Aydin
  • 167
  • 1
  • 7
6
votes
2 answers

Is a library (with C programming language interface) callable from within ABAP?

I have no experience with ABAP programming and I'd like to know whether it's possible to call a 3rd party library with C programming language interface from within an SAP application. To be more precise, the goal is to use the IBM CPLEX Optimizer…
llasarov
  • 2,064
  • 5
  • 27
  • 40
6
votes
2 answers

error: iostream.h due to including cplex

I am trying to use cplex in eclipse in Ubuntu 12.04 but when I include ilocplex.h I get the following error /opt/ibm/ILOG/CPLEX_Studio124/concert/include/ilconcert/ilosys.h:360:22: fatal error: iostream.h: No such file or directory The only two…
Shahab
  • 129
  • 1
  • 2
  • 8
5
votes
2 answers

No matching distribution found for cplex

When installing the Python CPLEX API with pip install cplex, I get the error: Could not find a version that satisfies the requirement cplex (from versions: none) ERROR: No matching distribution found for cplex My python and pip installation are…
jofrho
  • 51
  • 1
  • 4
1
2 3
99 100