Description Usage Arguments Value Author(s) Examples
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
| 1 2 | 
| 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 | 
The solution vector in x as well as the objective value
in fval.
Ronald Hochreiter, ron@hochreiter.net
| 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
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.