I'm sure this is user error but I'm trying to use the generic functions to build a DK CFB optimizer but it outputs the optimal lineup considering positional constraints but goes over the salary_total. In the example below the optimal lineup is $53,600.
It appears as though my data tibble is in the correct format with the correct data types and column names for the 10 columns. Using R version 4.2.2 here is the code with the output below it. Strangely, when I reduce the total_salary to 27,000ish or below it starts to constrain based on salary. Any suggestions to help me de-bug would be appreciated.
I'm sure this is user error but I'm trying to use the generic functions to build a DK CFB optimizer but it outputs the optimal lineup considering positional constraints but goes over the salary_total. In the example below the optimal lineup is $53,600. It appears as though my data tibble is in the correct format with the correct data types and column names for the 10 columns. Using R version 4.2.2 here is the code with the output below it. Strangely, when I reduce the total_salary to 27,000ish or below it starts to constrain based on salary. Any suggestions to help me de-bug would be appreciated.
Here is the output: