.constraint_expr: the constraint. Must be a linear (in)equality with operator "<=", "==" or ">=".
...: quantifiers for the indexed variables. For all combinations of bound variables a new constraint is created. In addition you can add filter expressions
.show_progress_bar: displays a progressbar when adding multiple constraints
.dots: Used to work around non-standard evaluation.
Returns
a Model with new constraints added
Examples
library(magrittr)MIPModel()%>% add_variable(x[i], i =1:5)%>%# creates 5 constraints add_constraint(x[i]>=1, i =1:5)%>%# you can also use filter expressions add_constraint(x[i]>=1, i =1:5, i %%2==0)%>%# and depent on other indexes add_constraint(x[j]>=1, i =1:10, j =1:i, j <=5)