MathGroup Archive 2014

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Distance Between a B-Spline Surface

  • To: mathgroup at smc.vnet.net
  • Subject: [mg132248] Re: Distance Between a B-Spline Surface
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Thu, 23 Jan 2014 03:34:05 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net
  • References: <20140121080248.A720969E5@smc.vnet.net>

The documentation for NMinimize states that "NMinimize always attempts to
find a global minimum of f subject to the constraints given." The use of
"always attempts to find" rather than "finds" implies that there is no
guarantee.

The documentation also states:

Possible settings for the Method option include "NelderMead",
"DifferentialEvolution", "SimulatedAnnealing", and "RandomSearch".

Consequently, for complicated functions (perhaps any one that requires use
of NMiniimize rather than Minimize) it would probably be best to map
NMinimize across the methods to verify that you have the best method. A
warning that the solution did not convergence to the requested accuracy
within the maximum number of steps should also suggest looking at the other
methods.

Even Minimize does not state a guarantee of a global minimum for all
functions ("If f and cons are linear or polynomial, Minimize will always
find a global minimum.").


Bob Hanlon


On Wed, Jan 22, 2014 at 8:39 AM, Dr. Robert Kragler <
kragler at hs-weingarten.de> wrote:

>  Hi Bob Hanlon,
>
> referring to you recent MathGroup contributions and [mg132243]
> I wonder why
>
> zmin=NMinimize[{gz[u,v],0<=u<=1,0<=v<=1},{u,v},Method->"DifferentialEvolution"][[1]]
> => -0.574058
>
> zmax=NMaximize[{gz[u,v],0<=u<=1,0<=v<=1},{u,v},Method->"DifferentialEvolution"][[1]]
> =>  0.554369
>
> pt={2,3,4};
> {dist,sol}=NMinimize[{ Norm[pt-{x,y,z}],gx[u,v]==x,gy[u,v]==y,gz[u,v]==z,
>                                             0<=u<=1,0<=v<=1,
>                                            *
> 1<=x<=5,1<=y<=5,zmin<=z<=zmax* },
>                                              {x,y,z,u,v},
> *Method->"DifferentialEvolution"*]//Chop
>
> gives  Out[ ]= {3.72822,{x->1.,y->2.75868,z->0.416516,u->0,v->0.420237}}
>
> and
>
> pt={2,3,4};
> {dist,sol}=NMinimize[{ Norm[pt-{x,y,z}],gx[u,v]==x,gy[u,v]==y,gz[u,v]==z,
>                                             0<=u<=1,0<=v<=1
> },{x,y,z,u,v}]                      (* Method -> Automatic *)
>
> gives Out[]=
> {4.13757,{x->2.24681,y->1.00001,z->0.386337,u->0.266016,v->8.48701*10^-7}}
>
> thus the results obtained are remarkably different. The resulting graphics
> show that in the first case (with Method->>"DifferentialEvolution") the
> point on the BSpline surface is located roughly along y-axis whereas in the
> second case the corresponding point is along x-axis (as show the resulting
> coordinates)
>
> Perhaps, it is naive but I thought that the results would not differ so
> much; it seems that they obviously depend on the method chosen. The
> question remains : what is the true result?!
>
> Regards
> Robert Kragler
>
> --
> Prof. Dr. Robert Kragler
> Hasenweg 5
> D-88090 Immenstaad, Germany
> Phone : +49 (7545) 2833 or 3500
> Email : kragler at hs-weingarten.de
> URL :   http://portal.hs-weingarten.de/web/kragler
>
>




  • Prev by Date: Re: Distance Between a B-Spline Surface & Point
  • Next by Date: Re: How to show 1+2+3+ ... = -1/12 using Mathematica's symbols?
  • Previous by thread: Re: Distance Between a B-Spline Surface & Point
  • Next by thread: Re: How to show 1+2+3+ ... = -1/12 using