Linp | R Documentation |
Solves a linear inverse model using linear programming
Input presented either as:
matrices E, F, A, B, G, H (Linp.double) or
as a list (Linp.lim) or
as a lim input file (Linp.limfile)
Linp(...) ## S3 method for class 'lim' Linp(lim, cost = NULL, ispos = lim$ispos, ...) ## S3 method for class 'limfile' Linp(file, verbose = TRUE,...) ## S3 method for class 'character' Linp(...) ## S3 method for class 'double' Linp(...)
lim |
a list that contains the linear inverse model
specification, as generated by function |
file |
name of the inverse input file. |
verbose |
if |
cost |
if not |
ispos |
if |
... |
other arguments passed to function linp
from package |
Solves the following inverse problem:
\min(∑ {Cost_i*x_i})
or
\max(∑ {Profit_i*x_i})
subject to
x_i>=0
Ax=B
Gx>=H
and where Cost_i or Profit_i are weighting coefficients
a list containing:
X |
vector containing the solution of the linear programming problem. |
unconstrained.solution |
vector containing the unconstrained solution of the linear programming problem. |
residualNorm |
scalar, the sum of residuals of equalities and violated inequalities. |
solutionNorm |
scalar, the value of the quadratic function at the solution. |
IsError |
logical, |
Error |
linp error text. |
type |
linp. |
Karline Soetaert <karline.soetaert@nioz.nl>
Michel Berkelaar and others (2005). lpSolve: Interface to Lpsolve v. 5 to solve linear/integer programs. R package version 1.1.9.
linp
, the more general function from package lpSolve
Ldei
, to solve the linear inverse problem by least
distance programming
Lsei
, to solve the linear inverse problem by lsei
(least squares with equality and inequality constraints)
function linp
from packagelimSolve
# the Blending example Linp(LIMBlending) # the E coli example: two functions to maximimise Linp(LIMEcoli) # E coli example, but only first function optimised.. Linp(LIMEcoli, cost = -LIMEcoli$Profit[1,]) # a foodweb example: need to specify the cost function # here just sum of absolute values of flows... Linp(LIMRigaAutumn, cost = (rep(1, LIMRigaAutumn$NUnknowns)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.