Questions tagged [cplex]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
36 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
233 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
96 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
119 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
32 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
215 views

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

We are exporting a optimization problem from matrices to LP format using Cplex. ...
19
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
118 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
182 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
126 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
48 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
112 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 ...
2
votes
1answer
71 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
100 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
230 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
68 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
76 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
130 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
79 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
49 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
44 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
173 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
97 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
93 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
443 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
76 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
64 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
85 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
232 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
226 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
68 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
449 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
254 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
110 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
644 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
125 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
138 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
70 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
67 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
85 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
356 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
83 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
115 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
88 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_{...
4
votes
2answers
104 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
147 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
86 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 ...