Questions tagged [cplex]

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

Filter by
Sorted by
Tagged with
4
votes
4answers
375 views

How to visit a subset of network nodes in a single trip?

I have a connected network where I want to visit a set of destinations which may require visiting intermediate nodes as well because there may be no direct edge between source and destination nodes. I ...
5
votes
1answer
131 views

Obtaining the system of irredundant inequalities from a set of inequalities using CPLEX

Given a linear system of inequalities $Ax \geq b$, I would ideally like to compute the irredundant set for those set of inequalities. I know how to do so mathematically, but I was wondering if there ...
2
votes
1answer
63 views

Accessing Lagrange Multipliers in CPLEX

I want to get the lagrange multipliers for a solution from cplex. I am using it via Python. The problem is continuous with a linear objective function and elements of solution vector $x$ are ...
3
votes
1answer
35 views

Obtaining linear relaxation objective value from MILP model coded in Pyomo

I would like to seek some advice on modeling the following: I am currently using Pyomo to generate my MILP model in Pyomo. It seems that it is not possible to cast the integer and binary variables to ...
3
votes
1answer
56 views

Problems with reading CPLEX LP models from file in R by package 'lpSolveAPI'

As an R user, I'm trying to read a CPLEX LP model from file by using the read.lp function from package lpSolveAPI. Here's the command line (from within RStudio): ...
2
votes
1answer
66 views

Numerical problem regarding to classical benders cut of large scale problem

I am trying to implement benders decomposition for a simple two stage unit commitment problem. I implemented the classic Benders decomposition to add feasible cut and optimal cut to relax master ...
3
votes
1answer
164 views

Implementing benders decomposition using Lazy and User cuts callback of Cplex

I am trying to implement benders decomposition for a simple fixed charge transportation problem for the purpose of learning. I implemented the classic Benders decomposition successfully by adding ...
4
votes
2answers
160 views

Why did CPLEX jump from version 12 to version 20?

This is not a very technical question, but I'm having trouble finding any information about it. I often use CPLEX to solve my power system planning problems. I just noticed that CPLEX suddenly jumped ...
1
vote
1answer
53 views

Cplex callable library

I am trying to compile very old source code which uses cplex functions from the callable C library (cplex 4.0). Some of the functions seem to have been renamed/replaced... Can anyone tell me the ...
1
vote
2answers
197 views

Avoid infeasibility in “fixed MIP problem” in CPLEX

I would like to find dual values and reduced costs after solving a MIP problem using CPLEX. IBM's solution in this case is to fix the integer variables to create a “fixed MIP problem”, then solve this ...
2
votes
2answers
246 views

How can I express this max-min in CPLEX?

Initially, I had the below objective function $\max \sum_{u=1}^{U}\sum_{c=1}^{C}x_{u,c}d_{u,c}$ where $x_{u,c}$ are optimization variables I modelled this in CPLEX as ...
4
votes
1answer
89 views

How does CPLEX handle objective estimates passed to the makeBranch method?

I want to implement a (simple) branching heuristic through a CPLEX generic callback. There are multiple overloads of the makeBranch method in CPLEX's C++ API, see here: ...
7
votes
1answer
198 views

Program can't stop when using callback of usercut in CPLEX to solve a branch-and-cut problem

When I tried to use Java to call CPLEX and use callback functions to solve a VRP problem with branch-and-cut, some problems emerged. I took out the subtour elimination constraint from the original ...
0
votes
1answer
104 views

Assignment problem with variable tasks to be done

I'm dealing with a kind of assignment problem, in which I have a set of tasks $t$ to be executed by machines $w$, but these tasks depend on the variatns $v$ of components $m$ being selected, which is ...
10
votes
2answers
622 views

Do LP solvers convert LPs to standard form?

To solve a linear program (LP) using the simplex method one first needs to bring the LP to standard form. This requires replacing every equality constraint with two inequalities and replacing every ...
1
vote
1answer
109 views

Why some decision variables don't get values in Cplex?

I use this code in the cplex and don't know why some decision variables don't get value, I attach my code below. I don't know my model is wrong or my code? I haven't error in the code but have some ...
3
votes
1answer
92 views

How to assign values to array in CPLEX with C++?

I am new to CPLEX. I am using CPLEX with Xcode in macOS. I have three arrays (known parameters used in optimisation) which I define as ...
5
votes
1answer
115 views

Add robustness of AMPL code through file name

I want to add robustness to my AMPL code, here is what I am actually doing: In my script I use a .txt file that contains all my parameters, let's call it "instance.txt". I want to print my ...
1
vote
1answer
61 views

How define variable in CPLEX and What is diffrence between decision variables and variable in CPLEX

I want to code a problem by CPLEX, in this problem I have variables and decision variables, how define them? In this picture you can see the variables: which we have: I use these codes for variables:...
2
votes
1answer
59 views

Generating a different optimal solution from CPLEX for each run

I recently chanced upon the idea of solution diversity through the setting of random seeds within CPLEX. However, the documentation page on the settings does not shed any light with regard to the ...
1
vote
1answer
78 views

Coding the OR problem with cplex

I am new to using OPL. I wrote a CPLEX code for the vaccine distribution from a paper, it doesn't get an error, but it hasn't given the answer. I don't know its problem; please help me; I attached the ...
4
votes
2answers
232 views

Two-Objective Optimization in CPLEX

Until now, I used CPLEX to solve single-objective optimization problems only, but now I need to solve a two-objective mixed-integer linear optimization problem and I noticed that CPLEX 12.6.9 (unlike ...
2
votes
1answer
75 views

Solving multiple problems with identical constraints but different objective function using CPLEX

I am interested in solving a set of maximization problems where those problems only just differ in their objective. The objective functions are all linear and the constraints are all just affine. I ...
0
votes
1answer
118 views

Solving 2d bin packing, nesting problem with Cplex

Is it possible to solve a 2d bin packing problem or nesting problem with Cplex? The solution should present the $x$ and $y$ coordinates of each item.
4
votes
1answer
77 views

Binary variables with multiple indices

I'm new to Cplex and I'm working with the python API. I have a variable $w^t_{iksm}$ and I could just find the binary_var_cube function which only accepts 3 indices. I'm then using this $w$ to define $...
2
votes
1answer
81 views

Minimizing a quadratic binary nonconvex function by CPLEX

I am using CPLEX 12.8 to minimize a quadratic binary nonconvex function, according to quadratic function by CPLEX. In particular, my function is the following: $$ \sum_{i=1}^{m-1} \sum_{f=1}^{F} \sum_{...
3
votes
2answers
71 views

How to improve relative mip GAP using CPLEX in a MIP

Supose that I have an integer feasible solution for a MIP and I provide this one for CPLEX. I have tested this situation in a problem and CPLEX have reported the following: ...
3
votes
1answer
126 views

Problems finding a feasible solution in a MIP

I am using CPLEX with Julia using the package JuMP to solve a MIP problem. In a small instance, I have tested my problem but, after 10 minutes, nothing happens. I have defined the following parameters ...
3
votes
1answer
106 views

Find a particular optimal solution

After writing an integer linear program in AMPL, I solved it using CPLEX. Now, I have some variables that must necessarily be 1, others that must necessarily be 0 and finally it is possible that some ...
18
votes
3answers
5k views

What is the purpose of libraries like Pyomo and Google OR tools?

I'm new to the OR world, and trying to learn the various tools available. I originally thought that Pyomo and Google OR tools were open source alternatives to commercial solvers like Gurobi or CPLEX. ...
5
votes
2answers
384 views

How to establish constraint between variables with multiple indexes using CPLEX in Python

I am new in CPLEX and I am using docplex in Python to solve an ILP. I would like to translate the following constraint in docplex: $$\sum_{c}(X_p{_w}_{cj}+X_{p+1}{_{w'}}_{cj+1})\leqslant T_w{_{w'}}_{,...
7
votes
3answers
605 views

Cplex 12.10: How can I solve an LP relaxation?

I have an IloCplex object which contains a MILP. Is there a way to obtain the objective value of its LP relaxation, without having to rewrite the entire model as ...
3
votes
1answer
63 views

How to collect solutions within CPLEX and retrieve them from PYOMO?

I would like to seek some advice on modeling the following: I am currently to invoke solvers, CPLEX, in particular. As I am solving my problem sequentially, i.e., the top-level subproblem results are ...
3
votes
1answer
141 views

How to set combined stop condition in AMPL/CPLEX?

I would like to set a stop condition combined of a timelimit and a relative MIP gap. So I would like AMPL/CPLEX to look for the solution of my LP for an hour and if there isn't a solution stop if or ...
5
votes
3answers
410 views

Gurobi and CPLEX cannot exploit more than 32 cores of machine

I have some attempts to solve a scheduling problem using the Gurobi and doCPLEX API in python and .NET on Ubuntu-server installed on a hyper-computing cluster with 64 physical cores. Unfortunately, ...
1
vote
2answers
111 views

GAMS default Solver doesn't use much of my RAM and CPU

I noticed that when i run solver via gams ide or python api i dont use more than ~33% of my RAM. Is there a artificial barrier which i can put up or disable?
5
votes
1answer
65 views

GAMS: Is there a way to retrieve the gap from the final solve statement

Good evening, I am looking for a way to retrieve information from the final solve statement. Lower bound and Gap would be nice. I am working with the python api but i can only get the final obj. value ...
2
votes
2answers
137 views

CPLEX output log

Whats the difference between MIP solution and Final Solve? I am trying to benchmark some solution approaches and I am not sure which of those is the more significant... sometimes they have the same ...
-1
votes
1answer
93 views

GAMS CPLEX solver solves big problem instances suspiciously fast

I am having trouble with my Problem Instances, which seem to be not "complicated" enough.. Is there a way to find out what the problem is? It is being solved in a matter of seconds even if ...
4
votes
1answer
56 views

splittable multicommodity problem with CPLEX

I am working on a splittable multicommodity flow problem, where each commodity can be split into k orders. However, I don't know the value of k in advance. Here is my code. ...
9
votes
2answers
159 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
2answers
99 views

Constraint to handle the machine-configuration's change between initial position and its first occurrence in the process

I am working with a kind of a reconfigurable process planning, meaning that the same machine can have different configurations and perform multiple operations. Each machine has an initial ...
3
votes
1answer
216 views

Why does the getTime() function from cplex concert returns wrong value?

I am running a MILP formulation (implemented in C++) with the Cplex Concert Technology 12.10, and I am trying to get the total elapsed time. So till the moment, I have tried three approaches: Be ...
3
votes
1answer
85 views

Bioinformatics / Genomics Optimization Problems?

I am a third year bioinformatics student and would like to apply my knowledge from an introductory course in Optimization Methods to some problems in the field of genomics or bioinformatics. Do you ...
1
vote
1answer
36 views

Get array of sequences for array of interval arrays in OPL

So I want to define multiple sequences (an array of them). I have this: ...
5
votes
2answers
103 views

how to determine differents gap rate?

I found in the literature different gaps: a gap between a random solution and an exact solution a gap between the exact solution and a lower bound a gap between the exact solution and a lower bound a ...
2
votes
2answers
182 views

implementation of heuristics using C++ to solve operations research problems

can anyone suggest some good books with the implementation of heuristics and matheuristics using C++ to solve operations research problems especially routing problems such as TSP and VRP. also, I need ...
17
votes
4answers
2k views

What are the advantages of commercial solvers like Gurobi or Xpress over open source solvers like COIN-OR or CVXPY?

I come from an ML background, and occasionally have to dive into the OR world. I am trying to figure out whether I need to purchase a commercial solver license for a certain problem set. In the ML ...
4
votes
1answer
246 views

MILP Minimum set Vertex cover coding by Python or MATLAB?

As a following up for my question for modeling a simple moded of the minimum set vertex cover problem, which is shown next. I would like to have your help in modeling this problem using Python or ...
3
votes
1answer
179 views

How do I interpret the CPLEX Optimization Studio MIP gap output?

I'm having difficulties understanding my FlowControl output compared to what the Engine Log shows me. My output from the FlowControl into the Scripting Log (yellow marks) is ...