[R] Nonlinear optimization with constraints
Bartjoosen
bartjoosen at hotmail.com
Wed Aug 1 09:55:08 CEST 2007
Make a function and add the constraints to the function eg. if (Ai1 > x )
Inf.
By making the result Infinite, you have added the constraints manually.
Vu Nguyen-4 wrote:
>
> Hello R community,
>
> I am sorry for the previous accidental posting as I pressed a wrong key.
>
> I am using R for creating a model using optimization. I would like to ask
> if there is R-function/package for solving the problem below:
>
> Minimize sum(abs(exp^(Ai1 x1 + Ai2 x2 + ... + Aim xm - bi) - 1)), for each
> i = 1, ..., n.
> subject to Ai1 x1 + Ai2 x2 + ... + Ajm xm - bi <= c, where c is a
> scalar.
> (x is a vector of variables, A is nxm matrix, b is a vector)
>
> I tried to use optim(), nlm(), and constrOptim, but they do not allow a
> kind of the constraint in the problem above.
>
> Thanks for your help.
>
> Regards,
> Vu
>
>
> ----- Original Message ----
> From: Vu Nguyen <vuqn at yahoo.com>
> To: r-help at stat.math.ethz.ch
> Sent: Tuesday, July 31, 2007 3:50:52 PM
> Subject: Nonlinear optimization with constraints
>
>
> Hello R community,
>
> I am using R for creating a model using optimization. I would like to ask
> if there is R-function/package for solving the problem below:
>
> Minimize sum(abs(exp^(Ai1 x1 + Ai2 x2 + ... + Aim xm - bi) - 1)), for each
> i = 1, ..., n.
> subject to Ai1 x1 + Ai2 x2 + ... + Ajm xm - bi <= c, where c is a
> scalar.
> (x is a vector of variables, A is nxm matrix, b is a vector)
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>
>
--
View this message in context: http://www.nabble.com/Re%3A-Nonlinear-optimization-with-constraints-tf4197046.html#a11941309
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list