Learn R Programming

prioritizr (version 4.1.5)

Portfolio-class: Portfolio prototype

Description

This prototype is used to represent methods for generating portfolios of optimization problems. This class represents a recipe to create portfolio generating method and is only recommended for use by expert users. To customize the method used to generate portfolios, please see the help page on portfolios.

Fields

$name

character name of portfolio method.

$parameters

Parameters object with parameters used to customize the the portfolio.

$run

function used to generate a portfolio.

Usage

x$print()

x$show()

x$repr()

x$run(op, sol)

Arguments

x

Solver-class object.

op

OptimizationProblem-class object.

Details

print

print the object.

show

show the object.

repr

character representation of object.

run

solve an OptimizationProblem-class object using this object and a Solver-class object.