slices: Find all corner points in the slices define for each fixed...

slicesR Documentation

Find all corner points in the slices define for each fixed integer combination.

Description

Find all corner points in the slices define for each fixed integer combination.

Usage

slices(
  A,
  b,
  type = rep("c", ncol(A)),
  nonneg = rep(TRUE, ncol(A)),
  collapse = FALSE
)

Arguments

A

The constraint matrix.

b

Right hand side.

type

A character vector of same length as number of variables. If entry k is 'i' variable k must be integer and if 'c' continuous.

nonneg

A boolean vector of same length as number of variables. If entry k is TRUE then variable k must be non-negative.

collapse

Collapse list to a data frame with unique points.

Value

A list with the corner points (one entry for each slice).

Examples

A <- matrix( c(3, -2, 1,2, 4, -2,-3, 2, 1), nc = 3, byrow = TRUE)
b <- c(10,12,3)
slices(A, b, type=c("i","c","i"))

A <- matrix(c(9,10,2,4,-3,2), ncol = 2, byrow = TRUE)
b <- c(90,27,3)
slices(A, b, type=c("c","i"), collapse = TRUE)

relund/gMOIP documentation built on Feb. 23, 2024, 12:11 p.m.