Questions tagged [docplex]

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.

177 questions
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
  • 784
  • 4
  • 16
5
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
  • 555
  • 1
  • 4
  • 17
4
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…
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
  • 3
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
  • 53
  • 4
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]; …
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
  • 9
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
  • 1
2
votes
2 answers

How to add quadratic constraints to the model by using DOcplex (python)?

Take this quadratic constraint as example: (-x1^2 + x2^2 + x3^2 <= 0) Note that in the CPLEX Python API, the above constraint is formalated as follows: m.quadratic_constraints.add( quad_expr=[["x1", "x2", "x3"], ["x1", "x2", "x3"], [-1, 1, …
aniuniu
  • 23
  • 3
2
votes
1 answer

Get values of a binary variables

I have a MILP that I solved using docplex. Now I want to get the value of my binary variables ( binary_var_dict) after the resolution. Can anyone tell me how should I proceed ? Thanks in advance
Death_Note
  • 21
  • 3
2
votes
2 answers

model.solve() method is not working ("CPLEX DLL not found") for DOcplex for Python

I build my mathematical model using DOcplex IBM package for Python. I am sure that the other part of the modeling is correct, however when the call to Model.solve() is executed, and I get the following error: "CPLEX DLL not found: please provide…
Faraz Ramtin
  • 165
  • 2
  • 11
1
vote
0 answers

Converting linear constraint to a boolean value

I'm trying to solve a transport Network design problem using docplex. The network consist of 8 nodes (A,B,C,D,E,F,G,H), and the feasible routes are described in the following code (e.g. "FEGH" meaning that the route starts with vertex "F", and then…
Kai
  • 11
  • 1
1
vote
1 answer

Docplex: Keyerror where there wasn't one before

I am trying to run a replication study, and I have run the code in question multiple times without error. I took a little time off to work on some other projects, and it suddenly doesn't work, I have run into the following error (with different key…
Sean
  • 11
  • 1
1
vote
1 answer

How we can use a decision variable as an index of another decision variable using ILOG CP optimizer in python?

I am modeling a vehicle routing and scheduling problem using CP. I have 2 kinds of decision variables, that is, sequencing and start time of each node. The sequencing variable contains the node number, and start time of each node depends on the…
1
vote
1 answer

Dynamic worker constraint in CPLEX python

I've been working at a rcpsp problem using docplex in python. I consider 10 tasks with indicative costs and a worker that has to complete these tasks in 10 timeframes (can be weeks, days etc.). One of my constraints is that the worker can perform a…
Dru_np
  • 13
  • 2
1
2 3
11 12