Setup                  package:LIM                  R Documentation

_C_r_e_a_t_e_s _l_i_n_e_a_r _i_n_v_e_r_s_e _m_a_t_r_i_c_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     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 'A', 'b', 'G', '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).

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

   file : name of the 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. 

_V_a_l_u_e:

     a list containing: 

   file : name of the inverse input 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. 

_A_u_t_h_o_r(_s):

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

_S_e_e _A_l_s_o:

     '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'

_E_x_a_m_p_l_e_s:

        LIMinputBlending
        Setup(LIMinputBlending )

