Skip to content
Snippets Groups Projects
Commit 9b45ba2b authored by Claus Jonathan Fritzemeier's avatar Claus Jonathan Fritzemeier
Browse files

non working maximum total flux

parent 2858972d
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,7 @@ setMethod(f = "initialize",
react = NULL, lb = NULL, ub = NULL,
costcoefbw = NULL,
costcoeffw = NULL,
lpdir = "min",
absMAX = SYBIL_SETTINGS("MAXIMUM"),
useNames = SYBIL_SETTINGS("USE_NAMES"),
cnames = NULL,
......@@ -65,6 +66,7 @@ setMethod(f = "initialize",
stopifnot(is(model, "modelorg"),
is(wtobj, "numeric"),
is(absMAX, "numeric"))
stopifnot(lpdir %in% c("min", "max"))
# If wtobj is longer than 1, mtf algorithm has to run several
# times. In that case, wtobj is not written in the problem
......@@ -102,6 +104,8 @@ setMethod(f = "initialize",
# | | |
# obj 0 | 1 | 1 |
# NOTE: if lpdir == "max" the 2nd and 3rd block
# will be <= instead of >= and signs change.
# ---------------------------------------------
# problem dimensions
......@@ -131,10 +135,18 @@ setMethod(f = "initialize",
fi <- c(1:nc)
# rows for the delta match matrix
if(lpdir=="min"){
diag(LHS[(nr+1) :(nr+nc) ,1 :nc ]) <- 1
diag(LHS[(nr+1) :(nr+nc) ,(nc+1) :(2*nc)]) <- 1
diag(LHS[(nr+nc+1):(nr+2*nc),1 :nc ]) <- -1
diag(LHS[(nr+nc+1):(nr+2*nc),(2*nc+1):(3*nc)]) <- 1
}else{
diag(LHS[(nr+1) :(nr+nc) ,1 :nc ]) <- 1
diag(LHS[(nr+1) :(nr+nc) ,(nc+1) :(2*nc)]) <- -1
diag(LHS[(nr+nc+1):(nr+2*nc),1 :nc ]) <- -1
diag(LHS[(nr+nc+1):(nr+2*nc),(2*nc+1):(3*nc)]) <- 1
}
# fix the value of the objective function
LHS[(nr+2*nc+1),1:nc] <- obj_coef(model)
......@@ -156,7 +168,11 @@ setMethod(f = "initialize",
#rupper <- c(rhs(model), rep(absMAX, 2*nc + 1))
rlower <- c(rep(0, nr), rep(0, 2*nc), currmo)
rupper <- c(rep(0, nr), rep(absMAX, 2*nc + 1))
rtype <- c(rep("E", nr), rep("L", 2*nc + 1))
if(lpdir == "min"){
rtype <- c(rep("E", nr), rep("L", 2*nc), "L")
}else{
rtype <- c(rep("E", nr), rep("U", 2*nc), "L")
}
# ---------------------------------------------
# objective function
......@@ -252,7 +268,7 @@ setMethod(f = "initialize",
rlb = rlower,
rub = rupper,
rtype = rtype,
lpdir = "min",
lpdir = lpdir,
ctype = NULL,
cnames = colNames,
rnames = rowNames,
......
......@@ -6,6 +6,13 @@
\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
\section{Changes in version 1.3.4 2016-01-27}{
\itemize{
\item \code{sysBiolAlg_mtfClass} got option to be used as maximum total
flux, too.
}
}
% ---------------------------------------------------------------------------- %
\section{Changes in version 1.3.3 2015-11-25}{
\itemize{
\item \code{addReact} crashed for irreversible models.
......
......@@ -111,6 +111,11 @@
values given in \code{costcoeffw}.\cr
Default: \code{NULL}.
}
\item{\code{lpdir}:}{Object of class \code{"character"}
giving the direction of optimization. with \code{max} this class can be
used to optimize maximum total flux. Cavetas: Because of changes in the
linear problem, this cannot be changed later. Default: \code{min}.
}
\item{absMAX}{
A single numerical value used as a maximum value for upper variable
and contraint bounds.\cr
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment