Questions tagged [cplex]

CPLEX is a fast commercial linear, quadratic, and mixed-integer optimizer. CPLEX offers a number of pre and post-processing tools allowing the software to substantially reduce the number of variables (columns) and constraints (rows) of a model. It is possible to solve models via an interactive shell, OPL (Optimization Programming Language), or a number of interfaces to programming languages, such as C, C++, Java, C#, Python, and MATLAB.

CPLEX is a commercial mathematical optimizer now owned and sold by IBM. It can solve continuous and mixed-integer optimization problems with linear and convex quadratic constraints and objectives and second-order cone problems. The core solver is written in C, but APIs are available for C, C++, Java, C#, Python, and MATLAB.

User's guide and API reference is available in the following formats:

  • PDF (for V12.1)
  • HTML (for V12.3 and up)

For troubleshooting questions that may involve back-and-forth (including posting attachments), or technical discussions about the algorithms, consider posting your question on the official IBM developerWorks forum instead.

1757 questions
0
votes
1 answer

Problems with CPLEX Python API on a mac

I have read many posts about problems but none of them can solve mine. Although I have been following this blog exactly I still get this error when I try to run one of the example src python files: Traceback (most recent call last): File…
steph
  • 515
  • 2
  • 6
  • 20
0
votes
1 answer

CPLEX: Benders Decomposition with Quadratic Term in the Outer Optimization

The problem is cross posted at : IBM CPLEX Forum I am trying to solve a two-stage optimization problem using benders decomposition. The basic problem looks like: min_x (f(x) + min_u(g(u))) where g(u) is a linear program that can be solved for a…
0
votes
0 answers

How to build the Minkovski projection in the Dantzig Wolf Decomposition

I want to implement column generation by using Dantzig Wolf Decomposition. In the algorithm, the feasible polyhedrons of the problem are represented as the convex combination of its extreme points and extreme rays. Thus we build a projection…
GogoXu
  • 1
0
votes
1 answer

Print an IloNumArray to a file inside an Incumbent Callback (C++)

I'm trying to print an IloNumArray to a file using fprintf(). The problem is that I don't know the length of the Array since it's filled by a getValues() method inside an Incumbent Callback. The code of the Callback where I'm having the problem is…
Javier
  • 13
  • 4
0
votes
1 answer

Precedence constrainted biknapsack

I don't have a stong background in combinatorial optimization nor programming and I have to write some code to solve the bi knapsack (2 capacities ) with constraints of precedence.. I've been working on it for 3 months now and I can't debug it and…
0
votes
1 answer

How to access IloIntArray elements while in Visual Studio debugger?

Hi StackOverFlow fellows, I'm solving MILP models in C++ with CPLEX via the Concert Technology library which encodes variable and parameter arrays respectively into IloVarArray and IloArray objects. I have already read the numerous questions on how…
Jacko
  • 88
  • 11
0
votes
1 answer

cplex Python sum constraint

I just get started with cplex Python API and I got problem with creating linear_constraints for my model. I want to do something like that: dvar float+ x[] Minimize: Sum(i in I) C[i] * x[i] subject to: sum(i in I) x[i] <= constantValue And my…
Isando
  • 13
  • 2
0
votes
1 answer

How to access solution for dual simplex solver?

I have an objective function with several hundreds of quadratic terms which I would like to minimize; in this case I try to minimize the absolute distance between several variables. So the structure of my problem looks like this (highly…
Cleb
  • 20,118
  • 16
  • 91
  • 131
0
votes
1 answer

Cplex: Sum all k less than t

In cplex how do I represent this, \sum_k<=t, for all t. So t is given, which in cplex I'd write: forall(t in T) and the range of k is such that for all k<= t.
Loading Zone
  • 119
  • 11
0
votes
2 answers

Merging arrays in CPLEX OPL

I am trying to merge four arrays of a different size to one array (subVolume). This array should contain 12 float values that correspond to the inputted strings. The append function does not work for me, because it only works with integer values.…
FabianW
  • 315
  • 4
  • 9
0
votes
1 answer

How to map database values in objective function in Mixed Integer Programming using IBM Cplex?

I'm trying to model a student assignment probelm using cplex. I have student details in a access database (ex: student id and marks) I was able to obtain these values from db to .mod file using tuples. tuple stuType{ int id; int mark; } stuType…
Ann
  • 293
  • 2
  • 3
  • 15
0
votes
2 answers

CPLEX OPL massy code error

I used IBM ILOG CPLEX Optimization Studio to run a MILProblem, but got an error with massy code. The file editor didn't alert any errors until I pushed the run button. The error is ÔËÐÐÅäÖá°option 1¡±²»´æÔڡ£ unknown OPL As such an error,…
0
votes
1 answer

Benders Decomposition Point Cuts in CPLEX's Python API

I am trying to implement Benders Decomposition to a Mixed Integer Linear Program using the python API that CPLEX exposes. The tutorial file (bendersatsp.py) that comes with it shows how we can implement "ray" cuts, when the inner sub-problem is…
statBeginner
  • 799
  • 2
  • 8
  • 21
0
votes
0 answers

Cplex Syntax to model a proportion constraint

I am having difficulty with the syntax (and possibly logic) of modelling a proportion constraint in Cplex: Here is the content of my .dat file: nPaper = 3; nWoods = 3; SalesPrice = [60, 75, 40]; PurcPrice = [50, 40, 30]; ProdCost = [4, 2.8,…
W4K1NG
  • 255
  • 1
  • 5
  • 13
0
votes
1 answer

Starting solution in CPLEX Optimization Studio

I am solving a MIP in IBM ILOG CPLEX Optimization Studio. I would like to first generate a solution where the main decision variables need not be integers, which will then be used as a starting solution to solve the model where the decision…
1 2 3
99
100