Constraints vs. Bounds in the R Optimization Infrastructure (ROI) library

1,370 views
Skip to first unread message

Elise Hellwig

unread,
Aug 19, 2016, 8:25:15 AM8/19/16
to Davis R Users' Group
Hi,

I have an optimization problem that I am working on and am trying to use the R Optimization Infrastructure (ROI) library to solve it. The ROI library allows you to put constraints on your optimization problem, for example via L_constraint(), as well as bounds via V_bound(). To me these seem like they would do the same thing, however, given that they are both included I'm assuming there is a difference.

Thanks!

Noam Ross

unread,
Aug 19, 2016, 8:47:10 AM8/19/16
to Davis R Users' Group
I tend to use the nloptr package for optimization problems rather than ROI, but the concepts are the same.  Bounds are absolute limits on the range of values, while constraints are limits on *relationships* between values.  For instance, if I am minimizing Z, which is a function of X and Y, bounds could be -10 < X < 10, or 3 < Y < 6.  Constraints can be more complex. I could impose an *inequality* constraint of Y < 10 - X, which would tell the solver to find the lowest value of Z that falls below that diagonal line on the X-Y plane.  An *equality* constraint, Y = 10 - X, would try to find the point ON that line with the lowest value of Z. 

In theory, bounds are just simple versions of constraints, but they're usually handled separately by the solvers called by optim(), ROI, nloptr, optimx, etc, and thus are entered as separate arguments into the optimization function.  Different solvers can typically handle different levels of complexity in constraints, such as only linear constraints (like the example above), or quadratic constraints. 

- Noam

--
Check out our R resources at http://d-rug.github.io/
---
You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+...@googlegroups.com.
Visit this group at https://groups.google.com/group/davis-rug.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages