nconstraints: Number of variables (rows) of the model

View source: R/model-api.R

nconstraintsR Documentation

Number of variables (rows) of the model

Description

Number of variables (rows) of the model

Usage

nconstraints(model)

Arguments

model

the model

Value

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

dirkschumacher/romp documentation built on Sept. 16, 2023, 4:06 p.m.