I am stuck with a flow control and main block and could not get a way out from the given CPLEX exmaples.
Actually, i want to solve optimization problem for more than 50 times (days in my case) with different data reading from excel sheet. For each day i have to change the data reading from excel and run it separately.
I want to implement the for loop ( from 1..number of required days) in main block, so that one for loop iteration will solve single day while excessing particular data for from .dat file.
Here is the prototype below, explaining what i actually want to do.
/* Model File*/
dexpr float OutCome=sum(h in hours) OutCome_h[h];
find1[h] + find2[h]<=10;
var initialmodel = thisOplModel;
( I am trying to implement some coding here with for loop to excess data from .dat file and solving the .mod file)
/* data file*/
X from SheetRead(sheet1,"d1!A1:D10"); Y from SheetRead(sheet1,"d1!E1:H10"); Z from SheetRead(sheet1,"d1!I1:L10");
P from SheetRead(sheet2,"P!B2:E2");
P.S: The number of days and data given in the example are very low, in actual i am dealing with large amount of data.
File is also attached containing this prototype example for ready use.
Kindly, give some feedback
Thankyou in anticipation