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))
)

Arguments

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

Value

A revised bsp with the sizes of the target stages changed to match.

Details

Call this function after running specifyCosts.

Examples

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