xranges {limSolve}R Documentation

Calculates ranges of inverse unknowns

Description

Given the linear constraints

Ex=f

Gx>=h

finds the minimum and maximum values of all elements of vector x
by successively minimising and maximising each x, using linear programming
Uses lpSolve - see note

Usage

xranges(E=NULL, F=NULL, G=NULL, H=NULL)

Arguments

E numeric matrix containing the coefficients of the equaliies Ex=F
F numeric vector containing the right-hand side of the equalities
G numeric matrix containing the coefficients of the inequalities Gx>=H
H numeric vector containing the right-hand side of the inequalities

Value

a 2-column matrix with the minimum and maximum value of each x

Note

we have experienced that lpSolve sometimes fails (and R stops) if it is frequently repeated, and for small problems.

Author(s)

Karline Soetaert <k.soetaert@nioo.knaw.nl>

See Also

varranges,
lp: linear programming from package lpSolve

Examples

# Estimate the ranges in the Diet Composition of Mink
A <- rbind(Minkdiet$Prey,rep(1,7))
B <- c(Minkdiet$Mink,1)
(DC<-xranges(A,B))

[Package limSolve version 1.1 Index]