update {raptr} | R Documentation |
Update object
Description
This function updates parameters or data stored in an existing
GurobiOpts()
, RapUnreliableOpts()
,
RapReliableOpts()
, RapData()
,
RapUnsolved()
, or RapSolved()
object.
Usage
## S3 method for class 'GurobiOpts'
update(
object,
Threads = NULL,
MIPGap = NULL,
Method = NULL,
Presolve = NULL,
TimeLimit = NULL,
NumberSolutions = NULL,
MultipleSolutionsMethod = NULL,
NumericFocus = NULL,
...
)
## S3 method for class 'ManualOpts'
update(object, NumberSolutions = NULL, ...)
## S3 method for class 'RapData'
update(
object,
species = NULL,
space = NULL,
name = NULL,
amount.target = NULL,
space.target = NULL,
pu = NULL,
cost = NULL,
status = NULL,
...
)
## S3 method for class 'RapReliableOpts'
update(object, BLM = NULL, failure.multiplier = NULL, max.r.level = NULL, ...)
## S3 method for class 'RapUnreliableOpts'
update(object, BLM = NULL, ...)
## S3 method for class 'RapUnsolOrSol'
update(object, ..., formulation = NULL, solve = TRUE)
Arguments
object |
|
Threads |
|
MIPGap |
|
Method |
|
Presolve |
|
TimeLimit |
|
NumberSolutions |
|
MultipleSolutionsMethod |
|
NumericFocus |
|
... |
parameters passed to |
species |
|
space |
|
name |
|
amount.target |
|
space.target |
|
pu |
|
cost |
|
status |
|
BLM |
|
failure.multiplier |
|
max.r.level |
|
formulation |
|
solve |
|
Value
GurobiOpts,
RapUnreliableOpts,
RapReliableOpts, RapData,
RapUnsolved, or RapSolved object
depending on argument to x
.
See Also
GurobiOpts, RapUnreliableOpts, RapReliableOpts, RapData, RapUnsolved, RapSolved.
Examples
## Not run:
# load data
data(sim_ru, sim_rs)
# GurobiOpts
x <- GurobiOpts(MIPGap = 0.7)
y <- update(x, MIPGap = 0.1)
print(x)
print(y)
# RapUnreliableOpts
x <- RapUnreliableOpts(BLM = 10)
y <- update(x, BLM = 2)
print(x)
print(y)
# RapReliableOpts
x <- RapReliableOpts(failure.multiplier = 2)
y <- update(x, failure.multiplier = 4)
print(x)
print(y)
# RapData
x <- sim_ru@data
y <- update(x, space.target = c(0.4, 0.7, 0.1))
print(space.target(x))
print(space.target(y))
## RapUnsolved
x <- sim_ru
y <- update(x, amount.target = c(0.1, 0.2, 0.3), BLM = 3, solve = FALSE)
print(x@opts@BLM); print(amount.target(x))
print(y@opts@BLM); print(space.target(y))
## RapSolved
x <- sim_rs
y <- update(x, space.target = c(0.4, 0.6, 0.9), BLM = 100, Presolve = 1L,
solve = FALSE)
print(x@opts@BLM); print(amount.target(x))
print(y@opts@BLM); print(space.target(y))
## End(Not run)