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

Is expression simplification possible using OPL?

I have a long arithmetic expression consisted of many operands and parentheses but only two operations, addition and multiplication. Can OPL be used to minimize the critical path? For instance, given the expression (aa+bb)+(ab+ab)$ whose critical…
Robert
  • 1
  • 5
0
votes
1 answer

The sub-optimal with docplex (cplex) when time limit is reached?

I am using Docplex (Cplex python version) with a maximization objective. I set the time limit, using mdl.solve(TimeLimit=600). It is possible that the model doesn't reach the optimal during this time, so i want to get the objective value…
0
votes
1 answer

Change array dimension when generating a new model CPLEX OPL

I have an optimization model that I want to implement in IBM CPLEX Optimization Studio 12.10. I wrote the model code in OPL and the first implementation is working. What I would like to do now is to iterate the model multiple times to see how the…
sroverto
  • 57
  • 7
0
votes
1 answer

cplex from MATLAB using parfor

I have a fairly large scale optimization problem although the problem itself is fairly simple. It is just quadratic + linear objective, with linear constraints. So the problem is solvable with cplexqp. The scale of the problem is around 1300…
Hendrata
  • 101
  • 1
0
votes
1 answer

Inequality Constraint x Upper Bound Definition on Variable Declaration

Which is more computationally efficient for a Mixed-Integer Problem Formulation: a. State the upper and lower bounds of the variables when declaring the variable b. Declare the variables with the solver default bounds and then imposing inequality…
0
votes
1 answer

How to initiate the interval variable bounds in docplex (python)?

I have the following OPL code and need to implement it in docplex (python), i'm newbie in that field... using CP; dvar interval I1 in 0..20; dvar interval I2 in 0..20; dvar interval I3 in 0..20; dvar int over1; dvar int start1; dvar int…
0
votes
1 answer

Running .net core application with IBM ILOG CPLEX 12.9 in linux doesn't work

I have a .net core application that uses IBM ILOG CPLEX 12.9. It works normally on Windows 10. But when I try to run on linux (Ubuntu 18.04), the following error occurs: System.DllNotFoundException: Unable to load shared library…
0
votes
2 answers

Cplex pass decision variable to another model using ILOG Script

I have two separate Cplex models, where the second model depends on the solution of the first one. I want to solve the models using ILOG Script within the Optimization Studio. So far I am at the following for my main file, which controls the…
0
votes
1 answer

how to define an indicator constraint in docplex python API?

I want to model an integer programming example with docplex in python. for an indicator constraint I have this equation (X is a binary variable): I wrote this code : for i1,i2,i3 in P: mdl.add_indicator_constraints(x[(i,j,k)] for i,j,k in ijk…
Sana.Nz
  • 81
  • 11
0
votes
1 answer

How to convert/get the value of integer expression in cplex?

I am new to Cplex. I need to compute the overlap between several intervals at same time. For that, i compute the overlap_length between two intervals at a time, and i save the max and min of the start/end points. For example, let's consider three…
0
votes
1 answer

How to write sequence by sequence constraints for scheduling

Now, I tried to add EQ7: a new constraint that make every start_pour[k][j] differ from others start_pour[k][j] that equal to site_process_time[c] to a runnable model. It showed a relaxed solution that = no feasible solution. How do i write this…
Natdanai I.
  • 49
  • 1
  • 8
0
votes
1 answer

How to add excel arrays to Cplex

I want to add an excel to cplex but I just get this error: Exception from IBM ILOG Concert: excel: size of the range is not the size of the array. I used SheetConnection. int M1=3; int M2=3; int P1=3; int P2=3; int T=12; int D=12; int H=2; int…
0
votes
1 answer

Cplex Studio Does not support dvar float

I am trying to use a variable to record the local timings of an object. As I could not find any way to define a variable in the Cplex, I tried using "dvar float" to define the variable. But, Cplex says that the algorithm does not support "dvar…
liu chao
  • 1
  • 2
0
votes
1 answer

Cant install CPLEX 12.9 on my macOS Catalina

I downloaded the cplex_studio1290-osx file from the IBM website. But can't install, it says that the application can't be opened.
0
votes
1 answer

CPLEX Conditions on Sets of Multi Dimensional Variable

I have tried this problem for weeks but still could not do it. Please give me some advice, thanks in advance! for example, I know how to add condition of each index in the "forall", but how to add condition for combination of index in the "forall",…
liu chao
  • 1
  • 2