Originally posted by: Srihitha Reddy B
Hi, Alex!
Thanks for answering my question.
I have looked at the above link which you provided. But it was still confusing.
I had some variables in my program, and I need to have all those variables data again in a separate file or separate columns. I couldn't understand how the same program can be run multiple times with the multiple copies of data each executing individually.
Here, I tried using the code as follows in .dat file. Please let me know the modifications.
SheetConnection my_data("Allocationalgo.xlsx");
averagefdel from SheetRead(my_data,"avgfdel");
averageactpower from SheetRead(my_data,"avgactpow");
pcap from SheetRead(my_data,"p_cap");
power from SheetRead(my_data,"actpow");
currentpower from SheetRead(my_data,"serverpow");
//power_cap from SheetRead(my_data,"actpower");
pcap from SheetRead(data2,"pcap");
averagefdel from SheetRead(data2,"fdel");
averageactpower from SheetRead(data2,"avgactpower");
power from SheetRead(data2,"actpower");
currentpower from SheetRead(data2,"serverpower");
By doing this, am getting an error saying, "Data element 'pcap' has already been set."
Please help me out with this issue.
Thanks,
Srihitha.
#DecisionOptimization#OPLusingCPLEXOptimizer