Originally posted by: HendrikWijnant
Dear all,
I recently started using CPLEX optimization studio for solving an MILP. While trying to read some float values from excel, I stumbled upon a problem. The problem is that CPLEX apparently changes some of these float values by a factor of 100 and leaves other unchanged. I tried to find why CPLEX does this on the internet or in the CPLEX and OPL guides but I could not find the answer anywhere.
So what happens is the following:
Using Sheetread, I read some float values into a 2dimensional array of floats. for example values like:
0,0033333
0,0000625
4,1666700
8,3333300
0,0001563
CPLEX apparently reads these values like this:
0,0033333
0,0000625
416,66700
833,33300
0,0001563
The values > 1 are multiplied by 100 and I have absolutely no idea why.
This is my code:
In the mod file:
range rRows = 1..nRows;
range rColumns = 1..9;
float data[rRows][rColumns] = ...;
In the data file:
SheetConnection sheet2("Data_50i.xlsx");
nRows from SheetRead(sheet2,"Lines");
data from SheetRead(sheet2,"Input");
I added the datafile in the attachments (it concerns column H, named as v[f])
Is there anyone that has an idea on how this is possible?
#DecisionOptimization#OPLusingCPLEXOptimizer