nconstraints function

Number of variables (rows) of the model

Number of variables (rows) of the model

nconstraints(model)

Arguments

  • model: the model

Returns

An integer equal to the number of variables. A variable is here a column in the resulting constraint matrix.

Examples

library(magrittr) model <- MIPModel() %>% add_variable(x) %>% add_variable(y[i], i = 1:10) nconstraints(model) # 11
  • Maintainer: Dirk Schumacher
  • License: MIT + file LICENSE
  • Last published: 2023-09-09