Setup {LIM}R Documentation

Creates linear inverse matrices

Description

Creates the linear problem with equality and inequality equations. Takes as input either a liminput list, as generated by Read or a filename with the linear inverse model specifications. Creates:

  • inverse matrices and vectors bf{A}, bf{b}, bf{G}, bf{h} of the equalities/inequalities:

    Ax=b

    Gx>=h

  • if present, also generates the cost/profit function which is used as:

    min(cost)

    or

    max(profit)

  • if the input was a flow network, Setup will also create the flow matrix (see details)

    Usage

    Setup(...)
    Setup.limfile(file, verbose=TRUE, ...)
    Setup.character(...)
    Setup.liminput(liminput,...)
    

    Arguments

    file name of inverse input file
    verbose if TRUE: prints warnings and messages to the screen
    liminput list of elements, as returned by Read
    ... extra parameters allowing this to be a generic function

    Value

    a list containing:

    file name of input text file
    NUnknowns number of unknowns
    NEquations number of equations
    NConstraints number of constraints
    NComponents number of components
    NExternal number of externals
    NVariables number of variables
    A matrix A of equalities Ax=B
    B vector B of equalities Ax=B
    G matrix G of inequalities Gx>h
    H vector H of inequalities Gx=h
    Cost cost vector (to minimise), the weight of each unknown; if not specified; 1 for all unknowns
    Profit profit vector (to maximise)
    Flowmatrix matrix where element ij denotes flow from compartment i to j
    VarA matrix VarA of variable equation VarA*x=VarB
    VarB vector VarB of variable equation VarA*x=VarB
    Flows a vector with flow names
    Parameters a data.frame with parameter names and values
    Components a data.frame with state names and values
    Externals a data.frame with external names and values
    rates a data.frame with rate names and values
    markers a data.frame with marker names and values
    Variables a vector with variable names
    Unknowns a vector with names of unknowns (either states or flows)
    Weight a vector with the weights of unknowns- default is 1

    Author(s)

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

    See Also

  • Read function that reads inverse input files and produces the input list used by Setup
  • Lsei, Ldei, Linp functions to solve inverse problem, based on output generated by setup.limfile

    Examples

       LIMinputBlending
       Setup(LIMinputBlending )
    
               

    [Package LIM version 1.1 Index]