Skip to main content

All Questions

Tagged with
0 votes
1 answer
28 views

Docplex use for timeseries based variables

I am trying to model an optimisation problem where each item in a list is essentially power generated at that hour. I am trying to minimise the amount of energy stored while still getting the same ...
Trev's user avatar
  • 23
0 votes
1 answer
43 views

Limit the memory used when solving using docplex

I am implementing a mathematical model using docplex and the academic version of CPLEX. I am attempting to solve very big problem instances. I faced a MemoryError. Is there a way to overcome this? I ...
M Germanos's user avatar
10 votes
3 answers
25k views

How to resolve `np.float_` was removed in the NumPy 2.0 release. Use `np.float64` instead error from docplex?

I'm trying to rerun an older code (about a year old). I have installed academic version of CPLEX 22.1.1 version and Python API and docplex in python. However, the dependencies have changed and ...
Meet Saiya's user avatar
-1 votes
1 answer
427 views

Creating and/or logic between constraints DOcplex python

I'm trying to transfer my constraints from Cplex OPT studio to the DOcplex Python. The logic between the constraints is - if 1 of them does not met all the decision variables needs to be 0. In Cplex ...
Aviv Carmeli's user avatar
0 votes
0 answers
541 views

CPLEX DOcplexException on Mac big sur(M1)

from docplex.mp.model import Model opt_model = Model(name = 'Linear Program') x = opt_model.continuous_var(name = 'x', lb = 0) y = opt_model.continuous_var(name = 'y', lb = 0) c1 = opt_model....
MD. ABU SAYED's user avatar
0 votes
2 answers
651 views

docplex.mp.utils.DOcplexException: Expecting sequence of linear constraints, got: docplex.mp.QuadraticConstraint[]

Please pardon my ignorance. I was trying my understanding on Docplex. I produce this code to model optimization equations as shown in the picture below. My main concentration is constraint 2c, I can't ...
Anas's user avatar
  • 135
1 vote
1 answer
962 views

CPLEX with student edition on google colab

I have google colab but I get the warning for using CPLEX and Docplex : 9 frames CplexSolverError: CPLEX Error 1016: Community Edition. Problem size limits exceeded. Purchase at http://ibm.biz/...
Yousuf Qadri's user avatar
0 votes
1 answer
893 views

How to install CP Optimizer 20.1 with docplex?

I am installing docplex using pip install docplex and it shows: Successfully installed docplex-2.22.213 When I run the code it says: - CP Optimizer 12.10.0.0 - But since the latest ILOG CPLEX ...
S.Perera's user avatar
  • 904
1 vote
1 answer
1k views

Linear Programming: List of all solutions generated using DocPlex in PYTHON (failing with the cplex solution pool)?

I am actually facing an issue in the resolution of a problem. My problem is a Liner Programing problem with optimization of the food diet and minimization of the cost. As the problem is similar to ...
etienne_b's user avatar
0 votes
1 answer
348 views

docplex.cp.model out-of-memory running on a cluster

I am trying to run the following docplex.cp.model with a large dataset. This is with some sample data: import numpy as np from docplex.cp.model import CpoModel N = 180000 S = 10 k = 2 u_i = np.random....
S.Perera's user avatar
  • 904
0 votes
1 answer
98 views

Maximize revenue with deadline

Given three interval variables say a = mdl.interval_var(name='a',start=(0,10),end=(0,10),size=5) #have revenue of 10 b = mdl.interval_var(name='b',start=(0,10),end=(0,10),size=5) #have revenue of 5 c =...
william007's user avatar
  • 18.6k
0 votes
1 answer
196 views

DOcplexException: Expression xx cannot be used as divider of xxx

I am new to CPLEX and I was trying to find an example where the decision variable is in the denominator of the objective function but couldn't. My optimisation problem; I have tried the following on ...
S.Perera's user avatar
  • 904
0 votes
1 answer
135 views

Get the value of resource used

Given the code below (example from:https://www.ibm.com/docs/en/icos/20.1.0?topic=f-pulse) from docplex.cp.model import CpoModel, INTERVAL_MAX import docplex.cp.utils_visu as visu mdl = CpoModel() a1=...
william007's user avatar
  • 18.6k
7 votes
1 answer
1k views

Cplex installation "Could not find a version that satisfies..." and "No matching distribution" for Apple M1

I am trying to run cplex on my M1. I am hoping I can get it to run on python 3.8/9 because I also need to run tensorflow (which I run through miniconda for M1). When I try to pip install it within the ...
chiennifer's user avatar
1 vote
1 answer
103 views

Performance for recurring doopl calls

I'm using doopl.factory to solve multiple linear programs in a loop. I noticed a decreasing performance while looping through instances. Using memory_profiler shows that the memory increases after ...
orarne's user avatar
  • 21

15 30 50 per page