-3

I am performing an iterative optimization using the main function in CPLEX OPL. After each iteration, I want to write the values of the decision variables to an Excel sheet. The optimization runs for 100 iterations, and the variable x has a size of 100×96 (i.e., x[1..100][1..96]). While I am writing the variable values to an Excel sheet, I noticed that the values from the last iteration are not being saved. Currently, I am using a .dat file for this process. How can I ensure the values from all iterations, including the final one, are correctly written to Excel?

1

1 Answer 1

0

If the values from the last iteration are not saved and the previous ones are, and if you use SheetWrite to write results into excel, then in your main loop you should check that you call postProcess for the last iteration.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.