MathGroup Archive 2006

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

Search the Archive

Re: NMinimize with numerically evaluated constraints

  • To: mathgroup at
  • Subject: [mg66251] Re: [mg66229] NMinimize with numerically evaluated constraints
  • From: gregorc <gregor.cernivec at>
  • Date: Fri, 5 May 2006 05:03:17 -0400 (EDT)
  • References: <>
  • Sender: owner-wri-mathgroup at

Fernando Bernardo wrote:

> Hi there!
>I'm trying to solve an optimization problem, with constraints g(x)<=0 
>(x are decision variables), such that the evaluation of g(x) for a 
>particular x requires a numerical procedure. So far, I've been able to 
>use NMinimize with g(x) defined analytically as a function of the symbol 
>x, while the objective function f(x) can be restricted to a numerical 
>input x as follows:
>fOBJ[x_ /; NumericQ[x]]:=Module[{},...; Return[fOBJval]]
>Is it possible to apply this numerical input restriction also to the 
>constraints g(x) ??? Thanks for your help.
>Fernando Pedro Martins Bernardo
>Department of Chemical Engineering
>University of Coimbra
>P=F3lo II - Pinhal de Marrocos
>3030-290 Coimbra
>Tele: +351-239-798722
>Fax: +351-239-798703
>bernardo at
>__________ NOD32 1.1519 (20060504) Information __________
>This message was checked by NOD32 antivirus system.

You can try to minimize f(x) with the penalty function. The idea is to 
multiply the objective function with a penalty function and minimize 
their product. The penalty function is increased, when in the process of 
the minimization the constraints are broken. This wil turn the 
optimization path in the oposite direction. E.g. New objective function 
is P*f(x), if g(x)<= 0 P=100 else P=1. This is a step like penalty 
function. You can produce also countinious penalty functions for better 
convergence of the minimization.

Best regards,

Cernivec Gregor.

  • Prev by Date: Problems with FindRoot
  • Next by Date: Re: Root's third argument?
  • Previous by thread: NMinimize with numerically evaluated constraints
  • Next by thread: Testing for squares