[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.

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,

        [[alternative HTML version deleted]]

[hidden email] mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.