Skip to contents

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


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

compact

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

Returns

A character value.


Method 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.


Method 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 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

x

character name of data.

value

Object to store.

Returns

Invisible TRUE.


Method 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 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

x

character name of data.

value

Object 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

deep

Whether to make a deep clone.