Questions tagged [cplex]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
41 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
89 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 ...
2
votes
1answer
39 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
72 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
90 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
90 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
98 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
69 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
241 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). ...
4
votes
1answer
118 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
127 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 ...
2
votes
1answer
37 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 ...
4
votes
2answers
232 views

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

We are exporting a optimization problem from matrices to LP format using Cplex. ...
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 ...
5
votes
1answer
130 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.
3
votes
1answer
193 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 ...
6
votes
1answer
134 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
0answers
54 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: ...
2
votes
1answer
126 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 ...
3
votes
1answer
123 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 ...
6
votes
1answer
116 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
248 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 ...
4
votes
1answer
35 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
74 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
106 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 ...
1
vote
0answers
142 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 ...
1
vote
0answers
86 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}\...
0
votes
1answer
57 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
52 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.
3
votes
4answers
207 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.
1
vote
2answers
124 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 ...
2
votes
0answers
65 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 ...
2
votes
1answer
121 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 ...
5
votes
4answers
493 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 ...
3
votes
1answer
101 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
79 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
89 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
279 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
278 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
70 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 ...
3
votes
2answers
575 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
104 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
332 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
125 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
679 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
166 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
160 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
128 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
76 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 ...