From the ompr documentation section MILPModel Vectorized semantics revisited:
n <- 10L
MILPModel() %>%
add_variable(x[i, j], i = 1:n, j = 1:n) %>%
add_constraint(x[i, j] == 1, i = 1:n, j = 1:n, i == j) %>%
add_constraint(x[1:n, 1:n] == 1) # this this equivalent
That code fails with MIPModel but it is a very nice feature also found on commercial model managers. Can it be incorporated into MIPModel? Thanks, SteveM
From the ompr documentation section MILPModel Vectorized semantics revisited:
That code fails with MIPModel but it is a very nice feature also found on commercial model managers. Can it be incorporated into MIPModel? Thanks, SteveM