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).
Setup(...)
# S3 method for limfile
Setup(file, verbose = TRUE, ...)
# S3 method for character
Setup(...)
# S3 method for liminput
Setup(liminput,...)
a list containing:
name of the inverse input file.
number of unknowns.
number of equations.
number of constraints.
number of components.
number of externals.
number of variables.
matrix A of equalities Ax=B.
vector B of equalities Ax=B.
matrix G of inequalities Gx>h.
vector H of inequalities Gx=h.
cost vector (to minimise), the weight of each unknown; if not specified; 1 for all unknowns.
profit vector (to maximise).
matrix where element ij denotes flow from compartment i to j.
matrix VarA of variable equation VarA*x=VarB.
vector VarB of variable equation VarA*x=VarB.
a vector with flow names.
a data.frame with parameter names and values.
a data.frame with state names and values.
a data.frame with external names and values.
a data.frame with rate names and values.
a data.frame with marker names and values.
a vector with variable names.
a vector with names of unknowns (either states or flows).
a vector with the weights of unknowns- default is 1.
name of the inverse input file.
if TRUE
: prints warnings and messages to the screen.
list of elements, as returned by Read
.
extra parameters allowing this to be a generic function.
Karline Soetaert <karline.soetaert@nioz.nl>
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
LIMinputBlending
Setup(LIMinputBlending )
Run the code above in your browser using DataLab