-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcalc_relief_capacity.Rd
executable file
·54 lines (45 loc) · 1.57 KB
/
calc_relief_capacity.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calc_relief_capacity.R
\name{calc_relief_capacity}
\alias{calc_relief_capacity}
\title{Relief Capacity}
\usage{
calc_relief_capacity(
demand,
queue_size,
target_queue_size,
time_to_target = 26,
num_referrals = 0,
cv_demand = 0
)
}
\arguments{
\item{demand}{Numeric value of rate of demand in same units as target wait
e.g. if target wait is weeks, then demand in units of patients/week.}
\item{queue_size}{Numeric value of current number of patients in queue.}
\item{target_queue_size}{Numeric value of desired number of patients
in queue.}
\item{time_to_target}{Numeric value of desired number of time-steps to reach
the target queue size by.}
}
\value{
A numeric value of the required rate of capacity to achieve a target
queue size in a given period of time.
}
\description{
Calculates required relief capacity to achieve target queue size
in a given period of time as a function of demand, queue size, target queue
size and time period.
Relief Capacity is required if Queue Size > 2 * Target Queue Size.
Relief Capacity =
Current Demand + (Queue Size - Target Queue Size)/Time Steps
WARNING!: make sure units match.
I.e. if demand is measured per week then time_to_target should be weeks
or if demand is per day then time_to_target is per day
}
\examples{
# If demand is 30 patients per week, the current queue size is 1200 and the
# target is to achieve a queue size of 390 in 26 weeks, then
# Relief Capacity = 30 + (1200 - 390)/26 = 61.15 patients per week.
calc_relief_capacity(30, 1200, 390, 26)
}