Skip to contents

A step of the miprgr_native implementation. Called by miprgr_branch_and_bound. See the file header for the source the module follows.

Usage

miprgr_solve_relaxation(
  A,
  b,
  c,
  bounds = list(),
  n = NULL,
  maximise = TRUE,
  solver = "simplex"
)

Arguments

A

A matrix; indexed by row and column.

b

A vector; its length is taken and its elements indexed.

c

A vector; its length is taken.

bounds

A vector; its length is taken. Defaults to list().

n

Optional; may be NULL. Coerced to integer by the body, with as.integer.

maximise

A flag; the body branches on it. Defaults to TRUE.

solver

Compared against "simplex". Defaults to "simplex".

Value

A list with feasible, x, value, note.

Examples

A <- rbind(c(1, 0), c(0, 2), c(3, 2))
miprgr_solve_relaxation(A, b = c(4, 12, 18), c = c(3, 5))[c("x", "value")]
#> $x
#> [1] 2 6
#> 
#> $value
#> [1] 36
#>