if (FALSE) {
library(magrittr)
result <- MIPModel() %>%
add_variable(x[i], i = 1:5) %>%
add_variable(y[i, j], i = 1:5, j = 1:5) %>%
add_constraint(x[i] >= 1, i = 1:5) %>%
set_bounds(x[i], lb = 3, i = 1:3) %>%
set_objective(0) %>%
solve_model(with_ROI("glpk"))
solution <- get_solution(result, x[i])
solution2 <- get_solution(result, y[i, 1])
solution3 <- get_solution(result, y[i, j])
duals <- get_solution(result, x[i], type = "dual")
}
Run the code above in your browser using DataLab