I have created an optimizer using solver which will output the optimal value, given several constraints, in a particular cell (which is AG1 in my case).
However, I want to write a loop that will iteratively prompt solver to find the next best solution by updating the maximum value constraint to a lower value.
Basically what I have now is:
where X is the number iterations and AH1 is the cell containing a decreased value that I want to set as the new maximum constraint, which I will decrease by .01 each time.
However, the problem with this code is that the solver won't actually update any of the spreadsheet cells until after I stop execution, by which the AH1 cell will have decreased .01 times however many iterations it went through before being stopped and produce only that particular solution.
Can someone give me a pointer as to how I can, through a single execution of code: 1) retrieve the solution with all cells in the spreadsheet updated per iteration 2) store/print the results of all iterations in a separate spreadsheet so that I can basically view all solutions?
Bookmarks