What to do when solver gets stupid
What to do when solver gets stupid
(OP)
Usually solver does what you expect it to do.
Recently I worked a problem with a lot of input variables where solver got really stupid. It would leave one input variable exactly where I put the initial guess, no matter what. Manually changing that one variable by a small amount(with no other changes) was all that was required to improve the minimization problem, but solver wouldn't do it.
Then I looked at the solver options:
Estimates:Tangent
Derivatives:Forward
Search: Conjugate.
I changed search from Conjugate to Newton and then immediately it solved the problem very accurately.
Strange experience. The help doesn't give you any clue that conjugate is stupid, but that is my conclusion. At any rate if solver doesn't work, try playing with those options.
Recently I worked a problem with a lot of input variables where solver got really stupid. It would leave one input variable exactly where I put the initial guess, no matter what. Manually changing that one variable by a small amount(with no other changes) was all that was required to improve the minimization problem, but solver wouldn't do it.
Then I looked at the solver options:
Estimates:Tangent
Derivatives:Forward
Search: Conjugate.
I changed search from Conjugate to Newton and then immediately it solved the problem very accurately.
Strange experience. The help doesn't give you any clue that conjugate is stupid, but that is my conclusion. At any rate if solver doesn't work, try playing with those options.
=====================================
Eng-tips forums: The best place on the web for engineering discussions.





RE: What to do when solver gets stupid
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: What to do when solver gets stupid
RE: What to do when solver gets stupid
Since an excel system of equation could easily include formulae like
=if(c5>8, 9,c5/2)
or worse, then a scattergun approach to the solver algorithm might be appropriate. It's a shame they didn't include a Monte Carlo solver, that is my usual approach to uncooperative problems.
Actually even legitimate engineering problems like solving 4 bar links seems to be beyond the solver, normally. (That is given these fixed hardpoints and these that can be changed, find a linkage that satisfies these criteria...)
Cheers
Greg Locock
SIG:Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.
RE: What to do when solver gets stupid
The problem was solved by Newton but not by Conjugate. It didn't time out on iterations (I let it continue). There is no reason I see in the help description to suggest that one method will fail where the other method works. And in this case I'm telling you the failure of Conjugate was dismal (only one variable needed to be changed to improve the solution... solver never changede that variable). I would humbly suggest Greg if you have a problem that you think is beyond solver - try changing those options around. That was the point of my post. The results were quite surprising to me in this case.
=====================================
Eng-tips forums: The best place on the web for engineering discussions.
RE: What to do when solver gets stupid
Cheers
Greg Locock
SIG:Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.
RE: What to do when solver gets stupid
=====================================
Eng-tips forums: The best place on the web for engineering discussions.