integerPoints: Integer points in the feasible region (Ax<=b).

View source: R/functions.R

integerPointsR Documentation

Integer points in the feasible region (Ax<=b).

Description

Integer points in the feasible region (Ax<=b).

Usage

integerPoints(A, b, nonneg = rep(TRUE, ncol(A)))

Arguments

A

Constraint matrix.

b

Right hand side.

nonneg

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

Value

A data frame with all integer points inside the feasible region.

Note

Do a simple enumeration of all integer points between min and max values found using the continuous polytope.

Author(s)

Lars Relund lars@relund.dk.

Examples

A <- matrix( c(3,-2, 1, 2, 4,-2,-3, 2, 1), nc = 3, byrow = TRUE)
b <- c(10, 12, 3)
integerPoints(A, b)

A <- matrix(c(9, 10, 2, 4, -3, 2), ncol = 2, byrow = TRUE)
b <- c(90, 27, 3)
integerPoints(A, b)

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