adjustEntriesToBudget: adjustEntriesToBudget function

Description Usage Arguments Details Value Examples

View source: R/SpecifyPipeline.R

Description

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.

Usage

1
2
3
4
5
6
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

Details

Call this function after running specifyCosts.

Value

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

Examples

1
bsp <- adjustEntriesToBudget(bsp, targetBudget=50000, fixedEntryStages=c(PYT=100), adjustStages=c("CET", "AYT", "UYT"))

jeanlucj/AlfSimHlpR documentation built on Nov. 7, 2021, 5:10 p.m.