Solution settings class
Solution settings class
Details
Definition for the SolutionSettings
class.
user_settings
stores user uploaded .yaml file used to repopulate solution
settings from a previous optimization run. The user uploaded .yaml file
must completely match the current project.
The argument to value
should be a list
with the following elements:
- id
character
identifier for theme, weight, include, or exclude.- setting
character
name of parameter. Available options are:"status"
,"factor"
,"value"
, or"goal"
.- type
character
indicating the type of setting. Available options are:"theme"
,"weight"
,"include"
,"exclude"
"parameter"
.
The argument to value
should be a list
with the following elements:
- id
character
identifier for theme, weight, include, exclude or parameter.- setting
character
name of parameter. Available options are:"status"
,"factor"
,"value"
,"goal"
, or"fileinput"
- value
numeric
,logical
, orcharacter
value for new setting.- type
character
indicating the type of setting. Available options are:"theme"
,"weight"
,"include"
,"exclude"
,"parameter"
.
The argument to value
should be a list
of Theme, Weight,
Include, Exclude and Parameter objects.
Public fields
theme_ids
character
vector of identifiers for the themes.weight_ids
character
vector of identifiers for the weights.include_ids
character
vector of identifiers for the includes.exclude_ids
character
vector of identifiers for the excludes.parameter_ids
character
vector of identifiers for the parameters.themes
list
of Theme objects.weights
list
of Weight objects.includes
list
of Include objects.excludes
list
of Exclude objects.parameters
list
of Parameter objects.user_settings
list
of Theme, Weight, Include, Exclude and Parameter objects.
Methods
Method new()
Create a SolutionSettings
object.
Usage
SolutionSettings$new(themes, weights, includes, excludes, parameters)
Method get_feature_names()
get character vector of all feature names from a list of themes.
Arguments
x
list
of Theme objects.
Method update_ss()
update settings for theme, weight, include, exclude and parameters from user uploaded configuration file.
Method get_widget_data()
Get data for displaying the theme in a solutionSettings()
widget.
Method get_theme_settings()
Get theme settings for generating a prioritization.
Returns
tibble::tibble()
with data.
Method get_weight_settings()
Get weight settings for generating a prioritization.
Returns
tibble::tibble()
with data.
Method get_include_settings()
Get include settings for generating a prioritization.
Returns
tibble::tibble()
with data.
Method get_exclude_settings()
Get exclude settings for generating a prioritization.
Returns
tibble::tibble()
with data.
Method get_parameter_settings()
Get parameter settings for generating a prioritization.
Returns
tibble::tibble()
with data.
Method update_current_held()
Update the current amount held for each themes and weights automatically based on the include and exclude statuses.
Usage
SolutionSettings$update_current_held(
theme_data = self$get_theme_data(),
weight_data = self$get_weight_data(),
include_data = self$get_include_data(),
exclude_data = self$get_exclude_data()
)
Arguments
theme_data
[Matrix::sparseMatrix()] with theme data. Defaults to
self$get_theme_data()`.weight_data
[Matrix::sparseMatrix()] with weight data. Defaults to
self$get_weight_data()`.include_data
[Matrix::sparseMatrix()] with include data. Defaults to
self$get_include_data()`.exclude_data
[Matrix::sparseMatrix()] with exclude data. Defaults to
self$get_exclude_data()`.