crispLP {FuzzyLP} | R Documentation |
Solves a crisp linear programming problem.
Description
crispLP
use the classic solver (simplex) to solve a crisp linear programming problem:
Max\, f(x)\ or\ Min\ f(x)
s.t.:\quad Ax<=b
Usage
crispLP(objective, A, dir, b, maximum = TRUE, verbose = TRUE)
Arguments
objective |
A vector |
A |
Technological matrix of Real Numbers. |
dir |
Vector of strings with the direction of the inequalities, of the same length as |
b |
Vector with the right hand side of the constraints. |
maximum |
|
verbose |
|
Value
crispLP
returns the solution if the solver has found it or NULL if not.
Examples
## maximize: 3*x1 + x2
## s.t.: 1.875*x1 - 1.5*x2 <= 4
## 4.75*x1 + 2.125*x2 <= 14.5
## x1, x2 are non-negative real numbers
obj <- c(3, 1)
A <- matrix(c(1.875, 4.75, -1.5, 2.125), nrow = 2)
dir <- c("<=", "<=")
b <- c(4, 14.5)
max <- TRUE
crispLP(obj, A, dir, b, maximum = max, verbose = TRUE)
[Package FuzzyLP version 0.1-7 Index]