Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 340
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"