[R] Constraint Optimization problem.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[R] Constraint Optimization problem.

Arun.stat
Dear all R users,

I have a optimization problem like this:

f(x,y) is a function with two variables, x, and y. Variable x is unbounded
but y lies between [-10, 10].  I want to minimize f(x,y) subject to a
constraint x + y < 5. Can anyone tell me which R function should I use. I
already gone through ?constrOptim. But here I cannot specify lower and upper
bounds for x, and y. However if I use ?optim function then I can not specify
the constraint.

can anyone give me any clue?

any help will be highly appreciated.

Thanks and regards,
Arun

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.