Skip to content

Request Feature: Add Vectorized semantics revisited of MILPModel to MIPModel #445

@sbmack

Description

@sbmack

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions