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

How can I hide CPLEX's output in AMPL?

I want to hide messages like CPLEX 12.5.1.0: integer infeasible. 319 MIP simplex iterations 0 branch-and-bound nodes No basis. I don't mind hiding successful messages or not, but I don't want unsuccessful messages. I have tried option…
Oriol
  • 274,082
  • 63
  • 437
  • 513
3
votes
2 answers

cplex boolVarArray giving double values

I have been trying to implement an ILP using CPLEX Java and have been stuck at a problem for a long time. Here are few variables of the ILP: IloIntVar above = new IloIntVar[numRect][]; IloIntVar below = new IloIntVar[numRect][]; IloIntVar left = new…
3
votes
2 answers

How to get number of constraints from Cplex

I have a long program that I've written in C++ and I'm using ILOG Cplex12.5 Solver to solve it. How can I get total the number of constraints? Is there a function for it?
Mehrnaz
  • 31
  • 1
  • 2
3
votes
2 answers

Efficient way how to solve Linear Programming

I do a research on Linear Programming and I need to solve a complicated (hundreds of variables and constraints) problem. There are a lot of ways how to solve LP (that's not the problem) in a self-standing solver. However, I need to solve it from C#…
Marek
  • 815
  • 8
  • 19
3
votes
2 answers

How to create a multidimensional variable in ilog with Java interface?

I want to model a problem with a variable x[i][j][k]. No where in the reference manual is there mention of how to create a variable with size greater than 1…
Unlucky_faust
  • 33
  • 1
  • 4
2
votes
2 answers

IBM CPLEX - How to get back a reference to a named variable?

I am using IBM CPLEX to model a constraint program using the C++ API. I have declared a bool var array as so: IloEnv env; IloBoolVarArray bVars(env); Then I add 3 variables to the array and assign them names as…
dhrumeel
  • 574
  • 1
  • 6
  • 15
2
votes
1 answer

Dynamic CSP with Cplex

Do you know if there's a way to change some constraints in an already solved Cplex constraint optimization problem, and solve it again but with the result being as close as possible to the previous solution. Example: Tasks are assigned to different…
Leandro
  • 31
  • 1
  • 5
2
votes
4 answers

solve multiobjective optimization: CPLEX or Matlab?

I have to solve a multiobjective problem but I don't know if I should use CPLEX or Matlab. Can you explain the advantage and disadvantage of both tools. Thank you very much!
opmfan
  • 191
  • 1
  • 3
  • 14
2
votes
0 answers

Why does the DOcplex element() method fail inside if_then() constraint in CP model?

I'm using DOcplex for Python to build a constraint programming model. The problem is surgery allocation, and it works fine until I add a specific constraint. I need to calculate a value to assign to my variable F, and for that I also need the values…
2
votes
1 answer

How to set Gurobi to stop after the objective value reaches a certain threshold in Julia?

I am trying to run a minimization problem for an MIP using Gurobi in Julia. I would like it to stop after it has found a solution that is below a certain threshold that I have set. I have found ways online to do this in other programming languages,…
2
votes
3 answers

feasiblity problem in CPLEX

Is there an api to solve the feasibility problem (whether a feasible point exists) for a set of convex restraints in CPLEX.
2
votes
0 answers

Sensitivity analysis in LP solvers from MATLAB

As far as I understand, CPLEX, LP_solve and GLPK, among other LP solvers, offer sensitivity analysis. I have the above three solvers installed on my machine, along with these two MATLAB wrappers: CPLEX for MATLAB API (for CPLEX) YALMIP (a…
Amelio Vazquez-Reina
  • 91,494
  • 132
  • 359
  • 564
2
votes
0 answers

APPSI Needscompiledextension

I've been running an iterative optimization problem using pyomo, and was pointed to using their appsi solvers to reduce read/write time between iterations. When I attempt to run the solver, I receive the following error message: Solver
2
votes
1 answer

DoCplex: Using subset of variables in warm start

I am using warm start in DoCplex. In the warm start, my intention is to use a subset of the decision variables from the previous model that resulted in non-empty values. For example, if I have decision binary variables, x_1,...,x_5 and the solution…
Nari90
  • 23
  • 2
2
votes
1 answer

Why the limits of the number of solutions in cplex is not taken into consideration?

I'm solving a MILP problem with CPLEX called from Julia JuMP package. In CPLEX log the number of solutions is displayed to be more than 3000, but there is the parameter CPXPARAM_MIP_Limits_Solutions set to 55, so the solver should return when the…