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
3
votes
1 answer

Suggesting a lower bound for an ILP solver

I have an integer linear programming problem that takes very long to solve by the solvers I've tried (CPLEX, CBC), even though they find the optimal solution early on. They just take forever to fully prove it. It's easy to calculate a trivial lower…
3
votes
1 answer

Drawbacks of avoiding crossover after barrier solve in linear program

I am running a large LP (approximately 5M non-zeros) and I want to speed up the solving process. I tried a concurrent solve to test which algorithm solves my problem the quickest and I found that the barrier method is the clear winner (solver =…
takje
  • 2,630
  • 28
  • 47
3
votes
1 answer

Quadratic Programming CPLEX

I am trying to implement a simple quadratic program using CPLEX's Python API. The sample file qpex1 provided with CPLEX discusses this. The problem, as mentioned in qpex.lp is Maximize obj: x1 + 2 x2 + 3 x3 + [ - 33 x1 ^2 + 12 x1 * x2 - 22 x2 ^2 +…
statBeginner
  • 829
  • 2
  • 9
  • 23
3
votes
1 answer

How many decision variables can be solved for Mixed Integer Programming?

I have a Mixed Integer Programming problem(binary integer variables), how many variables can I solve, i.e, upper limit and what would be time taken? The problem would have a utmost 5 constraints and a minimisation cost function, but variables are…
3
votes
1 answer

Using java cplex to solve TSP, getValues of variables gives an error

I use cplex to solve the travelling salesman problem (TSP). Given that if x[i][j]=1, then the path goes from the city i to the city j, otherwise, ther is no path between these cities. The corresponding matrix: IloNumVar[][] x = new…
Joyee
  • 31
  • 1
  • 4
3
votes
0 answers

Is z3 the most efficient solver for quantifier-free integer propositional logic?

Sorry that this question is subjective, but given that the Stack Overflow has the largest Z3 user base, I want to give it a try. I have a big constraint satisfaction problem that consists of many integer propositional logic formulas and a few first…
Mark Jin
  • 2,616
  • 3
  • 25
  • 37
3
votes
2 answers

Compile Cplex in Java in linux

I'm trying to compile my file.java with an optimization problem with CPLEX notation in a cluster which uses linux (and I'm a Windows user) and a used (through and application to send commands) javac file.java and I get errors like : file.java:4:…
Emaneitron
  • 83
  • 9
3
votes
0 answers

IBM Optimization Studio CPLEX OPL jar returns wrong version

I have been using the IBM OPL Java API library in Eclipse to run my OPL model and data file in Java. This has been working fine in Eclipse but now that I have compiled my program to an executable jar and try running it on Windows 7 command line I…
user134589
  • 2,499
  • 2
  • 16
  • 12
3
votes
1 answer

keep cutting without branching in MIP solver (Gurobi)

I have a MIP which I know the solution almost for certain. I want to use gurobi to prove that the true solution (even if it is not the one I provide) shall not lie more than 0.5% deviated from the solution I gave. I believe that simply keeping the…
3
votes
1 answer

Terminate and retrieve solution in ILOG after a certain time limit

I am using ILOG CPLEX from JAVA and I am running an Integer optimisation problem that takes about 3 days to complete the 0.0%. I need to terminate the program after a certain time limit and obtain a solution for whatever the limit left. Can anyone…
USC
  • 61
  • 1
  • 5
3
votes
1 answer

Scheduling - Spread out assigned event times evenly

I am trying to schedule a certain number of events in the week according to certain constraints, and would like to spread out these events as evenly as possible throughout the week. If I add the standard deviation of the intervals between events to…
Michael Sandler
  • 1,290
  • 3
  • 17
  • 30
3
votes
2 answers

Combine CPLEX and JAVA

Java - CPLEX For a seminar at university I need to program a model with java. Since it is a maximization problem I also need to involve CPLEX methods. Therefore I successfully installed CPLEX on my Mac OS X Version 10.5.8. To combine CPLEX and…
user3633946
  • 31
  • 1
  • 3
3
votes
1 answer

Error while installing CPLEX 12.6 for Python

I am trying to install CPLEX for python from the setup.py file existing in ILOG directory. I am working on windows 8 32bit and python 2.7. I am using this command for installing: python setup.py install But I get this error, error: could not…
m.akbari
  • 572
  • 8
  • 22
3
votes
1 answer

Maximizing linear objective subject to quadratic constraints

I have a programming formulation from a paper and want to give it a tool for solving specific problems. The authors stated it as an linear programming (LP) instance, however I am not sure. Formulation is somewhat like as follows: max…
3
votes
1 answer

Sudoku Solver in CPLEX

I am trying to solve a Sudoku program that I created. This is the Objective Function IloNumExpr numExpr = cplex.linearNumExpr(); cplex.addMaximize(numExpr); What I am trying to do is to add to this either a constraint or new objective function that…