![]() |
How can this be done?
Hi everyone,
Say I am running an optimizer from Excel number of times, each time it assumes a different starting point. In a VBA code, I tell the model to write the solution into a table if a feasible solution is found. However, sometimes a solution gets reaptead! For eaxmple, say I am running the model 20 times and 12 runs deliver feasible solutions, I find that some of the 12 feasible solutions are just identical! So, what should I do to tell the model through VBA not to write down a feasible solution if it is already there? Thanks alot, Mike |
How can this be done?
You would have to check to see if the solution has already been written out
and if so bypass it. You could create an array: MySolutons(1 to 100) and store the solution's value and then check when another solution is obtained if it is stored in the array. If yes, this means that a previous solution was idential. Bob Flanagan Macro Systems http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel "Michael" wrote in message om... Hi everyone, Say I am running an optimizer from Excel number of times, each time it assumes a different starting point. In a VBA code, I tell the model to write the solution into a table if a feasible solution is found. However, sometimes a solution gets reaptead! For eaxmple, say I am running the model 20 times and 12 runs deliver feasible solutions, I find that some of the 12 feasible solutions are just identical! So, what should I do to tell the model through VBA not to write down a feasible solution if it is already there? Thanks alot, Mike |
All times are GMT +1. The time now is 11:14 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com