Skip to main content

Questions tagged [cplex]

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

Filter by
Sorted by
Tagged with
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 ...
2 votes
2 answers
85 views

Optimizing calls to a separation problem in branch and cut

I have a MIP in which I am able to generate cuts at intermediate relaxation solutions using the context class. These cuts are derived from a separation problem. However, after adding them, the code ...
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. ...
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 ...
2 votes
1 answer
163 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....
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 ...
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 ...
0 votes
1 answer
90 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 ...
0 votes
0 answers
31 views

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

...
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) ...
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 ...
2 votes
2 answers
933 views

How to use tight upper and lower bounds to get to the optimal value via branch and bound?

I have algorithms that get me a tight upper (UB) and lower (LB) bound to a maximization binary integer program (a routing problem). My formulation is non-compact and requires the addition of sub-tour ...
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 ...
1 vote
1 answer
47 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 ...
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) : ...
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 : ...
1 vote
1 answer
61 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. ...
5 votes
2 answers
104 views

How to formulate case distinctions in AMPLs objective function?

This is my first real optimization problem I formulated and now trying to solve by using AMPL. The following objective function is from a linear 0-1 LP means all variables $x_i^b\in\{0,1\}$, with $i\...
3 votes
1 answer
669 views

Cplex : The cutting stock problem

The problem below aims to minimize the cutting leftovers from each cut : A company manufactures desks for kids gardens and primary schools, colleges and high schools. The leg of these desks all have ...
3 votes
1 answer
129 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 ...
1 vote
1 answer
124 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 ...
1 vote
2 answers
340 views

Apply Benders decomposition approach in CPLEX with python while using docplex class

I am new to cplex with python. I want to solve a problem using the Benders decomposition approach. Where I want to use UserCutCallback and LazyConstraintCallback. I am writing code in script format (...
0 votes
1 answer
51 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 <...
3 votes
2 answers
228 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 ...
2 votes
1 answer
251 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 ...
5 votes
1 answer
375 views

Precedence constraints using binary variables - DOCPLEX

I would like to establish a precedence constraint to ensure the precedence relation of tasks. I have a set of tasks available, but required tasks are not always the same. It means, the tasks executed ...
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 ...
4 votes
1 answer
2k views

How to read a solution file (.sol) in cplex python API?

I've been to trying to read a .sol file in cplex python API before solving the problem but couldn't find any command to do so. There are analogous commands for this ...
2 votes
3 answers
449 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 ...
2 votes
1 answer
554 views

Re-optimizing pyomo model based on previous computation

I am currently new to pyomo and modelling techniques but I came across information mentioning that the CPLEX and Gurobi APIs offer a functionality where you can re-use already computed values and feed ...
1 vote
1 answer
154 views

How to call Cplex.AddMIPStart method

Could you please tell where I can find a method Cplex.AddMIPStart? By that I mean in which library and how to link this library to my C# project.
7 votes
1 answer
567 views

CPLEX MIP warm start seems slow down the program?

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. With the hope ...
0 votes
1 answer
171 views

How can I use warm start in C#

I have been working on an MIP in C#. I want to reduce the gap, so I'm trying warm start. I use this code just before solve(). ...
22 votes
2 answers
7k views

How does a warm start work in LP/MIP?

Can someone explain how warm starts/ MIP starts work? How do solvers like CPLEX/GUROBI use warm start with the Simplex algorithm? I am interested in understanding how the entire warm start pipeline ...
16 votes
1 answer
2k views

Warm start CPLEX using google or-tools

I have been trying to use the SetHint python API in google or-tools to warm start MIPs and solve it using CPLEX. It looks like my hints are accepted by the SetHint function but I am not sure whether ...
1 vote
1 answer
98 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 ...
2 votes
1 answer
283 views

Ways to improve lower bounds while solving MIPs

What are the ways to improve lower bounds while solving a minimization problem (MILP)?
2 votes
1 answer
54 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.
7 votes
1 answer
1k views

Negative reduced cost for basic variable

I am observing something unusual : after solving a linear program, some basic variables have negative reduced costs (instead of $0$) : ...
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 ...
9 votes
3 answers
313 views

Objective Integrality Cuts

Consider a mixed integer linear program with an objective function that includes only integer variables. Objective integrality cuts are known as a class of valid inequalities that can be added to ...
2 votes
1 answer
513 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 ...
1 vote
1 answer
125 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 ...
0 votes
1 answer
129 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?
0 votes
1 answer
157 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 ...
0 votes
2 answers
153 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 ...
1 vote
1 answer
62 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 "...
2 votes
2 answers
132 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, ...
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 ...
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 ...

1
2 3 4 5 6