All Questions
23 questions
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 ...
0
votes
1
answer
137
views
Using the piecewise function in the objective function of the IBM CPLEX python API
I can't find the piecewise attributes when using Cplex in Python.
I know with docplex this can be done for example:
from docplex.mp.model import Model
mdl = Model(name='')
f=mdl.piecewise()
Is ...
1
vote
1
answer
58
views
How to write the constraint (A + B <= 1) in DOcplex?
I am new to DOcplex. I have two binary decision variables A and B and I wish to write the constraint (A+B <=1). I tried to write the constraint using "+" operator but it does not work.
...
0
votes
1
answer
173
views
Compute objective function in CPLEX
I am trying to solve the supplier diversification problem by minimizing the costs.
I basically have a list of pricing for an item from different suppliers. The suppliers are willing to give me some ...
0
votes
1
answer
51
views
Cplex: how to display this linear program in Cplex
enter image description here
How do i write this constraints in CPLEX (linear-program)?
∑ j∈M until ∑ k=i xaijk ∗ bkj = dai, ∀i ∈ N, ∀a ∈ B ∩ A1; until = min(i + va, n)
1
vote
1
answer
138
views
CPLEX solve one problem with many different inputs
I am solving a basic linear programming problem: min c*x, with an A*x = b constraint, using CPLEX with Python (DOCPLEX).
Then I run the above LP for 10k-100k different combinations of b and c (A stays ...
-1
votes
1
answer
190
views
Cplex Python Gaps
How can I print the gaps(each iteration) like OPL's engine in Python? I want to keep the gaps like this:
Nodes Cuts/
Node Left Objective IInf ...
0
votes
2
answers
217
views
Python Cplex Ceil() Function
ceil() in the constraint
Hello, I am studying a published paper. One of the constraints from this paper(which can be shown in the link) requires the ceil() function. We can use the ceil() function at ...
0
votes
1
answer
918
views
How to use nested IF-THEN constraints in DOCPLEX (Python)?
I am modeling the situation I want using python cplex.
While using it, a few questions arose, and these are:
Can I use nested IF-THEN constraints in CPLEX?
First, I could find below how to use the ...
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 ...
0
votes
2
answers
397
views
How to code subtour constraint in cplex python
I am quite new in python cplex. I tried to model VRP and needed to eliminate subtours for feasible solution, but I cannot do that with the following code:
from docplex.mp.model import Model
import ...
0
votes
1
answer
416
views
Cplex for Linear Program: Are DOCplex decision variables assumed to be non-negative?
I want to write a simple LP using docplex. Suppose I have three variables: x, y, and z, the constraint is 4x + 9y - 18.7 <= z. I wrote the constraint with the code model.add_constraint(4 * x + 9 * ...
0
votes
1
answer
857
views
How to use CPLEX Multi-Objective (ObjectiveSense) parameters
I am working on pure LP problem and using Multi-Objective to solve it. When I am using objective with weights:
solver1.minimize( A* 1000
+ B* 10000
...
0
votes
2
answers
257
views
Size of integers in CPLEX
I tried searching quite a bit but could not find the answer. What is the size of integer variables in CPLEX? Is it 64-bit or is it arbitrary precision based on the bounds?
0
votes
2
answers
965
views
Understanding DoCPLEX Multi Objective
I am working on Pure LP problem with around 3 Million Constraints and I am currently using objective function with different weights. But to improve run time I am hoping to explore DoCPLEX multi- ...