Skip to main content

Questions tagged [cplex]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
36 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
2 votes
1 answer
126 views

CPLEX 20.1.0.0 and python version 3.10

I am trying to develop in python 3.10, and locally I have cplex 20.1.0.0 installed. It appears to me that the python interface cplex only supports python version 3....
TTY's user avatar
  • 245
0 votes
0 answers
44 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
55 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
30 views

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

...
Rami's user avatar
  • 1
0 votes
1 answer
75 views

Exception from IBM ILOG CPLEX: CPLEX Error 5002: 'q1' is not convex.->

I am currently solving a scheduling optimization problem regarding the fleet management of AGV/AMR. I always get the same error and I don't know where to start to solve it. Here's the code snippet for ...
Rami's user avatar
  • 1
1 vote
0 answers
71 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
2 votes
1 answer
65 views

How to deal with performance bottlenecks in Stochastic Vehicle Routing Problem with Benders' decomposition?

I've been working on solving a stochastic vehicle routing problem using Benders' decomposition with CPLEX in C++. Initially, my implementation struggled with larger instances, but I've made ...
Arctic_Skill's user avatar
1 vote
1 answer
46 views

custom branch and bound on cplex or GAMS

Does anyone have an idea how to create a custom B&B on CPLEX or GAMS? In my work, I need to add custom cuts on integer solutions in certain conditions by adding only one branch. Also, I need to ...
BADJARA Mohamed el Amine's user avatar
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
1 vote
1 answer
55 views

Cplex no solution but no conflict

I am solving a problem using benders decomposition. The master problem is solved by cplex.The subproblems are logic and can be solved without using cplex solver. The scale for subproblem is large. ...
XXia's user avatar
  • 49
3 votes
1 answer
126 views

What does a solver do with a MIP warmstart solution?

From what I understand, most solvers use a user provided solution by first detecting if it feasible. If it is feasible, its objective value is used as a first bound for the branch and cut tree, this ...
JKHA's user avatar
  • 679
1 vote
1 answer
121 views

How to turn off tree search in fico xpress ? Couldn't see relevant documentation

trying to solve a very large problem , using heuremphasis as 3 , cutfreq=0 , scaling =4, run time reduced significantly however , solver spends 400 seconds in tree search , but couldn't see any ...
21vs's user avatar
  • 489
0 votes
1 answer
46 views

Using CPLEX in C++, how can I efficiently alter the objective function and then resolve the problem?

I want to solve an optimization problem using the CPLEX API in C++. After solving the model, I then want to resolve it using a different objective function. For that purpose, I learned the functions <...
Arctic_Skill's user avatar
3 votes
2 answers
225 views

Convex equivalent of a constraint

I have a constraint as follows in my MILP model: $$ \sum_{e} (a_1(e) - a_2(e))^2 \leq M $$ Where, $a_1(e)$ and $a_2(e)$ are binary variables. Would you please guide me how can I find the equivalent ...
Mohammad Reza Salehizadeh's user avatar
2 votes
1 answer
250 views

Replace the constraint using ==> by a linear formulation

I would like to know how to express the continuity constraint without using a decision variable in the conditional form. My challenge is to stay with a linear formulation. I will start to explain my ...
Basma Ben Mahmoud's user avatar
2 votes
1 answer
179 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
1 vote
0 answers
35 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
1 answer
93 views

Benders Decomposition using Cplex

I wanted to know whether the Automatic Benders Decomposition from C-plex allows us to solve the sub-problems in parallel over multiple cores. From what I know, one can set the number of threads in ...
Vivek's user avatar
  • 21
2 votes
1 answer
51 views

Info callback in CPLEX OPL

Does CPLEX OPL provides support for info callback? By info callback I am referring to callback allowing to retrieve information of the current solution at a given step of the optimization process.
Matheus Diógenes Andrade's user avatar
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
2 votes
1 answer
394 views

Non-proprietary (Python friendly) alternatives to Cplex and Gurobi

I have implemented a pure binary integer combinatorial optimization routine within a Python module (importing gurobipy), and experimented with relaxing a few ...
Cbhihe's user avatar
  • 123
1 vote
1 answer
115 views

How to obtain nodes count and nodes left in docplex (using CPLEX 12.20 and Python 3.8)

I solving a MILP problem as given below using Python 3.8 and CPLEX 12.20. I want to obtain the number of nodes and nodes left. The details of the codes are as follows: n_xvars=2 n_yvars=2 #Create ...
Mohammad Samiullah's user avatar
0 votes
1 answer
120 views

Linear Programming faster solver: CPLEX or Gurobi?

Which one is the best solver for solving large-sized problems in Linear Programming, CPLEX or Gurobi? Which one is faster?
Abbas Khademi's user avatar
0 votes
2 answers
147 views

Tips for implementing Benders Decomposition in C++?

currently I am working on implementing Benders Decomposition for a large-scale stochastic MIP in C++ using the CPLEX Solver. I've been spending the last couple of months learning the programming ...
Arctic_Skill's user avatar
1 vote
1 answer
56 views

How to change CPLEX parameters from within CPLEX Studio IDE 22.1.1

I coded my mathematical program in CPLEX Studio IDE 22.1.1 However due to the difficulty of the problem the run takes days and then shows an out of memory error. I read that I can try to use "...
Optimization's user avatar
2 votes
2 answers
131 views

Which data type is best used when programming an optimization problem in C++?

Switching over from CPLEX Optimization Studio, now I want to solve problems in C++ using the CPLEX API. Being used to the CPLEX data types, I was wondering how they best translate to C++. For example, ...
Arctic_Skill's user avatar
1 vote
0 answers
145 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
  • 409
1 vote
0 answers
87 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
2 votes
1 answer
101 views

Can a logical expression be added to the objective function of a model in docplex?

I'm working on an optimization problem using Docplex and wonder if it's possible to incorporate a logical expression into the objective function of my model. Specifically, I have three variables x, y, ...
Nada.S's user avatar
  • 409
1 vote
1 answer
92 views

Get objective upper bound in a callback (cplex)

I wonder if there is a way to retrieve the global objective upper bound in a callback in Cplex (in cpp)? I tried several context/IloCplex/IloModel... methods but nothing worked.
charles padinski's user avatar
2 votes
1 answer
375 views

CPLEX violating constraints (CPLEX - version 12.10 - C++)

I'm a researcher and I have a problem with CPLEX. The .lp file containing the model includes the following constraint: 1000000000 x(1,12,0) + T(1,0) - T(12,0) <= 999999992 where x and T are ...
Juliana Dantas's user avatar
0 votes
1 answer
151 views

Cplex seems to terminate early as optimal when starting solution polishing

I occasionally see this slightly strange thing happen with cplex where it jumps from a MIP gap of, say 5%, to then reporting the status as optimal. This happens when it starts solution polishing after ...
James's user avatar
  • 9
3 votes
1 answer
223 views

Dual problem in IBM CPLEX

Im solving n-dimensional Knapsack problem as LP problem. I noticed that sometimes dual LP problem may be solved much faster than primal. My test problem contains 500k variables and 50k constraints, ...
John's user avatar
  • 131
4 votes
1 answer
277 views

MIP Model with relaxed integer constraints takes longer to solve than normal model, why?

I am currently working on my undergrad thesis which is a mathematical optimization problem of the territory design family of problems. I am using the mathematical formulation of the problem to solve ...
EduardoSalazarT's user avatar
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
0 votes
1 answer
92 views

Array of string in OPL

how to make 2d array of strings in Cplex //indics {string} cluster=...; setof(string) darkstore =...; setof(string)demandpoint =...; //data cluster={chav,sree}; demandpoint=[{tsnami,adholokam,...
Kiran Kumar S's user avatar
3 votes
1 answer
251 views

Converting continuous variable dict to binary variables in python docplex

I am solving a problem using linear relaxation at the initial phase. Hence, I need continuous variables at the beginning. Then I need to convert some continuous variables to binary and solve the same ...
user avatar
3 votes
3 answers
258 views

Summation of maximization terms in CPLEX

I have a problem in the following type: $$\sum_{i∈I}{\max_{j∈J}c_{ij}\cdot x_{j}}$$ For each objective, in a set of $x$ variables, the goal is to select the one with the highest cost coefficient. ...
user avatar
2 votes
1 answer
211 views

Updating constraint set rhs in docplex

I am trying to update the rhs of a constraint iteratively under a while loop in docplex, however, it does not work properly. As I analyze the output text file, while some constraints are updated as I ...
user avatar
2 votes
3 answers
435 views

"Re-optimize" feature in Commercial Optimization

How does the "re-optimize" feature work in commercial optimization solvers such as IBM CPLEX and Gurobi? I recently experienced a considerable performance boost by re-solving a model with ...
Pia MiA's user avatar
  • 392
2 votes
0 answers
102 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
1 answer
134 views

How should I implement Benders Decomposition with annotations in C++ using CPLEX library

I'm a beginner in C++ and want to implement Benders decomposition in C++ using CPLEX. I'm gonna use it for a special case study, so I need to customize the cuts to minimize the optimality gap. However,...
Vala's user avatar
  • 61
3 votes
1 answer
148 views

How to remove a callback that was previously registered in Julia?

I'm coding in Julia, how can I do the same as "Remove(Cplex.Callback)" function does in C++ ?
Brown's user avatar
  • 173
5 votes
1 answer
215 views

Two-Stage Stochastic Optimization: How to deal with Infeasible scenario while calculating EEV (Expected result of using the EV solution)

I am trying to solve some of the stochastic optimization proposed problems for an Optimization course I joined. One of the exercices asks to solve the Expected Value problem. I already made it. Next ...
Alfonso_MA's user avatar
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
7 votes
2 answers
570 views

Implementing Heuristic Callback in CPLEX C++ API for MILP

I am trying to implement a heuristic callback to a MILP with BOTH integer variables and continuous variables. After finding a feasible solution, I tried to use setSolution() to send the solution to ...
Jasonzjc's user avatar
3 votes
2 answers
267 views

Modifying and re-optimizing a model using CPLEX Python API

I came across the following functionality that is offered by CPLEX for modifying and re-optimizing a model based on previous computations: https://perso.ensta-paris.fr/~diam/ro/online/cplex/cplex1271/...
Pia MiA's user avatar
  • 392
2 votes
1 answer
70 views

How to get the fractional solution of a node in a MIP model using JuMP package?

I'm coding in Julia and use the JuMP package. My IP solver stops by a fixed node limitation. I noticed that I can only get the feasible primal and dual solution if has any, however I would like to get ...
Brown's user avatar
  • 173

1
2 3 4 5 6