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

Problems with cplex implementation in java (eclipse), objetive value= 0 ; LP Presolve eliminated 96 rows and 0 columns

double valorFuncionObjetivo = 0; IloCplex cplex = new IloCplex(); IloNumVar[][][] x = new IloNumVar[Map.NumPersM][Map.NumHrsM][Map.NumTrab]; for (int i = 0; i < Map.NumPersM; i++) { …
conroran
  • 15
  • 1
  • 3
0
votes
1 answer

How to call the objective function of CPLEX from external software?

I would like to know if I can have the objective function of CPLEX called from external software such as R. I built the optimisation model in CPLEX using its OPL and I would like to run the CPLEX model to optimise an external objective function. Is…
0
votes
1 answer

Cplex cuts only at root

Is there an option in CPLEX that allows the addition of cuts only at the root? I would expect, yes, but I can't find the name of the option.
Clement
  • 121
  • 4
0
votes
1 answer

How to export every feasible solution from IBM ILOG CPLEX?

Currently I am working on a scheduling problem using IBM ILOG CPLEX using its OPL. I can only export the optimal solution using sheetWrite command but I would like to export the results of each feasible solution not only the optimal solution. Could…
0
votes
1 answer

writing C++ programs using CPLEX with Concert Technology

This is my first question in stack overflow website. I was learning concert technology in C++. After I gained some understanding, I have tried to solve the following problem. I have coded the problem but I am getting infeasible solution. Can someone…
Jakhon
  • 13
  • 4
0
votes
2 answers

Correlate two variables in a CPLEX constraint

While working on a linear program, I came across this question: it is possible to correlate two classes of variables, for example Xij (set of variables greater than or equal to zero) and Yij (decision variables) so that: if Xij> 0 -> Yij = 1 if Xij…
user3254491
  • 119
  • 1
  • 3
  • 10
0
votes
1 answer

Solver 'CPLEX' failed. Suggestion of parameters

I am trying to use cplex to solve a LP optimization problem. (In python using cvxpy) Depending on the constraints I place on the problem, the cplex solver sometimes fails to find a solution. I'd like some intuitions on how to read the output of the…
pierresegonne
  • 436
  • 1
  • 4
  • 15
0
votes
1 answer

How to declare a dynamic array with IloNumArray type?

One of the arguments of a function in Cplex concert C++ has IloNumArray type and it must be an empty dynamic array. The size of the array is not known until the end of the solution. I declared the array like this: const IloNumVarArray var(env); …
usercp
  • 9
  • 3
0
votes
1 answer

Model Cumulative VRP in Cplex

I am new to Cplex IBM ILOG CPLEX Optimization Studio and I am currently programming a Cumulative VRP model (ref: DOI: 10.5772/5812) like the following: This is my code: {string} CIUDADES = ...; int READY_TIME[CIUDADES] = ...; int…
GMs
  • 47
  • 5
0
votes
1 answer

Install cplexAPI C++ library in CLion C++11 and gets error with ld.exe

I'm trying to use cplexAPI C++ in a CLion project with C++11 on Windows 10. I have looked at several posts related to this question (e.g. config CMakeLists.txt, install MinG64) and I have managed to configure my CMakeLists.txt in the following…
afdez
  • 89
  • 7
0
votes
2 answers

How to interpret sub tour elimination constraint in travelling salesman problem in cplex?

I have written the following code: How to interpret auxiliary constraints and sub tour elimination constraints in the following formulation?
0
votes
1 answer

what is the error in my code ? I have not set the data already

i was trying to solve this transportation problem in cplex enter image description here here is my OPL code int p=...; int q=...; range i=1..p; float a[i]; range j=1..q; float b[j]; float c[i][j]; dvar boolean x[i][j]; minimize sum(l in i,m in…
sudarsan vs
  • 113
  • 1
  • 8
0
votes
1 answer

How do I formulate these ConVRP constraints in CPLEX?

I am trying to build a conVRP model with hard time window constraints. However, I am stuck with the inflow and outflow constraints. I have four sets: range N = 1..20 // set of Nodes range P = 1..19 // set of customers range D = 1..5 // set of…
Jeroen
  • 1
  • 1
0
votes
1 answer

How do I bypass the 1000 variable limit in Cplex

I've created a MILP model to test using the Docplex library in python but I get this error message : CPLEX Error 1016: Community Edition. Problem size limits exceeded. Purchase at http://ibm.biz/error1016. How do I bypass this limitation? Is there…
0
votes
1 answer

How to overcome Memory Overflow 1001 error in CPLEX OPL

I am running a fairly large problem in CPLEX OPL and get the error : CPLEX Error 1001: Out of memory This error comes up in 17 minutes, when the Engine Log tab at the bottom has nothing yet. There are a few debugging scripting logs and they appear…
Ranajit
  • 49
  • 6