×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

What to do when solver gets stupid

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.

 

=====================================
Eng-tips forums: The best place on the web for engineering discussions.

RE: What to do when solver gets stupid

A more germane question might be why your solver was set to conjugate in the first place, since Newton is supposed to be the default.

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

RE: What to do when solver gets stupid

Different numerical solving method behave differently. Some converge and find solution and some don't. It depends on the type of differential equations, initial conditions, first guesses value, etc., that are involved in the type of problem. To efficiently and intelligently use built in solver tools the users should have at least the basic knowledge of numerical analysis theory.  

RE: What to do when solver gets stupid

That assumes that the problem being solved is well formed.

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

(OP)
Here's what solver help says:

Quote:

Newton    Uses a quasi-Newton method that typically requires more memory but fewer iterations than the Conjugate gradient method.

Conjugate    Requires less memory than the Newton method but typically needs more iterations to reach a particular level of accuracy. Use this option when you have a large problem and memory usage is a concern, or when stepping through iterations reveals slow progress.
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

Oh I aways flip them around if the thing won't solve, but a 4 bar linkage is a well known problem, and I know that solver doesn't handle it well.

 

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

(OP)
OK, you were ahead of me.  I had never played with those options before.   I don't know whether the setting got changed recently or a long time ago but it caused me a lot of grief.  Now I know.  

=====================================
Eng-tips forums: The best place on the web for engineering discussions.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources