All Questions
Tagged with cplex integer-programming
47 questions
0
votes
0
answers
69
views
How to define this complex labor rule as a constraint in MIP?
Im trying to define a complex labor rule as constraints in a MIP, solved with CPLEX.
My key decision variable is a binary x(i,j) indicating if shift i is assigned to employee j.
The labor rule is as ...
2
votes
1
answer
246
views
How to set Gurobi to stop after the objective value reaches a certain threshold in Julia?
I am trying to run a minimization problem for an MIP using Gurobi in Julia. I would like it to stop after it has found a solution that is below a certain threshold that I have set. I have found ways ...
0
votes
1
answer
71
views
Truck Type (infinite number of them) vs Orders
The goal of the docplex model below is to choose the trucks with total minimum cost to fulfill all orders. I treat the truck type as 1 truck in the following code, but in fact, a truck type can have ...
0
votes
1
answer
368
views
CPLEX won't display decision variables after successful solution
I set up a code for a course scheduling optimization problem using IBM CPLEX.
The decision variable is dvar boolean x[course][roomtype][timeslot];, where x is 1 if the course takes place in a room ...
0
votes
1
answer
96
views
How do I run a simulation experiment (iterative procedure) in CPLEX?
I am a beginner of programming. I'm trying to practice run a simulation with CPLEX.
Since I want to be a person who wants to work in an area in optimization.
Therefore, I am trying to study some ...
0
votes
1
answer
746
views
what's the difference between optimal solution of cplex and the optimaltol solution of cplex?
what's the difference between optimal solution of cplex and the optimaltol solution of cplex?
1、When I solve a integer programming model with CPLEX solver, the result status of some instances show ...
0
votes
1
answer
502
views
Need to speed up the operations on numpy arrays in python
I am solving an integer programming model by importing Cplex as a library in Python. Let's say the optimization problem has a constraint in the following form (Ax = b):
x0+x1+x1+x3 = 1
The indices of ...
1
vote
1
answer
283
views
Run callback only at the root node
I'm solving an integer linear programming problem with CPLEX 12.7 using a branch-and-cut framework. I'm using the CPLEX callable library in C++.
Therefore, I implemented an UserCutCallback callback. ...
0
votes
1
answer
380
views
How to clone a cplex object in Java?
I am solving a problem in Java using the CPLEX library. I use a class "Model" to create a CPLEX object, and add to it variables, objective function and multiple constraints. This is the ...
0
votes
1
answer
288
views
Why does CPLEX set unrelated variables as 1?
I have been working on a combinatorial optimization problem which can be modeled as an integer linear programming. I implemented it as a c++ project in visual studio 2017 and CPLEX1271. Since there ...
0
votes
1
answer
83
views
Problem with binary decision variable constraints in VRP
I would like to create non-linear violation costs in my VRP. I already created my whole VRP with time windows in which I have these decision variable:
dvar float+ w[N][D]; // violation time for late ...
0
votes
1
answer
921
views
Cplex Error: Adding trivial infeasible linear constraint
I want to solve an integer programming model with cplex python. I have this model:
a and h are matrixes with 0s and 1s. p is a set of numbers.
here is a part of my cplex code for this model:
p=[i for ...
0
votes
1
answer
176
views
Inequality Constraint x Upper Bound Definition on Variable Declaration
Which is more computationally efficient for a Mixed-Integer Problem Formulation:
a. State the upper and lower bounds of the variables when declaring the variable
b. Declare the variables with the ...
0
votes
1
answer
52
views
How can I make a variation limits, do not exceed a specific value
Now I am facing a problem that making a variation does not exceed a specific value.
I will describe in details below.
using CP;
int a = 4;
int b = 3;
int c = 5;
range arange = 1..a;
range brange = ...
0
votes
1
answer
719
views
How to solve this error when I use CP in Cplex
Now, I am facing with an error.
'Decision variables of type dvar float not supported by this algorithm.'
Here is the code that I made.
I will write it simply.
Firstly, I got in trouble with error ...