Change the lower and upper bounds of a named variable, indexed variable or a group of variables.
set_bounds(.model, .variable, ..., lb = NULL, ub = NULL) set_bounds_(.model, .variable, ..., lb = NULL, ub = NULL, .dots)
library(magrittr) MIPModel() %>% add_variable(x[i], i = 1:5) %>% add_constraint(x[i] >= 1, i = 1:5) %>% # creates 5 constraints set_bounds(x[i], lb = 3, i = 1:3)#> Mixed linear integer optimization problem #> Variables: #> Continuous: 5 #> Integer: 0 #> Binary: 0 #> No objective function. #> Constraints: 5