MathGroup Archive 2005

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

Search the Archive

NMinimize ignores constraints and crashes


I saw somebody's similar message posted last year, but it went unanswered,
so I still need a solution.
Why NMinimize ignores my constraints, gets into a region where my function
yields complex values, and then stops? I explicitly tell the procedure not
to go outside the constraints, but it still does it. A simple example:

NMinimize[{Sqrt[x - y], x ≥ y &&x y ≥ 9}, {{x, 4., 5.}, {y,
3., 4.}}]

NMinimize::nrnum: The function value 0.0819328+0.535013I is not a real
number at {x, y} = {3.27193, 3.55817}.

There are obviously infinitely many minima, at which the value of the
function is 0. What is important here, though, is that NMinimize again
ignores x>=y, gets complex values and chokes.


  • Prev by Date: Re: How to reverse sign on the y's in a list of (x, y)'s?
  • Next by Date: Re: How to reverse sign on the y's in a list of (x, y)'s?
  • Previous by thread: same scale for different plots or charts
  • Next by thread: Re: NMinimize ignores constraints and crashes