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
- characteridentifier for theme, weight, include, or exclude.
- setting
- charactername of parameter. Available options are:- "status",- "factor",- "value", or- "goal".
- type
- characterindicating 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
- characteridentifier for theme, weight, include, exclude or parameter.
- setting
- charactername of parameter. Available options are:- "status",- "factor",- "value",- "goal", or- "fileinput"
- value
- numeric,- logical, or- charactervalue for new setting.
- type
- characterindicating 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
- charactervector of identifiers for the themes.
- weight_ids
- charactervector of identifiers for the weights.
- include_ids
- charactervector of identifiers for the includes.
- exclude_ids
- charactervector of identifiers for the excludes.
- parameter_ids
- charactervector of identifiers for the parameters.
- themes
- listof Theme objects.
- weights
- listof Weight objects.
- includes
- listof Include objects.
- excludes
- listof Exclude objects.
- parameters
- listof Parameter objects.
- user_settings
- listof 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
- listof 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 toself$get_theme_data()`.
- weight_data
- [Matrix::sparseMatrix()] with weight data. Defaults toself$get_weight_data()`.
- include_data
- [Matrix::sparseMatrix()] with include data. Defaults toself$get_include_data()`.
- exclude_data
- [Matrix::sparseMatrix()] with exclude data. Defaults toself$get_exclude_data()`.