A variable can either be a name or an indexed name. See examples.

add_variable(.model, .variable, ..., type = "continuous", lb = -Inf,
ub = Inf)

add_variable_(.model, .variable, ..., type = "continuous", lb = -Inf,
ub = Inf, .dots)

## Arguments

.model the model the variable name/definition quantifiers for the indexed variable. Including filters must be either continuous, integer or binary the lower bound of the variable the upper bound of the variable Used to work around non-standard evaluation.

## Examples

library(magrittr)
MIPModel() %>%
add_variable(x) %>% # creates 1 variable named x
add_variable(y[i], i = 1:10, i %% 2 == 0,
type = "binary") # creates 4 variables#> Mixed integer linear optimization problem
#> Variables:
#>   Continuous: 1
#>   Integer: 0
#>   Binary: 5
#> No objective function.
#> Constraints: 0