Questions tagged [cplex]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
57 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 ...
1
vote
2answers
176 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 ...
4
votes
2answers
153 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
50 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 ...
2
votes
2answers
215 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
86 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: ...
3
votes
1answer
137 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 ...
0
votes
1answer
103 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
108 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
86 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 ...
1
vote
1answer
60 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
207 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
74 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 ...
4
votes
1answer
75 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
80 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
69 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
125 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
62 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 ...
5
votes
3answers
386 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, ...
5
votes
1answer
64 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 ...
1
vote
2answers
106 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?
2
votes
2answers
131 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 ...
9
votes
2answers
155 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
98 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 ...
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. ...
0
votes
1answer
114 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.
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
102 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 ...
5
votes
0answers
107 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 ...
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
226 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
167 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 ...
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
2answers
101 views

Issue with number of threads on Cplex

I'm solving a bunch of similar problems and I want to compare them. To do so, I need everything to run on one thread. Even by setting the number of threads to 1, the model still runs on 8 threads. Has ...
1
vote
0answers
50 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 ...
3
votes
1answer
144 views

Implementation of Local Branching

I've been recently reading some papers where the authors use local branching specifically in Benders Decomposition (see for reference). Although I understand up to some extend how the algorithm works, ...
2
votes
2answers
331 views

How can I identify the reason that makes a MILP model hard for solvers such as CPLEX?

I'm solving a MILP model whose native lower bound (via linear relaxation) is very poor. We could provide a lower bound by providing a given value (derived based on the problem itself). I know that ...
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 ...
2
votes
1answer
73 views

Can CPLEX output LP solution with primal variables only?

CPLEX writeSolution method outputs both primal and dual variable values of a LP. I know how to parse through the solution file to extract specific primal variable ...
3
votes
1answer
157 views

Semi continuous constraints in CPLEX Python

I have a semi-continuous optimization problem reformulated as a MIQP optimization problem. My objective has a quadratic form $x^{T}Qx$ and my $x_{i}$ are such as $x_{i} \in [m,M] \cup \{0\}$. ...
2
votes
0answers
53 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 ...
3
votes
1answer
40 views

How can I change decision variable type in Concert Technologies (with Java)

I have a MILP model with continuous variables ($y_{ij}$) and binaries ($x_{ij}$). I am using Java and cplex 12.8 for implementation. Is there a way by which - using the Java-cplex API - I would be ...
3
votes
1answer
89 views

Benders implementation on Cplex is very slow

I'm working on a location problem and I have an issue with the Benders decomposition. I'm using Cplex with Python. I coded a single cut and a multi-cut to compare. The single-cut implementation takes ...
1
vote
0answers
49 views

CPLEX keeps restarting in Pyomo

I tried running my model by adding the following settings to CPLEX. ...
5
votes
2answers
174 views

How to linearize a quadratic constraint to add it then via a callback function

Suppose we have a positive continuous variables $0 \le x \le UB$ where $UB$ is a known upper bound. How can we linearize the term $x^2$? Detailled problem: Suppose that via a callback we compute a ...