diff --git a/paper/scheduler.pdf b/paper/scheduler.pdf deleted file mode 100644 index 6c67279..0000000 Binary files a/paper/scheduler.pdf and /dev/null differ diff --git a/paper/scheduler.tex b/paper/scheduler.tex deleted file mode 100644 index a9614a2..0000000 --- a/paper/scheduler.tex +++ /dev/null @@ -1,130 +0,0 @@ -\documentclass[]{article} - -\usepackage{amsmath} -\usepackage{amsthm} -\usepackage{amssymb} -\usepackage{mathtools} -\usepackage{hyperref} -\usepackage{bbm} -\usepackage{physics} - -\newcommand{\mc}{\mathcal} -\newcommand{\bb}{\mathbb} -\DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor} -\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil} - -%opening -\title{Application of Network Flow and Linear Programming to Scheduling of Clinicians} -\author{David Landsman} - -\begin{document} -\maketitle - -\section{Problem} \label{problem} -A group of clinicians are working on-call at a clinic each day of the year, including weekends and holidays, at multiple divisions. When a clinician is assigned to work during the week, they work from 8 A.M. on Monday to 5 P.M. on Friday. During weekends, a clinician works the complement period of time, that is, Friday 5 P.M. to Monday 8 A.M. Each clinician can request not to work certain weeks and weekends of the year. We refer to this as the clinician's \textit{time-off}. - -\section{Linear Programming Approach} -We will attempt to solve \ref{problem} using an integer linear program. The assignment of a clinician from a certain division to a certain week or weekend is captured in a 0-1 variable. Constraints on the assignments are captured using (in-)equalities. - -\subsection{Constants} - \begin{align*} - \{1, \ldots, D\} : &\text{ the set of all divisions, indexed by } d \\ - \{1, \ldots, C\} : &\text{ the set of all clinicians, indexed by } c \\ - \{1, \ldots, B\} : &\text{ the set of all blocks, indexed by } b \\ - \{1, \ldots, W\} : &\text{ the set of all weekends, indexed by } w \\ - \{1, \ldots, W\} \supset \mc{L} : &\text{ the set of all long weekends} \\ - \{1, \ldots, B\} \supset\mc{S}_c : &\text{ the set of blocks clinician $c$ requested off} \\ - \{1, \ldots, W\} \supset\mc{T}_c : &\text{ the set of weekends clinician $c$ requested off} \\ - m_{c, d} : &\text{ the minimum number of blocks clinician $c$ should work in division $d$} \\ - M_{c, d} : &\text{ the maximum number of blocks clinician $c$ should work in division $d$} - \end{align*} - -\subsection{Variables} - \begin{align} - X_{c, b, d} \in \{0, 1\}: &\text{ clinician $c$ covers block $b$ for division $d$} \\ - Y_{c, w} \in \{0, 1\}: &\text{ clinician $c$ covers weekend $w$} - \end{align} -Note that weekends are not distinguished according to division, since the clinician assigned covers all divisions. - -\subsection{Constraints} \label{constraints} - \begin{itemize} - \item Each division needs to have exactly one clinician that covers any given block - \begin{equation} - \sum_{c} X_{c, b, d} = 1 \text{ for each } b, d - \end{equation} - \item Every weekend needs to have exactly one clinician that covers it - \begin{equation} - \sum_{c} Y_{c, w} = 1 \text{ for each } w - \end{equation} - \item In a given division, each clinician can only work between the minimum and maximum number of weeks they are allowed (note: these may be different for different divisions) - \begin{equation} - m_{c, d} \leq \sum_{d} X_{c, b, d} \leq M_{c, d} \text{ for each } c, d - \end{equation} - \item Weekends should be roughly equally distributed between clinicians. - \begin{equation} - \floor*{ \frac{W}{C} } \leq \sum_{w} Y_{c, w} \leq \ceil*{ \frac{W}{C} } \text{ for each } c - \end{equation} - \item Long weekends should be roughly equally distributed between clinicians. - \begin{equation} - \floor*{\frac{|\mc{L}|}{C}} \leq \sum_{w \in \mc{L}} Y_{c, w} \leq \ceil*{\frac{|\mc{L}|}{C}} \text{ for each } c - \end{equation} - \item A clinician cannot work two consecutive blocks (across all divisions) - \begin{equation} - \sum_d \left(X_{c, b, d} + X_{c, b+1, d}\right) \leq 1 \text{ for each $c$ and each $b \leq B - 1$} - \end{equation} - \item A clinician cannot work two consecutive weekends - \begin{equation} - Y_{c, w} + Y_{c, w+1} \leq 1 \text{ for each $c$ and each $w \leq W - 1$} - \end{equation} - \end{itemize} - -\subsection{Objectives} \label{objectives} -Our goal in the linear program is to accommodate clinician time-off requests as much as possible. Moreover, we try to assign weekends close to blocks, if possible. - \begin{itemize} - \item Minimize the number of blocks assigned to a clinician that they requested as time-off - \begin{equation} - \label{eqn_block_obj} - \min_X Q_1(X) = \min_X \sum_{c, b, d} (-1)^{ I(b \in \mc{S}_c) } \cdot X_{c, b, d} - \end{equation} - where $I(\cdot)$ is the indicator function. - \item Minimize the number of weekends assigned to a clinician that they requested as time-off - \begin{equation} - \label{eqn_weekend_obj} - \min_Y Q_2(Y) = \min_Y \sum_{c, w} (-1)^{ I (w \in \mc{T}_c)} \cdot Y_{c, w} - \end{equation} - \item Maximize the adjacency between blocks and weekends assigned for a given clinician. In particular, if a clinician is assigned to work a given block in a given division, we will prefer it if the clinician also works in the weekend between the weeks of the block. \\ \\ - In our formulation, this corresponds to maximizing the sum of products of $X_{c, b, d}$ and $Y_{c, w}$ where $w$ is a weekend adjacent to block $b$ (say, $w = 2b+1$, if each block covers 2 weeks). To accomplish this, we define helper variables: - \begin{equation} - Z_{c, b, d} \in \{0, 1\} : \text{represents product $X_{c, b, d}\cdot Y_{c, 2b+1}$} - \end{equation} - with constraints - \begin{align} - Z_{c, b, d} &\leq X_{c, b, d} \\ - Z_{c, b, d} &\leq Y_{c, 2b+1} \text{ for each division $d$} - \end{align} - Thus, the objective is: - \begin{equation} - \label{eqn_adjacency_obj} - \max_Z \sum_{c, b, d} Z_{c, b, d} = \min_Z \left(- \sum_{c, b, d} Z_{c, b, d}\right) = \min_Z Q_3(Z) - \end{equation} - \end{itemize} - -In order to optimize all the objectives simultaneously we can use the weighted sum method which guarantees our solutions to be Pareto optimal (??). It is necessary to normalize the objective functions, since their domains are not equivalent. In general, if the objective function is of the from -\[ - f(\vb{x}) = \sum_i a_ix_i -\] -Then we normalize it by dividing by the sum of absolute weights, thus giving -\[ - \bar{f}(\vb{x}) = \frac{f(\vb{x})}{\sum_i \abs{a_i}} -\] -In our case, this gives us the following objective functions: - \begin{align*} - \bar{Q}_1(X) = \frac{Q_1(X)}{\sum_{c, b, d} 1} = \frac{Q_1(X)}{C \cdot B \cdot D} \\ - \bar{Q}_2(Y) = \frac{Q_2(Y)}{\sum_{c, w} 1} = \frac{Q_2(Y)}{C \cdot W} \\ - \bar{Q}_3(Z) = \frac{Q_1(Z)}{\sum_{c, b, d} 1} = \frac{Q_3(Z)}{C \cdot B \cdot D} - \end{align*} -We also chose to weigh the objectives equally, thus giving us the final objective: - \begin{equation} - \min_{X, Y, Z} \frac{\bar{Q}_1(X) + \bar{Q}_2(Y) + \bar{Q}_3(Z)}{3} - \end{equation} -\end{document}