Description Usage Arguments Details Methods Author(s) See Also Examples
Write problem object to file (e.g. in lp format).
1 2 3 4 5 6 7 8 9 10 11 | ## S4 method for signature 'optObj_clpAPI,character'
writeProb(lp, fname, ff = "lp")
## S4 method for signature 'optObj_cplexAPI,character'
writeProb(lp, fname, ff = "lp")
## S4 method for signature 'optObj_glpkAPI,character'
writeProb(lp, fname, ff = "lp", ...)
## S4 method for signature 'optObj_lpSolveAPI,character'
writeProb(lp, fname, ff = "lp", ...)
|
lp |
An object extending class |
fname |
A single character string giving the file name to write to. |
ff |
A single character string giving the file format to use, see Details. |
... |
Further arguments passed to the corresponding API routine. |
Argument "ff"
is unused with clpAPI. Valid values for
cplexAPI and lpSolveAPI
are available in their documentations.
For glpkAPI, argument "ff"
can be "lp"
for LP file format,
"mps"
for MPS file format or "glpk"
for GLPK file format.
signature(lp = "optObj_clpAPI", fname = "character")
method to use with package optObj_clpAPI. Argument ff
is
not used here.
signature(lp = "optObj_cplexAPI", fname = "character")
method to use with package optObj_cplexAPI.
signature(lp = "optObj_glpkAPI", fname = "character")
method to use with package optObj_glpkAPI.
signature(lp = "optObj_lpSolveAPI", fname = "character")
method to use with package optObj_lpSolveAPI.
Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de>
Maintainer: Mayo Roettger <mayo.roettger@hhu.de>
Superclass optObj
and constructor function
optObj
.
Method to read problem objects: readProb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Not run:
# In very rare cases it is handy to save a sysBiolAlg-object:
library(sybil)
data(Ec_core)
# create a sysBiolAlg object (we use here GLPK (!))
prob <- sysBiolAlg(Ec_core, algorithm = "fba", solver="glpkAPI")
# write the R-object to disc
save(file="prob.RData",prob)
# now write the linear program part (managed by the solver) to disc
writeProb(prob@problem, fname="prob.lp", ff="lp")
# 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
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.