getAb {polyhedralCubature}R Documentation

Easily get the matrix A and the vector b

Description

Get the matrix A and the vector b representing the linear inequalities with a user-friendly syntax.

Usage

getAb(model)

Arguments

model

a "MIP model"; see the example

Value

A list with the matrix A and the vector b for usage in integrateOverPolyhedron.

Examples

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)

[Package polyhedralCubature version 1.1.0 Index]