R/model-api.R

variable_keys.Rd

Get all unique names of the model variables

variable_keys(model)

the model

a character vector ordered in the same way as the constraint matrix columns and objective vector

library(magrittr) model <- MIPModel() %>% add_variable(x[i], i = 1:3) variable_keys(model)#> [1] "x[1]" "x[2]" "x[3]"