docplex (a.k.a. IBM® Decision Optimization CPLEX® Modeling for Python) is a Python modeling API that provides modules for mathematical programming via CPLEX and constraint programming via CP Optimizer.
Questions tagged [docplex]
316 questions
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
5
votes
2 answers
IBM Watson CPLEX Shows no Variables, no Solution when solving LP file
I'm migrating an application that formerly ran on IBM's DoCloud to their new API based off of Watson. Since our application doesn't have data formatted in CSV nor a separation between the model and data layers it seemed simpler to upload an LP file…

Michoel
- 834
- 5
- 16
5
votes
1 answer
CpoException: Can not execute command 'cpoptimizer -angel'. Please check availability of required executable file
I have CPLEX Optimization Studio installed on my Ubuntu machine and I am using the docplex model module with success. Now I have to use CpoModel from docplex.cp.model and I have the error:
CpoException: Can not execute command 'cpoptimizer…

raisedbywolves
- 111
- 2
- 6
3
votes
1 answer
How do I set the key for using the full version of CPLEX?
I have purchased a cplex subscription and received a key to use, but I can't figure out how to use it, no matter what I try I keep getting the "no key, go purchase cplex here" error.
I'm using cplex via docplex in a jupyter notebook running in…

Threore
- 33
- 4
3
votes
0 answers
ConflictRefiner not providing any output
I am working on a mixed integer linear optimization problem using docplex with python. On solving the problem, I get the problem status as INTEGER INFEASIBLE. The error reads as follows: Row 'Constraint1_358_36' infeasible, all entries at implied…

ash94
- 63
- 5
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…

Francisco Ríos
- 21
- 2
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

Steven Kelly
- 21
- 3
2
votes
1 answer
Optimization integer programming with covariance matrix
I am trying to do a optimization problem which requires the calculation of a new covariance matrix affected by the variable within the implementation.
I am able to do so with scipy optimization Minimize using numpy.cov within my objective function.…

Wee Darren
- 21
- 1
2
votes
2 answers
docplex.cp.model is slower than the exhaustive search
I am working on a combinatorial optimisation problem and realised the CPLEX is taking a significant time to run. Here is a toy example:
I am using the python API for docplex
import numpy as np
from docplex.cp.model import CpoModel
N = 5000
S = 10
k…

S.Perera
- 874
- 3
- 9
- 24
2
votes
1 answer
How can I get the number of branch and cut nodes explored within the script?
How can I get the number of branch and cut nodes explored within the script? I am using python docplex.

Pablo Adasme
- 23
- 3
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
How do I switch the max function from CPLEX OPL to Docplex?
I have the following restriction implemented on CPLEX OPL.
forall (i in N)
forall (j in M)
forall (k in 1..i)
sum(z in 1 ..i)(p[z]*(x[z][j][k]+y[z][j][k])) + (t[k]*max(z in 1 ..i)(x[z][j][k]+y[z][j][k]))<= d[i];
…

Sofia Ariza
- 21
- 1
2
votes
0 answers
Cplex solution pool generates duplicate solutions
I put this question on IBM forum, since nobody responded I am going to ask here.
I have an MIP model written with docplex and a solution pool that populates a massive number of solutions.
My problem is, when my solution pool finishes most of the…

Sana.Nz
- 81
- 11
2
votes
1 answer
sensitivity analysis in docplex
how can I do sensitivity analysis in docplex (python)?
Suppose we have this model:
Max z= 3*x+2*y;
st:
2*x+y<=8;
x+2*y<=6;
I use docplex in python for solve the model:
from docplex.mp.model import Model
tm = Model(name="MyModel")
x =…

AComputer
- 519
- 2
- 10
- 21
2
votes
1 answer
how to set a four dimension variable in docplex with C#?
how to set a three or four-dimensional variable when calling cplex in C#?
using ILOG.Concert;
using ILOG.CPLEX;
The following is two -dimensional:
INumVar[][] EndTime = new INumVar[NumEMU][];
for (int i = 0; i < NumEMU; i++)
…

Justin Shi
- 21
- 2