| ConservationModifier-class {prioritizr} | R Documentation |
Conservation problem modifier class
Description
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.
Public fields
namecharactervalue.datalistcontaining data.internallistcontaining internal computed values.compressed_formulationlogicalvalue indicating if the object is compatible with a compressed formulation.
Methods
Public methods
Method print()
Print information about the object.
Usage
ConservationModifier$print()
Returns
None.
Method show()
Print information about the object.
Usage
ConservationModifier$show()
Returns
None.
Method repr()
Generate a character representation of the object.
Usage
ConservationModifier$repr(compact = TRUE)
Arguments
compactlogicalvalue indicating if the output value should be compact? Defaults toFALSE.
Returns
A character value.
Method calculate()
Perform computations that need to be completed before applying the object.
Usage
ConservationModifier$calculate(x, y)
Arguments
xoptimization_problem()object.yproblem()object.
Returns
Invisible TRUE.
Method get_data()
Get values stored in the data field.
Usage
ConservationModifier$get_data(x)
Arguments
xcharactername of data.
Returns
An object. If the data field does not contain an object
associated with the argument to x, then a new_waiver() object is
returned.
Method set_data()
Set values stored in the data field. Note that this method will
overwrite existing data.
Usage
ConservationModifier$set_data(x, value)
Arguments
xcharactername of data.valueObject to store.
Returns
Invisible TRUE.
Method get_internal()
Get values stored in the internal field.
Usage
ConservationModifier$get_internal(x)
Arguments
xcharactername of data.
Returns
An object. If the internal field does not contain an object
associated with the argument to x, then a new_waiver() object is
returned.
Method set_internal()
Set values stored in the internal field. Note that this method will
overwrite existing data.
Usage
ConservationModifier$set_internal(x, value)
Arguments
xcharactername of data.valueObject to store.
Returns
An object. If the internal field does not contain an object
associated with the argument to x, then a new_waiver() object is
returned.
Method clone()
The objects of this class are cloneable with this method.
Usage
ConservationModifier$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
See Also
Other classes:
ConservationProblem-class,
Constraint-class,
Decision-class,
Objective-class,
OptimizationProblem-class,
Penalty-class,
Portfolio-class,
Solver-class,
Target-class