Project problem class

Description

This class is used to represent project prioritization problems. A project prioritization problem has actions, projects, and features. Features are the biological entities that need to be conserved (e.g. species, populations, ecosystems). Actions are real-world management actions that can be implemented for conservation purposes (e.g. habitat restoration, monitoring, pest eradication). Each action should have a known cost, and this usually means that each action should have a defined spatial extent and time period (though this is not necessary). Conservation projects are groups of management actions (they can also comprise a singular action too), and each project is associated with a probability of success if all of its associated actions are funded. To determine which projects should be funded, each project is associated with an probability of persistence for the features that they benefit. These values should indicate the probability that each feature will persist if only that project funded and not the additional benefit relative to the baseline project. Missing (NA) values should be used to indicate which projects do not enhance the probability of certain features.

Given these data, a project prioritization problem involves making a decision about which actions should be funded or not---and in turn, which projects should be funded or not---to maximize or minimize a specific objective whilst meeting specific constraints. The objective for a project prioritization problem will always pertain to the probability that features are expected to persist. For example, an objective for a project prioritization problem could be to maximize the maximize the total amount of species that are expected to persist, or minimize the total cost of the funded actions subject to constraints which ensure that each feature meets a target level of persistence. The constraints in a project prioritization problem can be used to specify additional requirements (e.g. certain actions must be funded). Finally, a project prioritization problem---unlike an optimization problem---also requires a method to solve the problem. This class represents a planning problem, to actually build and then solve a planning problem, use the problem() function. Only experts should use this class directly.

Fields

$data

list object containing data.

$objective

Objective object used to represent how the targets relate to the solution.

$decisions

Decision object used to represent the type of decision made on planning units.

$targets

Target object used to represent representation targets for features.

$weights

Weight object used to represent feature weights.

$constraints

Collection object used to represent additional constraints that the problem is subject to.

$solver

Solver object used to solve the problem.

Usage

x$print()

x$show()

x$repr()

x$get_data(name)

x$set_data(name, value)

number_of_actions()

number_of_projects()

number_of_features()

action_names()

project_names()

feature_names()

feature_weights()

feature_phylogeny()

action_costs()

project_costs()

project_success_probabilities()

pf_matrix()

epf_matrix()

pa_matrix()

x$add_objective(obj)

x$add_decisions(dec)

x$add_constraint(con)

x$add_solver(sol)

x$add_targets(targ)

x$add_weights(wt)

x$get_constraint_parameter(id)

x$set_constraint_parameter(id, value)

x$render_constraint_parameter(id)

x$render_all_constraint_parameters()

x$get_objective_parameter(id)

x$set_objective_parameter(id, value)

x$render_objective_parameter(id)

x$render_all_objective_parameters()

x$get_solver_parameter(id)

x$set_solver_parameter(id, value)

x$render_solver_parameter(id)

x$render_all_solver_parameters()

Arguments

name

character name for object.

value

an object.

obj

Objective object.

wt

Weight object.

dec

Decision object.

con

Constraint object.

sol

Solver object.

targ

Target object.

wt

Weight object.

id

Id object that refers to a specific parameter.

value

object that the parameter value should become.

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.

number_of_actions

integer number of actions.

number_of_projects

integer number of projects.

number_of_features

integer number of features.

action_names

character names of actions in the problem.

project_names

character names of projects in the problem.

feature_names

character names of features in the problem.

feature_weights

character feature weights.

feature_phylogeny

ape::phylo() phylogenetic tree object.

action_costs

numeric costs for each action.

project_costs

numeric costs for each project.

project_success_probabilities

numeric probability that each project will succeed.

pf_matrix

Matrix::dgCMatrix object denoting the enhanced probability that features will persist if different projects are funded.

epf_matrix

Matrix::dgCMatrix object denoting the enhanced probability that features is expected to persist if different projects are funded. This is calculated as the pf_matrix multiplied by the project success probabilities.

pa_matrix

Matrix::dgCMatrix object indicating which actions are associated with which projects.

feature_targets

tibble::tibble() with feature targets.

add_objective

return a new ProjectProblem with the objective added to it.

add_decisions

return a new ProjectProblem object with the decision added to it.

add_solver

return a new ProjectProblem object with the solver added to it.

add_constraint

return a new ProjectProblem object with the constraint added to it.

add_targets

return a copy with the targets added to the problem.

get_constraint_parameter

get the value of a parameter (specified by argument id) used in one of the constraints in the object.

set_constraint_parameter

set the value of a parameter (specified by argument id) used in one of the constraints in the object to value.

render_constraint_parameter

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

render_all_constraint_parameters

generate a shiny div containing all the parameters' widgets.

get_objective_parameter

get the value of a parameter (specified by argument id) used in the object's objective.

set_objective_parameter

set the value of a parameter (specified by argument id) used in the object's objective to value.

render_objective_parameter

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

render_all_objective_parameters

generate a shiny div containing all the parameters' widgets.

get_weight_parameter

get the value of a parameter (specified by argument id) used in the object's weights.

set_weight_parameter

set the value of a parameter (specified by argument id) used in the object's weights to value.

render_weight_parameter

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

render_all_weight_parameters

generate a shiny div containing all the parameters' widgets.

get_solver_parameter

get the value of a parameter (specified by argument id) used in the object's solver.

set_solver_parameter

set the value of a parameter (specified by argument id) used in the object's solver to value.

render_solver_parameter

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

render_all_solver_parameters

generate a shiny div containing all the parameters' widgets.