Learn R Programming

LIM (version 1.4.7.1)

Ldei: Solves a linear inverse model using least distance programming

Description

Solves a linear inverse model using least distance programming, i.e. minimizes the sum of squared unknowns.

Input presented either:

  • as matrices E, F, A, B, G, H (Ldei.double)

  • as a list (Ldei.lim) or

  • as a lim input file (Ldei.limfile)

Usage

Ldei(...)
# S3 method for lim
Ldei(lim, ...)
# S3 method for limfile
Ldei(file, verbose = TRUE, ...)
# S3 method for character
Ldei(...)
# S3 method for double
Ldei(...)

Value

a list containing:

X

vector containing the solution of the least distance problem.

unconstrained.Solution

vector containing the unconstrained solution of the least distance 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, TRUE, if an error occurred.

Error

ldei error text.

type

ldei.

Arguments

lim

a list that contains the linear inverse model specification, as generated by function setup.limfile.

file

name of the inverse input file.

verbose

if TRUE: prints warnings and messages to the screen.

...

other arguments passed to function ldei from packagelimSolve.

Author

Karline Soetaert <karline.soetaert@nioz.nl>

Details

Solves the following inverse problem: $$\min(\sum {Cost_i*x_i}^2)$$ subject to $$Ax=B$$ $$Gx>=H$$

References

Lawson C.L.and Hanson R.J. 1974. SOLVING LEAST SQUARES PROBLEMS, Prentice-Hall

Lawson C.L.and Hanson R.J. 1995. Solving Least Squares Problems. SIAM classics in applied mathematics, Philadelphia. (reprint of book)

See Also

ldei, the more general function from package limSolve.

Linp, to solve the linear inverse problem by linear programming.

Lsei, to solve the linear inverse problem by lsei (least squares with equality and inequality constraints).

function ldei from packagelimSolve.

Examples

Run this code
Ldei(LIMRigaAutumn)

Run the code above in your browser using DataLab