Skip to main content

All Questions

Tagged with
0 votes
1 answer
50 views

How to initialize a three dimensional array in CPLEX?

int t=4; int b=3; int e=5; range time =1..t; range bus=1..b; range ev=1..e; float soci[ev][bus][time]=[[[0.5,0.3,0.8,0.7], [0.5,0.3,0.8,0.7], [0.5,0.3,0.8,0.7]] [[0.5,0.3,0.8,0.7], [0.5,0.3,0.8,0.7]...
haripriya's user avatar
0 votes
1 answer
180 views

IBM CPLEX ILOG Error : "Excel: size of the range is not the size of the array"

I am connecting to excel for solving a problem. I had used the same .mod file to solve a example with 5 rows of excel data. Now I am trying with an excel of 266 rows of data. I get an error "...
CallMeMeow's user avatar
0 votes
1 answer
39 views

How to generate the third array from the first two arrays in cplex?

How to generate the third array from the first two arrays int a=10; range aa=1..a; int b=3; range bb=1..b; range cc=1..a-b; int firstarray[a]=[1,2,3,4,5,6,7,8,9,10]; int secondarray[b]=[1,4,...
MO MO MA's user avatar
-1 votes
1 answer
48 views

Why is there an error when attempting to initialize a 3D array because it is not an array type and the range does not exist?

Actually, I want to input 14 matrices as a 3D array. For that, I have entered the first matrix, and  then the other 13 matrices are typed below the first matrix. The data file code is given as ...
Harip's user avatar
  • 9
1 vote
0 answers
32 views

No error in CPLEX but there is no solution

Here it is showing soc[t][number] is partially initiated. But I am only given the soc values for first hour and i want to update the value of soc in each hour.can I want to write soc as a decision ...
Haripriya M R's user avatar
0 votes
1 answer
83 views

Writing a 3D array from C-plex to Excel with a different matrix configuration

I have been trying to write a 3D decision variable from C-plex to Excel. My problem is that when I convert the decisional variable array into a tuple to write the values into an excel file, the values ...
Sukesh Ravi's user avatar
0 votes
1 answer
75 views

How to define array from another defined array?

I have this array [1,3,2,5] and i want to generate this one [1,3,3,3,2,2,5,5,5,5,5] from the first array how to do this in cplex ? Thanks in advance
MO MO MA's user avatar
0 votes
1 answer
243 views

IloNumVarArray Vs IloNumArray

I am working on a project in which the problem is solved using CPLEX. There are two classes IloNumVarArray and IloNumArray that I do not know their difference. I really appreciate it if someone can ...
Masoud Kavoosi's user avatar
0 votes
1 answer
155 views

CPLEX OPL ERROR RUNTIME : not to type lloType ,

It is confusing; I do not what the problem is. Does anyone know what the problem is?I get this error,"opl not to type runtime error", for some expression in my objective function when I am ...
Jack-5M's user avatar
0 votes
1 answer
289 views

How to find the length of an array and sum of an array and then sumproduct of two diff arrays in cplex IBM ilog?

I have int a ; int b ; int c ; range m= 1..a; range n= 1..b; range o= 1..c; int s[m]=[11,1,1,1,1,1,1,1,1,1]; int q[m][o]=[[4,5,0,2],[3,2,1,0],[0,1,4,5],[3,2,0,1],[2,1,3,2],[4,3,2,1],[3,4,2,0],[5,0,3,...
Deepan's user avatar
  • 9
0 votes
1 answer
407 views

Is there a way to write 3 dimensional array from CPLEX to Excel?

I'm having a result array of X[k][i][j] (with k in Day range from 1 to 365, i in Task range from 1 to 200 and j in Repetition range from 0 to 365). I know how to write a 2 dimensional array from cplex ...
minh dang's user avatar
0 votes
1 answer
109 views

How to find the sum of this array in CPLEX (concert C++)?

I have written this code to find the sum int sum=0; for (i = 0u; i < n[k]; i++) { sum = sum + include[k][i]; } definition for include is as follows: IloArray<...
Prarup's user avatar
  • 17
0 votes
1 answer
176 views

How to convert an array into a set in CPLEX?

Let's say that int A=[1 2 3 4]; How to convert it into a Set? {int} SetA =?
Prarup's user avatar
  • 17
0 votes
1 answer
1k views

How do I input 3D array data in CPLEX?

Set of inputs int i=...; //set of origins int j=...; //set of destinations int t=...;//set of time periods i=100; j=100; t=4; How do I input these data in CPLEX? Cplex cannot read 3D arrays from ...
Anika Tabassum's user avatar
1 vote
1 answer
109 views

I can not reach the array' s previous iteration values in OPL Script

I have a MIP model in CPlex. In each iteration I use different .dat files and solve the problem. I hold the decision variable solution values in a multi dimensional array like "Array[iteration][...
MerveIb's user avatar
  • 17

15 30 50 per page
X