Questions tagged [docplex]

Questions related to the IBM Decision Optimization CPLEX (docplex) which is designed for modeling and solving optimization problems in Python.

Filter by
Sorted by
Tagged with
3
votes
2answers
52 views

CPLEX MILP Report all solutions found

I am running a MIP using DOCPLEX that generates several feasible integer solutions during the Branch and Bound search. The node log updates every now and then based on the parameter setting. However, ...
1
vote
0answers
82 views

How do I define multiple indices for the same set in python? (using CPLEX to solve a MILP)

I am using docplex in Python to solve a MILP and I am having some trouble defining the indices and sets of my model. I want to translate $w,v,a\in W$ into Python. In this case, $W$ is a set, and $w, v$...
2
votes
2answers
82 views

Docplex, CPLEX Warning 1036 :

I am trying to solve a large-scale MIP problem. I have the following errors, I know, it's about the data, but I can't change the data. Is there a method to deal with it? ...
-1
votes
1answer
74 views

For docplex, it's possible to set the number of iterations without improvement?

When running the cplex model, I noticed that the CPLEX repeats the same gap value several times. I ask if there is a parameter in docplex that limits the number of iterations without improvements or ...
0
votes
1answer
107 views

Assignment problem with variable tasks to be done

I'm dealing with a kind of assignment problem, in which I have a set of tasks $t$ to be executed by machines $w$, but these tasks depend on the variatns $v$ of components $m$ being selected, which is ...
2
votes
2answers
103 views

Constraint to handle the machine-configuration's change between initial position and its first occurrence in the process

I am working with a kind of a reconfigurable process planning, meaning that the same machine can have different configurations and perform multiple operations. Each machine has an initial ...
1
vote
0answers
21 views

Implement geometric constraint using DOCplex

currently I'm working on a wind farm layout optimization problem. I found an appropriate model in literature (Fischetti et al.) and now I'm trying to reproduce it using the Python API of cplex with ...
1
vote
2answers
208 views

Docplex Error: Model has non-convex objective

My objective function is $\frac{1}{2}w^{T}Vw - P^{T}w$ with $V$ a covariance matrix (hence semidefinite positive), $P$ a column vector and $w$ a vector of semi-continuous variables. Given that the ...
2
votes
1answer
154 views

How to display the range of coefficients in docplex log?

A typical gurobi log can have a section where it shows the range of coefficients. Something like: ...
3
votes
2answers
156 views

Could DOcplex.CP recognize that it solves the graph coloring minimization problem?

I created a graph coloring DOcplex.CP model inspired by this example. However, I do not know the number of colors in advance. The goal is to minimize the number of colors (i.e., get as close as ...
3
votes
2answers
162 views

Rotated Second-Order Cone Constraints in docplex

I have programmed the model in here using Gurobi 9.0 in Python 3.7. To ensure playing within the boundaries of the licensing, I am trying to program it using CPLEX where we have broader flexibility ...
3
votes
1answer
166 views

Logical operation on an array in DOCplex

Here is a simple example of logical operation in docplex taken from here. Code below works fine. ...
9
votes
1answer
369 views

Integrating genetic algorithm (or other heuristic methods) with CPLEX

[Topic to discuss GA and CPLEX] I've seen some papers trying to integrate genetic algorithm with CPLEX, such as here and here. Although they integrated both, it is done in 2 different steps; that ...
7
votes
3answers
595 views

Constraint programming using solver: how to state the time limit of search?

Could someone give additional explanations about the TimeLimit of CPLEX for CPO? I am using CPLEX to solve a problem of assignment and scheduling in which each task needs to be assigned to a worker, ...
5
votes
1answer
164 views

Precedence constraints using binary variables - DOCPLEX

I would like to establish a precedence constraint to ensure the precedence relation of tasks. I have a set of tasks available, but required tasks are not always the same. It means, the tasks executed ...
5
votes
1answer
175 views

Scheduling with transition costs - DOCPLEX

I am dealing with a kind of scheduling problem. I have a set of tasks to be executed by a set of machines. It is known that different machines are able to execute the same task, but each machine can ...
8
votes
1answer
355 views

When using docplex.cp is it possible to get all feasible solutions?

I would like to solve an ILP and get all feasible solutions (even the worst one). How could I do that using docplex.cp? I've seen a similar question in: Using CPLEX "solution pool" to count ...
5
votes
0answers
56 views

How to handle constraints in docplex to states the relation between two variables?

I am using docplex.cp and I need to state the following constraint: $$\sum_{c}(X_p{_w}_{cj}+X_{p+1}{_{w'}}_{cj+1})\leqslant T_w{_{w'}}_{,jj+1} + 1$$ Knowing that the binary variables are: $X_p{_w}...
7
votes
1answer
97 views

DOCPLEX: tips to manipulate data input (binary parameter)

I am coding a MIP problem in docplex and I would like to ask for some tips. I would like to input a binary parameter that states a compatibility relation: I have a set of characteristics $H$ to be ...
5
votes
2answers
457 views

How to establish constraint between variables with multiple indexes using CPLEX in Python

I am new in CPLEX and I am using docplex in Python to solve an ILP. I would like to translate the following constraint in docplex: $$\sum_{c}(X_p{_w}_{cj}+X_{p+1}{_{w'}}_{cj+1})\leqslant T_w{_{w'}}_{,...
10
votes
1answer
171 views

DOCplex adding columns

When using DOCplex to implement column generation, is it possible to add columns as an object, as opposed to creating a variable and then modifying the coefficients in the constraints? Edit: In ...