intlinprog: MatLab(R)-style Mixed Integer Linear Programming in R using...

Description Usage Arguments Value Author(s) Examples

Description

intlinprog provides a simple interface to ROI using the optimization model specification of MatLab(R)

minimize in x: f'*x subject to A*x <= b Aeq*x == beq x >= lb x <= ub

Usage

1
2
intlinprog(f, intcon = NULL, A = NULL, b = NULL, Aeq = NULL,
  beq = NULL, lb = NULL, ub = NULL, x0 = NULL, options = NULL)

Arguments

f

Linear term (vector) of the objective function

intcon

Vector of which variables are integer

A

Inequality constraints (left-hand side)

b

Inequality constraints (right-hand side)

Aeq

Equality constraints (left-hand side)

beq

Equality constraints (right-hand side)

lb

Lower bound

ub

Upper bound

x0

Initial solution

options

Additional optimization parameters

Value

The solution vector in x as well as the objective value in fval.

Author(s)

Ronald Hochreiter, ron@hochreiter.net

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# minimize 8x1 + x2
# subject to
#   x1 + 2x2 >= -14
#   -4x1 - 1x2 <= -33
#   2x1 + x2 <= 20
#   x1, x2 integer

f <- c(8, 1)
A <- matrix(c(-1, -2, -4, -1, 2, 1), nrow=3, byrow=TRUE)
b <- c(14, -33, 20)

sol <- intlinprog(f, c(1, 2), A, b)
sol <- intlinprog(f, NULL, A, b)

sol$x

modopt.matlab documentation built on May 2, 2019, 12:40 p.m.