Questions tagged [cplex]

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

Filter by
Sorted by
Tagged with
8
votes
1answer
459 views

Optimization software for ARM Architecture

Given that tomorrow Apple will likely announce the first ARM Macs (per bloomberg), I was wondering what the current status of ARM support in optimization software. For instance, does anyone know if ...
5
votes
1answer
259 views

CPLEX gives different solutions of MILP every run

I am solving a mixed-integer (binary) linear problem using CPLEX as a solver (branch-and-bound method). But I encountered the following issue. Each run I get a different solution at a different node ...
8
votes
3answers
245 views

How to determine different gap rates?

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
0answers
86 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: ...
1
vote
1answer
62 views

Tuples OPL in VRP

I am trying to build a constraint of the form x[i j] +x[j i] <y[i][j] where x is a decision variable if arc ...
3
votes
1answer
101 views

CPLEX oplrun says the problem size has exceeded, but then proceeds to solve the problem anyway

I have downloaded and installed the CPLEX Studio Community Edition 20.1.0.0 on my Linux machine (KUbuntu). I want to use the oplrun tool directly from the terminal. ...
3
votes
1answer
133 views

CPLEX solver for quadratic problems with barrier algorithm

I'm writing a convex minimization model with a quadratic objective function and linear constraints in C#. I set CPLEX to solve the problem with the barrier algorithm. The interesting thing is when I ...
3
votes
1answer
375 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 ...
2
votes
1answer
46 views

How to model a cumulative resource constraint with same family condition?

Assume that we have 3 tasks to schedule : $x_{a1}, x_{a2}, x_{b3}$. They all use the same cumulative resource : $r_1$. Each activity increases $r_1$ by $1$ at it starts time and decreases $r_1$ by $1$ ...
3
votes
1answer
101 views

Conditional constraint with a strict inequality

It's almost this question: Formulating the conditional constraint But there they have non-strict inequality. I have $x_i$ a boolean decision var and $Q_i$ as a nonnegative integer decision variable ...
21
votes
3answers
6k 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. ...
2
votes
2answers
3k views

Downloading and setting up CPLEX for Pyomo

I have just installed Anaconda and am intending to use Spyder as it is able to display variable, parameter values for debugging. After which, I am planning to use Pyomo to code my MIP model and invoke ...
3
votes
1answer
130 views

Extracting CNF representation of my problem from SAT solver

As I know, any SAT solver such as or-tools or cplex cp optimizer converts a given problem to CNF form in the first place. Is it possible to extract the resulting CNF representation from or-tools or ...
2
votes
1answer
41 views

Constraint raises DCP Error

I have defined a problem which will minimize the cost of to run a pump. That is defined as the objective of the problem. ...
0
votes
0answers
23 views

Add bunch of constraints using IRange and add to Model in Cplex C#

I am new in C#-CPLEX. In public samples, the constraints are added one by one as follows: ...
2
votes
0answers
74 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 ...
3
votes
1answer
175 views

How to compare the optimality gaps between a commercial solver and Benders

Suppose I have a mixed-integer-linear programming model where the objective is maximization. I solve my model in two different ways. First, I call CPLEX (a commercial solver), and then implement ...
3
votes
1answer
97 views

Standard Form for LP and MPS

Is there any way I could have Gurobi/CPLEX or any other package write/export MPS and LP files in the standard LP construct loaded with slack variables and transformations required for unsigned vars? ...
1
vote
1answer
117 views

Operator error in operating cost model constraint

I have built a model to minimize the operating cost and when I coded a model in CPLEX, it gave an error at Cons09: ...
2
votes
2answers
73 views

How to use `cplexAPI` to solve quadratic programs/quadratically constrained linear programs?

I am trying to use cplexAPI to solve quadratic programs or quadratically constrained linear program. While it seems to be pretty straightforward to use ...
5
votes
1answer
243 views

Why does one objective function prove feasibility faster than another?

I recently ran a MIP model with cplex specifying it should stop solving when integer feasibility was proven (mipsolutions=1). ...
3
votes
4answers
231 views

Book recommendations on OPL

Are there any good books that teach how to work with OPL in CPLEX? I searched but I didn't find any.
2
votes
1answer
136 views

How to code this with Cplex?

I have an optimization problem as below. For $g\in G$, let $\mathcal{N}_g$ be the nodes in group $g$, and let binary variable $u_g$ indicate whether group $g$ is used. The problem has this following ...
4
votes
1answer
135 views

LP solver CPLEX is 'optimal with unscaled infeasabilities'?

The problem being solved is finding the truss with the least weight, exactly done as on this website: https://www.layopt.com/truss/. This method is also called the ground structure method. I am aiming ...
2
votes
1answer
38 views

ILOG CPOptimizer soft constraints (multiple solves reusing searched space)

I'm trying to feed information retrieved from my neural network to my CP model to help narrow down the search on big instances of my problem. However, I also want to remove the additional imposed ...
20
votes
3answers
2k views

Using Neural Networks For Solving Optimization Problems

Recently, I came across the below paper and found it very interesting. Solving Mixed Integer Programs Using Neural Networks; https://arxiv.org/abs/2012.13349 The idea is to use (train with neural ...
4
votes
2answers
247 views

Any transformation of constraints during Cplex's LP problem export?

We are exporting a optimization problem from matrices to LP format using Cplex. ...
3
votes
1answer
195 views

The optimum is achieved only by forced "solution polishing"

I have the behavior of CPLEX during a MIP search, when it finds the optimal solution in a reasonable time during a forced "solution polishing" phase only. Otherwise, if you do not switch the ...
12
votes
2answers
639 views

Generating all extreme rays

I am trying to understand a problem and would like to generate all extreme rays for a given set of linear constraints. With the Python interface of CPLEX, I was able to generate a single ray (not sure ...
5
votes
1answer
133 views

Do you know of any formula to calculate the difficulty score of Sudoku?

I am looking for a formula to measure the difficulty level of a Sudoku solution.
5
votes
2answers
510 views
3
votes
2answers
205 views

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

I noticed that when I run the solver via the GAMS IDE or Python API I don't use more than ~33% of my RAM. Is there an artificial barrier which I can put up or disable?
6
votes
1answer
156 views

Why does CPLEX continue solving after finding the optimal solution?

I ran a MIP model with a max solving time of 1800 seconds. CPLEX found the optimal solution (0.00 % MIP gap) after 710 seconds, but continued processing until it was stopped by the 1800 second limit. ...
2
votes
1answer
136 views

Benders decompositions: Number of iterations does not remain the same

I am solving an LP (i.e 118-bus system economic dispatch for 130% loading) using Benders decomposition. The problem takes 26 iterations to converge. This means that the process adds 25 cuts to the ...
6
votes
1answer
129 views

Upper and lower bounds of a variable equal

I'm working on a MILP (Mixed-Integer Linear Programming) problem with the Java API of Cplex. In order to easily exclude some variables from my problem I thought about setting both their lower and ...
4
votes
1answer
273 views

CPLEX log always the same after hours ("Gap" and "Best Integer" always blanks)

I'm using the Java API of CPLEX 12.6.1 (with license) to solve a MILP (Mixed-Integer Linear Programming) maximization problem. The point is that, after 21 hours, CPLEX has consumed 32 GB of RAM and ...
1
vote
0answers
149 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 ...
4
votes
1answer
36 views

behaviour of CPXsetincumbentcallbackfunc

I am using the incumbent callback CPXsetincumbentcallbackfunc to identify integral solutions that do not satisfy nonlinear constraints that are not explicitly part of the constraint set. When such a ...
2
votes
1answer
81 views

CPLEX Indicator Constraints in Java API

I'm using the Java API of CPLEX (12.6.1 version) to solve a MILP problem. This is how I create 'normal' constraints: ...
2
votes
1answer
144 views

The precision of the decimal number of the Cplex

I have faced a little weird problem when I use Cplex to solve my test problem. Basically, some of my data are float numbers up to three decimal numbers (For instance, 0.627). But, when I print out the ...
6
votes
1answer
192 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 ...
1
vote
0answers
107 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}\...
1
vote
2answers
161 views

Combinatorial Optimization Problem using IBM ILOG CPLEX

Consider the combinatorial optimization problem described as below. Let $D=(V,A)$ be a directed graph with $V$ the set of vertices and $A$ the set of arcs, i.e., $A=\{(i,j)\mid i,j\in V\}$. On each ...
0
votes
1answer
64 views

ILOG CPLEX Overflow occurred

When I run my CPLEX model, under the Profiler tab I get the error Overflow occurred, please use oplrun -profile. How do I setup oplrun? I looked at the IBM website ...
1
vote
1answer
59 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.
0
votes
1answer
102 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(). ...
2
votes
0answers
66 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 ...
3
votes
1answer
118 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 ...
5
votes
4answers
521 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 ...
2
votes
1answer
141 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 ...