adjustEntriesToBudget.Rd
Specify a budget, the number of entries for a set of stages, and the stages to adjust to hit the budget. The rules are that the first stage can't be bigger than the number of F1s, and no later stage can be bigger than an earlier stage. The function will not adjust if the rules are broken but will report.
adjustEntriesToBudget( bsp, targetBudget, fixedEntryStages = NULL, adjustStages = setdiff(bsp$stageNames, names(fixedEntryStages)) )
bsp | A list of objects to combine with the species and population parameters. bsp is short for breeding sheme parameters |
---|---|
targetBudget | Numeric value that you want the budget adjusted to |
fixedEntryStages | Named integer vector indicating entry numbers for specific stages. Names must be names of the specific stages |
adjustStages | Character vector with names of stages to be changed such that the target budget is achieved |
A revised bsp with the sizes of the target stages changed to match.
Call this function after running specifyCosts.
bsp <- adjustEntriesToBudget(bsp, targetBudget=50000, fixedEntryStages=c(PYT=100), adjustStages=c("CET", "AYT", "UYT"))#> Error in adjustEntriesToBudget(bsp, targetBudget = 50000, fixedEntryStages = c(PYT = 100), adjustStages = c("CET", "AYT", "UYT")): object 'bsp' not found