Questions tagged [opl]

Optimization Programming Language (OPL) is an algebraic modeling language to describe models of optimization and mathematical programming. It is part of IBM ILOG CPLEX Optimization Studio.

Optimization Programming Language (OPL) is a high-level, mathematical language for the description of optimization models, which produces substantially simpler and shorter code than general-purpose programming languages.

438 questions
1
vote
1 answer

About CPLEX files

I would like to ask a few primitive questions about CPLEX: There is a model, which is formerly written by someone else. Also, the .mod file is connected with a .dat file. Do I need to create a special OPL project area to use these files? Do I need…
1
vote
1 answer

How to present distance data on excel (or retrieve data from excel) while using CPLEX OPL?

I have three locations, multiple depots,multiple stops and multiple landfills. All depots, stops and landfills are separate (each starting from 1)? My distance variable d[i][j] (distance between i and j) where i can take any value from depot or…
1
vote
1 answer

How to extract a model's .lp file from CPLEX OPL 12.10

I am working on my thesis statement and i want to automaticly create .lp file of my model by using Cplex OPL's user interface (Windows). I do not know how it should be and quite willing to know the answer. Also, if it is possible, My model takes…
purkai
  • 13
  • 3
1
vote
1 answer

Read 2D indexes and tuple from Execl sheet

I have tried to define Useduration as the 3D array but I did not know how to define the tuple elements. I have received an error" float of 2 dimensions not supported for sheet". is there a way to read it from excel? ` {string} sources=...; range…
1
vote
1 answer

How to find the number of elements in a set? CPLEX OPL

Lets say I have a set: {int} A ={1,2,3,4}; How can I get the number of elements in this set in CPLEX? Thanks in advance!
Yan H.
  • 49
  • 4
1
vote
1 answer

Only build and check model

I have a model in ILOG CPLEX written in OPL. I want to run all the semantic checks (in particular all the assert statements). I do not want to produce any output files or solve the model. Judging by the summary of the execution process explained in…
HTC
  • 107
  • 1
  • 4
1
vote
1 answer

Problem with lexicographic model - CPLEX OPL - Model is running forever with no answer

I stopped at 1:31min, and this was the Engine log output: I am making a model using CP for goal programming - lexicographic. The data come from an excel file. The problem is: the software is working, working.... with no answer. I can see that it…
1
vote
1 answer

How to write an 4-dimensional variable from CPLEX to Excel?

I already read the other Topics About writing multidimensional Arrays from CPLEX to Excel, and tried the solution provided, but it did not work. In my case I have a 4-dimensional variable. So I build a 5-dimensional tuple and want it to be written…
LSM_3008
  • 11
  • 1
1
vote
1 answer

Parameters to limit memory for CPLEX

My MIP Model in OPL CPLEX V12.9 is currently working with a small amount of Data, but with a bigger database import from excel, after running for 1 hour I get the following error: Error 1001: Out of memory. I already know that I can change some…
Frieda12
  • 37
  • 1
  • 7
1
vote
1 answer

SheetWrite Data in Columns

I am using OPL CPLEX 12.9 and I want to write my results in an excel file. It is a two dimension array and I want to write the results in two columns but is it only possible to write the Data in lines? Example Code in .dat Product_Cost to…
Frieda12
  • 37
  • 1
  • 7
1
vote
1 answer

Influence of tolerances on the binary variable?

I am using OPL CPLEX 12.9. In my model, a dvar float + variable disregards the non-negativity condition and returns the value -4.4409e-16. I have already read that this is due to the tolerances in Cplex. This does not bother the actual process…
Frieda12
  • 37
  • 1
  • 7
1
vote
1 answer

How to make sure if the vehicle start from a depot m, it must return to the same depot in CPLEX in Location Routing Problem

this is in my OPL code in Location Routing Problem, there are 3 candidates depots, 8 customers and 4 vehicles. the optimal result was: 300174667, the depot which open are 2nd and 3rd depot. the route turns out like this: from depot 2-4-8- depot 3…
ndns
  • 21
  • 3
1
vote
1 answer

opl cannot extract expression in CPLEX in Location Routing Problem

I get this error,"opl cannot extract expression", for dexpr and the first constraint when I am running the code in CPLEX. What can be the reason behind this error? How can I solve it? If you can help me, I will be really glad. The dexpr get an error…
ndns
  • 21
  • 3
1
vote
1 answer

how to run opl code(by caling opl file) in python

I have a data file inputpy.xlsx and I am converting this file to an opl input language(1 and 0) called outputpy.xlsx, and I have a working opl model that takes my outputpy.xlsx file and outputs to an excel file(oploutput.xlsx) from cplex…
amelda
  • 11
  • 2
1
vote
1 answer

Initializing tuples in ILOG OPL imported form a MS Access Database using .NET

I am connecting an MS Access database to an OPL model using the .NET solution presented here: https://github.com/IBMDecisionOptimization/OPL-.net-custom-data-source This works fine and I am getting all the Data out of my Database via SQL. However I…
Xilef91
  • 13
  • 2
1 2
3
29 30