MathGroup Archive 2011

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

Search the Archive

Constraint evaluation in NMinimize

  • To: mathgroup at
  • Subject: [mg122651] Constraint evaluation in NMinimize
  • From: Ray Koopman <koopman at>
  • Date: Fri, 4 Nov 2011 06:02:47 -0500 (EST)
  • Delivered-to:

I want to minimize f[x] with respect to x, subject to g[x].
Both f and g depend in part on h[x], so to avoid calculating h[x]
twice I use an auxiliary variable:

  NMinimize[{t = h[x]; f[x,t], g[x,t]}, {x}].

That appears to work, but it depends on the constraint never being
evaluated without first evaluating the minimand, and I can't find
anything in the documentation that says that that will always be
the case. Can anyone help?

(I asked a similar question several years ago, at which time DrBob
pointed me to sec 2.6.4 in the book, but it's not obvious to me if
the standard evaluation procedure necessarily applies here.)

  • Prev by Date: Bug in FourierTransform?
  • Next by Date: Impossible to move objects in dynamic graphics
  • Previous by thread: Re: Bug in FourierTransform?
  • Next by thread: Re: Constraint evaluation in NMinimize