Skip to main content

Questions tagged [cplex]

Questions related to the commercial solver IBM ILOG CPLEX Optimization Studio.

39 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
0 answers
643 views

Cplex is stuck after root node relaxation solution

I am solving an MIP through Benders decomposition (coded both generic and legacy callback versions), by employing Java with Cplex 12.9. For some of the instances, Cplex is stuck for two hours (time ...
Vedat BAYRAM's user avatar
5 votes
0 answers
124 views

Scale of largest CPLEX/Gurobi execution

I am trying to understand the CO2 emission of large scale optimization using CPLEX or Gurobi. Is there a published literature which addresses the compute usage of large scale executions?
Omar Shehab's user avatar
4 votes
0 answers
155 views

How to invoke a solution pool and access all the solutions in cplex using PYOMO ? this is the structure of my pyomo code

...
Prachi Patki's user avatar
4 votes
0 answers
380 views

CPLEX Python: Current subproblem model in branch and bound

I have an MILP problem and use CPLEX (Python interface). I am working on user heuristics for branching in the branch-and-bound procedure. With HSCallback I managed to get the information about the ...
Elena's user avatar
  • 251
3 votes
1 answer
200 views

Implementing Logic-based Benders decomposition on a single search tree

Currently, I am working on a scheduling problem and trying to approach it by the logic-based Benders decomposition method. Theoretically, I have everything, i.e., the master and sub problem(s), the ...
Amir Hosseini's user avatar
3 votes
0 answers
97 views

cplex callbacks: getting the branching variable

I would like to obtain the number of the variable cplex branches on at the current node during B&B. I try this by using the callback ...
Nikou's user avatar
  • 75
2 votes
0 answers
151 views

Why the column generation algorithm remains stuck at the same solution?

I was trying to solve a MILP by a column generation algorithm, and I noticed that the algorithm was stuck at the same solution, I tried to diversify the pool of initial columns, but the problem I ...
Nada.S's user avatar
  • 429
2 votes
0 answers
105 views

Automated Benders Using Annotations

I'm trying to solve an optimization model using Automated Benders with annotations using CPLEX library in C++. I've defined a master problem and N (number of supply nodes in my model's network) ...
Vala's user avatar
  • 61
2 votes
0 answers
67 views

Discrepancy between CPLEX interface solution and C API

I have a C API program uploaded here in Dropbox that is an LP. Here is the problem: When I compile the C file it gives me "1017 Not available for mixed-integer problems" while the problem is ...
Max's user avatar
  • 27
2 votes
0 answers
93 views

MIP start in cplex using Java

When I am reading an "lp" file for the problem and using a MIP start reading from a "sol" file it works. But when I pass on the same model directly to cplex (without writing lp) ...
Suman's user avatar
  • 21
2 votes
0 answers
63 views

Where is the relative gap from cplexbilp?

I am invoking cplexbilp (CPLEX 12.9) from Matlab R2022a. I request all 4 return arguments: ...
user2153235's user avatar
2 votes
0 answers
134 views

Defining a highly non-linear function of integer variables

I have a complicated non-linear objective function of positive integer variables subject to linear constraints: $\mathop {Min}\limits_{\underline x} f(\underline x)$ s.t. $A\underline x\leq \underline ...
Johnthemathematician's user avatar
2 votes
0 answers
116 views

Achieve true determinism in CPLEX

I'm unable to achieve true determinism in CPLEX (I'm using the DOCplex python API). Even if the best integer optimal solution is found without going to timeout (so it is expected to be unique), two ...
Daniele 's user avatar
2 votes
0 answers
76 views

Making multiple branches in make_branch function of Cplex

In my current python code, I have used MyBranch call back of Cplex to make 2 branches and solve my model. However, I now need to generate 4 branches after the first incumbent is generated. I need ...
ShraddhaBG's user avatar
2 votes
0 answers
271 views

Pyomo + Cplex - OSError: [Errno 22] Invalid argument

I am trying to get Cplex working with pyomo. I have followed Cplex installation instructions has explained here: Downloading and setting up CPLEX for Pyomo However when calling Cplex via pyomo I get ...
Meth's user avatar
  • 424
2 votes
0 answers
264 views

Building model takes so much time in Cplex

I am a beginner in CPLEX. I have a model with about 1 million constants and 800k rows and 1.6 million columns. I implemented in both GAMS and CPLEX (C# as the platform). The final solution for both is ...
pouria arsalani's user avatar
2 votes
0 answers
116 views

How to implement CPLEX user cuts using CPXaddusercuts in C API?

I am trying to use CPXaddusercuts to add cutting planes, which have not been violated yet but are likely to be violated as we go down the branch & bound tree, to the list (pool) of constraints. As ...
SHUVABRATA CHAKRABORTY's user avatar
2 votes
0 answers
119 views

how to convert type of variable in CPLEX

I have an Integer Linear Problem which is solved quickly when I change my variable type to double. now I'm developing a fix and relax algorithm and I used conversion to change data type which takes a ...
fhm.ider's user avatar
1 vote
0 answers
58 views

Getting error in callback (lazy constraints) for docplex with Python to solve MILP

I am trying to use lazy constraints to solve my MILP problem. The details are given as follows. ...
Mohammad Samiullah's user avatar
1 vote
0 answers
77 views

CPLEX gets stuck in "Performing restart"

During solving my problem using generic lazy cuts (in Benders decomposition fashion), the solver gets stuck logging out "Performing restart 2" for several hours (while the time limit is 30 ...
Amir Hossein Hosseini's user avatar
1 vote
0 answers
36 views

Calling Cplex from R through a MPS-like file

I have a working - and long - R code to generate a mps file to be read by cplex. Because I work with large instances I am finding troubles (too much time) in producing a large mps file. Is there a way ...
Di Al's user avatar
  • 11
1 vote
0 answers
86 views

Weird behavior when using Automatic Benders Decomposition in CPLEX

I've encountered some weird behavior when using the Automatic Benders Decomposition in CPLEX. I initially solved the MIP without BD and then I compared the results against the Full, Workers and User ...
CHE's user avatar
  • 113
1 vote
0 answers
90 views

Linearization of Conditional Constraints for MIP using Cplex

I'm currently working on a mixed-integer programming (MIP) problem and I'm trying to implement a set of conditional constraints in CPlex. These constraints involve decision variables that are indexed ...
B.Kim's user avatar
  • 11
1 vote
0 answers
84 views

Information about number of simplex and barrier iterations in OPL CPLEX

I would like to know how can I obtain the exact number of simplex and barrier iterations used by CPLEX in OPL. The solution reports the total number of iterations but I want them to be separated (...
Emmanuel Gómez's user avatar
1 vote
0 answers
50 views

CPLEX OPL - Problem of arrangements and increments

I have a problem involving work shifts and assembly stations. Work shifts have the subscript = T Workstations have the subscript = J My decision variable is X[t][j] For each turn (T) I am trying to ...
Josafat's user avatar
  • 11
1 vote
0 answers
144 views

User callback doing nothing slows down Cplex

I am trying to do something with user callbacks in Cplex using Python API. For instance, I will need a callback that only counts the number of explored nodes. While testing something I noticed that ...
Elena's user avatar
  • 251
1 vote
0 answers
381 views

How to make unconstrained variables non-negative (as in excel solver) in AMPL?

This is a sequencing problem. I've got this variables ...
Don Quijote's user avatar
1 vote
0 answers
304 views

CPLEX callback in pyomo

I am trying to figure out what is the correct use of cplex callbacks in pyomo. In particular I am looking for the translation of the following example from gurobi to cplex: ...
Luca's user avatar
  • 59
1 vote
0 answers
472 views

CPLEX ignores a feasible solution given as start one

Assume we have 100% feasible solution for the model with decision variable a[i]. Then we are changing the objective function on something similar to ...
Markov's user avatar
  • 83
1 vote
0 answers
342 views

Implement sequential formulation in TSP (Miller, Tucker, Zemlin)

I'm trying to solve a TSP in different ways. I already did it with the formulation of Dantzig, Fulkerson and Johnson und now I want to do use the Miller, Tucker, Zemlin constraint. $$u_i-u_j+nx_{ij}\...
maxmitz's user avatar
  • 659
1 vote
0 answers
57 views

Making distinct modifications on a model

How can I apply different modifications separately on a model? The example in CPLEX documentation shows how to make modifications on a single solved model. However, unlike this example, I want to make ...
bugra's user avatar
  • 61
1 vote
0 answers
93 views

CPLEX keeps restarting in Pyomo

I tried running my model by adding the following settings to CPLEX. ...
Mike's user avatar
  • 717
0 votes
0 answers
43 views

How to correctly use legacy callbacks in CPLEX with C++ to generate Benders' cuts?

I've been working on implementing Branch-and-Benders Cut using CPLEX version 20.1 with the C++ API, but I'm encountering some difficulties. I've followed the example provided by CPLEX, specifically ...
Arctic_Skill's user avatar
0 votes
0 answers
45 views

Constraint formulation in MILP AGV Scheduling (using CPLEX)

I am currently working on a MILP formulation for optimizing AGV/AMR scheduling. The model aims to optimize task scheduling across multiple missions using a limited set of resources. Parameters such as ...
Rami's user avatar
  • 1
0 votes
0 answers
60 views

Solving a multi depot multi vehicle capacitated routing problem using global constraints

I have built the model, but at this point, I am not sure how do I ensure that each fighter starts from the assigned depot and comes back to that depot. here is my code. The ...
Shahrukh Mohd's user avatar
0 votes
0 answers
31 views

Need help defining constraints regarding start and end time on job shop scheduling AGV

...
Rami's user avatar
  • 1
0 votes
0 answers
116 views

why this little constraint changes my whole program?

I'm trying to linearize a CP in ILOG CPLEX. I have the following constraint that I want to linearize (I already simplified it with the big M) : ...
Marcocorico's user avatar
0 votes
0 answers
66 views

Why are these two constraint equations not equivalent?

I've made a CP Model of an hospital in ILOG CPLEX and I want to test the performance of the CPLEX version of it. In my CP model, I have the following constraint : ...
Marcocorico's user avatar
0 votes
0 answers
502 views

CPLEX returns no solution with deterministic time limit

I'm working with CPLEX using the python API (Docplex). If I set the time limit in seconds with model.set_time_limit(60) the solver returns the best integer feasible ...
Daniele 's user avatar