diff --git a/man/readProb-methods.Rd b/man/readProb-methods.Rd index ec3d4a6ef942ee51f8f0c6f683360e5e0161ca23..3b2edbfcd3afbf8a124959f5a9212017c8b4a0c5 100644 --- a/man/readProb-methods.Rd +++ b/man/readProb-methods.Rd @@ -76,6 +76,27 @@ \seealso{ Superclass \code{\linkS4class{optObj}} and constructor function \code{\link{optObj}}. + Method to write problem objects: \code{\link{writeProb}} +} + +\examples{ + \dontrun{ + # In very rare cases it is handy to save a sysBiolAlg-object: + + library(sybil) + data(Ec_core) + prob <- sysBiolAlg(Ec_core, algorithm = "fba", solver="glpkAPI") # create a sysBiolAlg object (we use here GLPK (!)) + save(file="prob.RData",prob) # write the R-object to disc + writeProb(prob@problem, fname="prob.lp", ff="lp") # now write the linear program part (managed by the solver) to disc + + # start new R session + + library(sybil) + library(glpkAPI) + load("prob.RData") # restore the R-object + prob@problem@oobj <- initProbGLPK() # initialize a new linear program + readProb(problem(prob), fname="prob.lp") # load the previously saved linear program + } } \keyword{methods} diff --git a/man/writeProb-methods.Rd b/man/writeProb-methods.Rd index 15fb6da932844643be578cfef0769f45c3d74cbd..42c839b7389393c2b67ae6b67fdffadb272d30d8 100644 --- a/man/writeProb-methods.Rd +++ b/man/writeProb-methods.Rd @@ -75,6 +75,27 @@ \seealso{ Superclass \code{\linkS4class{optObj}} and constructor function \code{\link{optObj}}. + Method to read problem objects: \code{\link{readProb}} +} + +\examples{ + \dontrun{ + # In very rare cases it is handy to save a sysBiolAlg-object: + + library(sybil) + data(Ec_core) + prob <- sysBiolAlg(Ec_core, algorithm = "fba", solver="glpkAPI") # create a sysBiolAlg object (we use here GLPK (!)) + save(file="prob.RData",prob) # write the R-object to disc + writeProb(prob@problem, fname="prob.lp", ff="lp") # now write the linear program part (managed by the solver) to disc + + # start new R session + + library(sybil) + library(glpkAPI) + load("prob.RData") # restore the R-object + prob@problem@oobj <- initProbGLPK() # initialize a new linear program + readProb(problem(prob), fname="prob.lp") # load the previously saved linear program + } } \keyword{methods}