Originally posted by: Kamran_Sr
Hi Alex,
I have written a code using main() which reads different data iteratively using a loop in my script. The model runs per itearation with different data and gives the solution.
I need to have the objective value for each iteration. I have used the code below to get the solution per iteration:
writeln
("run ",n);
if(cplex.solve()) {
writeln("\t cost :", cplex.getObjValue());
This gives me the values in scripting log. However, I want to export the objective values per iteration into an excel file directly. the above code you provided is for exporting the variables which has already indices. But the iteration index I have here "n" is defined in my main for reading different data. I wanna know how to export each iteration objective value into csv file within the same loop as reading data?
~Reagrds,
Kamran
#DecisionOptimization#OPLusingCPLEXOptimizer