The constraint coefficients are used to compute the inequality constraints based on the total contribution.
The coefficients come in pairs: for each tag_outcome, there are lower and upper bounds for the constraint values.
Usage
set_constr_coef(tag_outcome, coef_lwr, coef_upr)
Arguments
- tag_outcome
A vector of tag_outcome.
- coef_lwr
A vector of values to set the lower bound, used to multiply by total contribution.
- coef_upr
A vector of values to set the upper bound, used to multiply by total contribution.
Value
A dataframe with tag_outcome with the coefficients.
Examples
tag_outcomes <- c('energy', 'protein', 'ghge')
set_constr_coef(tag_outcome = tag_outcomes,
coef_lwr = rep(0.9, length(tag_outcomes)),
coef_upr = rep(1.0, length(tag_outcomes)))
#> tag_outcome coef_constrlwr coef_construpr
#> 1 energy 0.9 1
#> 2 protein 0.9 1
#> 3 ghge 0.9 1