extract_constraints | R Documentation |
Extract the constraint matrix, the right hand side and the sense from a model
extract_constraints(model)
model |
the model |
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
library(magrittr)
model <- MIPModel() %>%
add_variable(x[i], i = 1:3) %>%
add_variable(y[i], i = 1:3) %>%
add_constraint(x[i] + y[i] <= 1, i = 1:3)
extract_constraints(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.