Dear All I am dealing at the moment with optimization problems with nonlinear constraints. Regenoud is quite apt to solve that kind of problems, but the precision of the optimal values for the parameters is sometimes far from what I need. Optim seems to be more precise, but it can only accept box-constrained optimization problems. I read in the list archives that optim can also be used with nonlinear constrains through penalizations. However, I am not familiar with the technique of penalizations. Could someone please indicate to me a site or a book to learn about that penalization technique? Thanks in advance, Paul
I don't know of any sources, but the idea is quite simple. For each constraint that is broken, the penalty is the amount by which the constraint is broken times a penalty rate. The total penalty to add to the objective is the sum of penalties over all constraints. There is a catch or two when using this with derivative-based optimizers. The objective typically becomes non-differentiable at the boundary, and optimizers can get confused. They might be less confused with smaller penalty rates. However if the penalty rate is too small, then you can get a "solution" that breaks one or more penalties. Starting from a solution given by Rgenoud or its ilk is probably a good idea. Patrick Burns patrick at burns-stat.com +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and "A Guide for the Unwilling S User") Paul Smith wrote:>Dear All > >I am dealing at the moment with optimization problems with nonlinear >constraints. Regenoud is quite apt to solve that kind of problems, but >the precision of the optimal values for the parameters is sometimes >far from what I need. Optim seems to be more precise, but it can only >accept box-constrained optimization problems. I read in the list >archives that optim can also be used with nonlinear constrains through >penalizations. However, I am not familiar with the technique of >penalizations. Could someone please indicate to me a site or a book to >learn about that penalization technique? > >Thanks in advance, > >Paul > >______________________________________________ >R-help at stat.math.ethz.ch mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code. > > > >
Paul, The general idea here is to transform a constrained problem into a sequence of unconstrained optimization problems. When only equality constraints are involved, a popular way to do this is to augment the objective function with a Lagrangian term and with a quadratic penalty term. When general inequalities are present, it is a lot harder, but various kinds of "barrier functions" are used. A canonical reference (quite theoretical) for constrained optimization is the book: Fiacco and McCormick (1968, but reprinted as classic by SIAM in 1990): Nonlinear programming: sequential unconstrained minimization techniques. Another good book is that by Roger Fletcher (1987): Practical methods of optimization. Ravi. ---------------------------------------------------------------------------- ------- Ravi Varadhan, Ph.D. Assistant Professor, The Center on Aging and Health Division of Geriatric Medicine and Gerontology Johns Hopkins University Ph: (410) 502-2619 Fax: (410) 614-9625 Email: rvaradhan at jhmi.edu Webpage: http://www.jhsph.edu/agingandhealth/People/Faculty/Varadhan.html ---------------------------------------------------------------------------- -------- -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Paul Smith Sent: Thursday, May 10, 2007 11:08 AM To: R-help Subject: [R] Nonlinear constrains with optim Dear All I am dealing at the moment with optimization problems with nonlinear constraints. Regenoud is quite apt to solve that kind of problems, but the precision of the optimal values for the parameters is sometimes far from what I need. Optim seems to be more precise, but it can only accept box-constrained optimization problems. I read in the list archives that optim can also be used with nonlinear constrains through penalizations. However, I am not familiar with the technique of penalizations. Could someone please indicate to me a site or a book to learn about that penalization technique? Thanks in advance, Paul ______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.