ConservationModifier-class: Conservation problem modifier class

ConservationModifier-classR 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

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.

Methods

Public methods


ConservationModifier$print()

Print information about the object.

Usage
ConservationModifier$print()
Returns

None.


ConservationModifier$show()

Print information about the object.

Usage
ConservationModifier$show()
Returns

None.


ConservationModifier$repr()

Generate a character representation of the object.

Usage
ConservationModifier$repr(compact = TRUE)
Arguments
compact

logical value indicating if the output value should be compact? Defaults to FALSE.

Returns

A character value.


ConservationModifier$calculate()

Perform computations that need to be completed before applying the object.

Usage
ConservationModifier$calculate(x, y)
Arguments
x

optimization_problem() object.

y

problem() object.

Returns

Invisible TRUE.


ConservationModifier$get_data()

Get values stored in the data field.

Usage
ConservationModifier$get_data(x)
Arguments
x

character name of data.

Returns

An object. If the data field does not contain an object associated with x, then a new_waiver() object is returned.


ConservationModifier$set_data()

Set values stored in the data field. Note that this method will overwrite existing data.

Usage
ConservationModifier$set_data(x, value)
Arguments
x

character name of data.

value

Object to store.

Returns

Invisible TRUE.


ConservationModifier$get_internal()

Get values stored in the internal field.

Usage
ConservationModifier$get_internal(x)
Arguments
x

character name of data.

Returns

An object. If the internal field does not contain an object associated with x, then a new_waiver() object is returned.


ConservationModifier$set_internal()

Set values stored in the internal field. Note that this method will overwrite existing data.

Usage
ConservationModifier$set_internal(x, value)
Arguments
x

character name of data.

value

Object to store.

Returns

Invisible TRUE.


ConservationModifier$clone()

The objects of this class are cloneable with this method.

Usage
ConservationModifier$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Other classes: ConservationProblem-class, Constraint-class, Decision-class, MultiConservationProblem-class, MultiObjApproach-class, Objective-class, OptimizationProblem-class, Penalty-class, Portfolio-class, Solver-class, Target-class, TargetMethod-class, Weight-class


prioritizr documentation built on Sept. 24, 2026, 5:07 p.m.