Re: Minimize
- To: mathgroup at smc.vnet.net
- Subject: [mg68477] Re: Minimize
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Mon, 7 Aug 2006 01:40:33 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <eb46d1$ncl$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Bruce Colletti wrote: > Re Mathematica 5.2.0.0. > > I'm running Minimize[] (and not NMinimize[]) and get the message: > > "NMinimize::cvmit: Failed to converge to the requested accuracy or precision \within 100 iterations." > > Options@Minimize only reveals WorkingPrecision (I've tried different settings of this, to no avail). > > How can I raise the number of iterations for Minimize? Thankx. > > Bruce > Hi Bruce, You cannot modify the number of iterations for Minimize since the parameter MaxIterations belongs to numerical methods only (i.e. NMinimize). From the error message you got, it appears that Minimize called NMinimize at some point of its calculation, and the numerical method failed to converge. What you could do is changing the default value of MaxIterations before calling Minimize and restoring it to its original value after the minimization process. For instance, oldMaxIt= Options[ NMinimize,MaxIterations]; SetOptions[ NMinimize, MaxIterations->500]; Minimize[ f, { x, y}]; SetOptions[ NMinimize, oldMaxIt[ [1]]]; Options[ NMinimize,MaxIterations]; HTH, Jean-Marc