Learn R Programming

fastclime (version 1.4.1.1)

fastlp: A generic LP solver

Description

A generic linear programming solver using parametric simplex method

Usage

fastlp(obj,mat,rhs,lambda=0)

Value

The optimal value will be returned if it exists. Otherwise the function will indicate the problem is infeasible or unbounded.

Arguments

obj

The objective vector of the coefficient with length n.

mat

The constraint matrix of the linear programming with dimension m*n. Note this argument must be in matrix form even it is a vector.

rhs

The right hand side vector of the constraint with length m.

lambda

The parametric simplex method will stop when the calculated paramter is smaller than lambda. The default value is zero and it corresponds to the optimal value.

Author

Haotian Pang, Han Liu and Robert Vanderbei
Maintainer: Haotan Pang<hpang@princeton.edu>

Details

This function is used to solve a general linear programming in standard inequality form: "maximize obj*x, subject to: mat*x<=rhs, x>=0"

See Also

fastclime and fastclime-package

Examples

Run this code
#generate an LP problem and solve it
A=matrix(c(-1,-1,0,1,-2,1),nrow=3)
b=c(-1,-2,1)
c=c(-2,3)
fastlp(c,A,b)

Run the code above in your browser using DataLab