Add one or more constraints to the model using quantifiers.
add_constraint(.model, .constraint_expr, ..., .show_progress_bar = TRUE) add_constraint_(.model, .constraint_expr, ..., .dots, .show_progress_bar = TRUE)
a Model with new constraints added
library(magrittr) MIPModel() %>% add_variable(x[i], i = 1:5) %>% add_constraint(x[i] >= 1, i = 1:5) # creates 5 constraints#> Mixed linear integer optimization problem #> Variables: #> Continuous: 5 #> Integer: 0 #> Binary: 0 #> No objective function. #> Constraints: 5