[R] optimizing with non-linear constraints

Ravi Varadhan ravi.varadhan at jhu.edu
Wed Sep 30 19:21:56 CEST 2015

Hi Rainer,
It is very simple to specify the constraints (linear or nonlinear) in "alabama" .  They are specified in a function called `hin', where the constraints are written such that they are positive.  Your two nonlinear constraints would be written as follows:

hin <- function(x, LAI) {
h <- rep(NA, 2)
h[1] <- LAI^x[2] / x[3] + x[1]
h[2] <- 1 - x[1] - LAI^x[2] / x[3]

Please take a look at the help page.  If it is still not clear, you can contact me offline.

Ravi Varadhan, Ph.D. (Biostatistics), Ph.D. (Environmental Engg)
Associate Professor,  Department of Oncology
Division of Biostatistics & Bionformatics
Sidney Kimmel Comprehensive Cancer Center
Johns Hopkins University
550 N. Broadway, Suite 1111-E
Baltimore, MD 21205

	[[alternative HTML version deleted]]

More information about the R-help mailing list