Hi Dana
Thanks a lot for your explanation... it sounds very reasonable to me so I'm
going to give it up. First, this was coded by a company other than microsoft
so I don't think they're going to provide some help on this issue. Second, if
it works as you guess, I won't get every iteration so it doesn't make sense
after all. Third, it doesn't bring any improvement to the tool. I remember to
have run a model a while ago and solver showed some results as it was
running... I tried to set the option features for a very simple model as you
suggest but it doesn't get marked the "Show Iteration Results" checkbox (why?
I don't know) I hope there's nothing wrong with my solver.
--
Martin Esteves
"Dana DeLouis" wrote:
On 10/8/09 12:19 PM, Martin wrote:
Is it possible to get intermediate results from solversolve?
Thanks in advance
Hi Martin. The answer to your question is "kind of."
Your question is about programming, but first start with a Solver
problem by hand. It has to be a Solver model that takes a few seconds
to solve.
Look at the Solver options, and place a check on "Show Iteration
Results." If your model takes a while to solve, you will see your
"intermediate results."
These "Intermediate Results" are not "each loop" as you would hope.
These are not documented (AFAIK), but I like to think of the results as
occurring every 100 loops, or about every second. (These are just
guesses of course). This is why you need a Model that takes a few
seconds to solve before these results get displayed. If your problem is
solved very quickly, the intermediate results will not get triggered for
display.
For your programming question on "SolverSolve", look at the second
option to this function. The second option takes a string that is the
name of a custom function. This custom function should take your Target
cell and store its value for later review. Again, the value stored is
not "each loop", but a value "about each second" while SolverSolve is
running.
I believe "each loop" wouldn't work too well with Solver because Solver
needs to run a few "Finite Differences" on the worksheet to determine a
derivative. These are then used to determine a direction for the next
guesses. These intermediate results wouldn't be useful while Solver is
working.
= = = = =
Good luck. :)
HTH
Dana DeLouis