This super-class is used to construct Objective
Penalty
, Target
, Constraint
,
Portfolio
, Solver
, and Decision
objects.
Only experts should use the fields and methods for this class directly.
name
character
value.
data
list
containing data.
internal
list
containing internal computed values.
compressed_formulation
logical
value indicating if the
object is compatible with a compressed formulation.
None.
show()
Print information about the object.
ConservationModifier$show()
None.
repr()
Generate a character representation of the object.
ConservationModifier$repr(compact = TRUE)
compact
logical
value indicating if the output value
should be compact? Defaults to FALSE
.
A character
value.
calculate()
Perform computations that need to be completed before applying the object.
ConservationModifier$calculate(x, y)
x
optimization_problem()
object.
y
problem()
object.
Invisible TRUE
.
get_data()
Get values stored in the data
field.
ConservationModifier$get_data(x)
x
character
name of data.
An object. If the data
field does not contain an object
associated with the argument to x
, then a new_waiver()
object is
returned.
set_data()
Set values stored in the data
field. Note that this method will
overwrite existing data.
ConservationModifier$set_data(x, value)
x
character
name of data.
value
Object to store.
Invisible TRUE
.
get_internal()
Get values stored in the internal
field.
ConservationModifier$get_internal(x)
x
character
name of data.
An object. If the internal
field does not contain an object
associated with the argument to x
, then a new_waiver()
object is
returned.
set_internal()
Set values stored in the internal
field. Note that this method will
overwrite existing data.
ConservationModifier$set_internal(x, value)
x
character
name of data.
value
Object to store.
An object. If the internal
field does not contain an object
associated with the argument to x
, then a new_waiver()
object is
returned.
clone()
The objects of this class are cloneable with this method.
ConservationModifier$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other classes:
ConservationProblem-class
,
Constraint-class
,
Decision-class
,
Objective-class
,
OptimizationProblem-class
,
Penalty-class
,
Portfolio-class
,
Solver-class
,
Target-class