Extract the constraint matrix, the right hand side and the sense from a model

extract_constraints(model)

## Arguments

model the model

## Value

a list with three named elements. 'matrix' the (sparse) constraint matrix from the Matrix package. 'rhs' is the right hand side vector in the order of the matrix. 'sense' is a vector of the constraint senses

## Examples

library(magrittr)
model <- MIPModel() %>%
extract_constraints(model)#> $matrix #> 3 x 6 sparse Matrix of class "dgCMatrix" #> #> [1,] 1 . . 1 . . #> [2,] . 1 . . 1 . #> [3,] . . 1 . . 1 #> #>$sense
#>