getAb | R Documentation |
A
and the vector b
Get the matrix A
and the vector b
representing
the linear inequalities with a user-friendly syntax.
getAb(model)
model |
a "MIP model"; see the example |
A list with the matrix A
and the vector b
for usage in
integrateOverPolyhedron
.
library(ompr)
model <- MIPModel() %>%
add_variable(x) %>% add_variable(y) %>% add_variable(z) %>%
add_constraint(-5 <= x) %>% add_constraint(x <= 4) %>%
add_constraint(-5 <= y) %>% add_constraint(y <= 3 - x) %>%
add_constraint(-10 <= z) %>% add_constraint(z <= 6 - x - y)
getAb(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.