R Optimization Infrastructure