octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #41146] fsolve failure


From: Rik
Subject: [Octave-bug-tracker] [bug #41146] fsolve failure
Date: Thu, 2 Aug 2018 14:01:37 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0

Update of bug #41146 (project octave):

                  Status:                    None => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #9:

I overhauled fsolve.m in this changeset
(https://hg.savannah.gnu.org/hgweb/octave/rev/bf89eea6652e).

Part of the overhaul involved changing the way Octave calculates the Jacobian
using finite differences.  The new algorithm, I believe, matches Matlab and it
leads to taking larger step sizes which makes convergence quicker.

I also changed the following fsolve options to match Matlab

TolX -> 1e-6 from 1e-7
TolFun -> 1e-6 from 1e-7
FinDiffType -> "forward" from "central"
"Updating -> "off" from "on"
"MaxFunEvals -> 100*number_of_variables from Inf

Taken together, fsolve is almost able to solve the original poster's problem
with default options.  The only issue is that MaxFunEvals is set to 300
because there are three unknown variables, but the solver requires 346
function evaluations to converge.  I don't think this qualifies as "fsolve
failure" anymore.  If attempting the solution from scratch, fsolve would
report an exit code of 0 (maximum iterations exceeded).  A cognizant user
would then simply double MaxFunEvals to see if throwing more computes at it
would solve the problem, and it would.

Marking as fixed and closing report.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?41146>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]