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

Is it possible to add personalized column to CPLEX Optimizer Node Log?

IBM CPLEX includes the following eight columns on the Optimizer Node Log: Node 2. Nodes Left 3. Objective 4. IInf 5. Best Integer 6. Cuts/Best Node 7. ItCnt 8. Gap I must admit they offer interesting basic information describing the…
Jacko
  • 88
  • 11
0
votes
1 answer

speed up CPLEX C++ code

This is the result of implementing my very first model in CPLEX C++ and I am very much surprised how slow and poor the quality is. I belief that much of it can be avoided by a better formulation. Can anyone help me improve the code, please? Hints,…
steph
  • 515
  • 2
  • 6
  • 20
0
votes
1 answer

Warm start preparation failed: 1262 error in CPLEX while iterating over several scenarios

I am trying to run a model several times while increasing a certain coefficient of a variable in every iteration in CPLEX. In order to do this, I have had a look at the example file within the CPLEX install directory, named "mulprod". I am using the…
0
votes
1 answer

How to use NEOS Server for SCIP?

I'm trying to understand how to use NEOS Server for SCIP. I already read the tutorial about the CPLEX LP file format. But still I'm not able to get any results. Let's take the example provided in that tutorial: Maximize obj: x1 + 2 x2 + 3 x3 +…
Evgenij Reznik
  • 16,046
  • 33
  • 87
  • 157
0
votes
0 answers

Error using binary in a OPL file (CPLEX)

I'm actually using IBM ILOG CPLEX to solve some optimization problem, And I had a problem with binary variable I think I'm not using it in the right way.In fact I want to set Here my mod file : {string} Investments = ...; float Return[Investments]…
0
votes
1 answer

How to add constraint x∈{a,b} using cplex in Matlab?

I am trying to get solution for variable x using cplex in Matlab , but I'm confused how to write the syntax since I wanna the solution x∈{a,b}. For example, assume that I have this LP problem: Maximize x1 + 2 x2 + 3 x3 Subject to - x1…
shin
  • 1
  • 1
0
votes
1 answer

Using OPL CPLEX in Excel VBA?

I'd like to call OPL CPLEX and solve problems in a program coded on Excel VBA. I want to create an OPL model and, load .mod and .dat file into that model. After a long search process on the internet, I came up with some lines of script below…
Yusuf
  • 41
  • 7
0
votes
1 answer

CPLEX/OPL search phases without variable chooser

I have an OPL CP model in IBM ILOG CPLEX. It is possible only to set CP search phases with decision variable, variable chooser and value chooser. Somehow like that : execute { var f = cp.factory; var phase1 = f.searchPhase(slot, …
0
votes
1 answer

CPLEX with logical if/else operation

I am new CPLEX user. I have a question, can I use if/else logical operation in CPLEX? (not inside the constraint).
0
votes
1 answer

How do I choose parameters according to a condition when modelling an LP?

I am trying to write a mixed integer model in IBM CPLEX, and I have a problem. Here's the problem: There are several different courses that a student can take, and the utility that a student gains from a course is dependent on both the student and…
0
votes
0 answers

OPL cannot extract expression error

I try to create a set that dependent to a range in OPL (CPLEX)but I encounter 4 errors as follow: Data element "a" not defined. Invalid initialization expression for element "a". OPL cannot extract expression: H[j]. OPL cannot extract model: Out…
Alireza
  • 1
  • 3
0
votes
1 answer

OPL-Cplex saving the data view to Excel

How do you export the "data view" to an excel spreadsheet in the style opl cplex shows you? For example see screenshot. after clicking the icon marked with the red box you open the tab (green box). I want to save the green box into an excel…
saku
  • 1
  • 3
0
votes
1 answer

How can I use IloCplex::readSolution() and after query cplex class instance to obtain var. values and other values?

I need to read an incumbent solution stored before in a .sol file an then use instance of IloCplex as after having call 'solve'. I need to write something like: iloNumVar…
Roberto B
  • 33
  • 6
0
votes
2 answers

multi dimensional array in cplex c++ concert tech

I am trying to create a boolean matrix in c++ concert technology. I have defined typedef IloArray BoolMatrix; after that I declared it: BoolMatrix Assigned(env); but while trying input data by file >> Assigned, it is…
G. Dey
  • 3
  • 5
0
votes
0 answers

Setting multiple cores option with cplex matlab toolbox function cplexmilp

I am using CPLEX for MATLAB toolbox wherein I formulate my MILP as a huge matrix and use the function cplexmilp to call the solver. Since the model I am solving is really huge, I intend to set the option of using multiple processors to speed up the…
crypto
  • 105
  • 8
1 2 3
99
100