This super-prototype is used to represent prototypes that in turn are used to modify a ConservationProblem-class object. Specifically, the Constraint-class, Decision-class, Objective-class, and Target-class prototypes inherit from this class. Only experts should interact with this class directly because changes to these class will have profound and far reaching effects.

Fields

$name

character name of object.

$parameters

list object used to customize the modifier.

$data

list object with data.

$compressed_formulation

logical can this constraint be applied to the compressed version of the conservation planning problem?. Defaults to TRUE.

Usage

x$print()

x$show()

x$repr()

x$get_data(name)

x$set_data(name, value)

x$calculate(cp)

x$output()

x$apply(op,cp)

x$get_parameter(id)

x$get_all_parameters()

x$set_parameter(id, value)

x$render_parameter(id)

x$render_all_parameter()

Arguments

name

character name for object

value

any object

id

id or name of parameter

cp

ConservationProblem-class object

op

OptimizationProblem-class object

Details

print

print the object.

show

show the object.

repr

return character representation of the object.

get_data

return an object stored in the data field with the corresponding name. If the object is not present in the data field, a waiver object is returned.

set_data

store an object stored in the data field with the corresponding name. If an object with that name already exists then the object is overwritten.

calculate

function used to perform preliminary calculations and store the data so that they can be reused later without performing the same calculations multiple times. Data can be stored in the data slot of the input ConservationModifier or ConservationProblem objects.

output

function used to generate an output from the object. This method is only used for Target-class objects.

apply

function used to apply the modifier to an OptimizationProblem-class object. This is used by Constraint-class, Decision-class, and Objective-class objects.

get_parameter

retrieve the value of a parameter.

get_all_parameters

generate list containing all the parameters.

set_parameter

change the value of a parameter to new value.

render_parameter

generate a shiny widget to modify the the value of a parameter (specified by argument id).

render_all_parameters

generate a div containing all the parameters" widgets.