Operating Room Allocation Using Mixed Integer Linear Programmig (Milp)
Operating Room Allocation Using Mixed Integer Linear Programmig (Milp)
PROJECT REPORT
Submitted by
SREENATH G V
SASTHA KRISHNAN V
SARAH MATHEW
KAILAS SREE CHANDRAN
To
The University of Kerala
In partial fulfilment of the requirements for the award of the degree
Of
Bachelor of Technology in Mechanical Stream - Industrial Engineering
CERTIFICATE
This is to certify that the Project Report entitled “OPERATING ROOM
Stream - Industrial Engineering, is a bonafide record of the work carried out by them
under my/our guidance and supervision. The contents of this work in full or in parts,
have not been submitted to any other institute or university for the award of any
degree or diploma.
It is with great pleasure, we place on record our deep sense of gratitude and
directions.
Smt. MINI R.S., Lecturer and Staff Advisor, Department of Mechanical Engineering,
College of Engineering, Thiruvananthapuram for their direct and indirect helps for the
Last but not least, we are grateful to our parents, friends and classmates for
their help and co-operation for the successful completion of this project.
SREENATH G V
SASTHA KRISHNAN V
SARAH MATHEW
KAILAS SREE CHANDRAN
ABSTRACT
Public hospitals are non-profit organizations, and their prime operational objective is
theatres.
In most hospitals, the waiting period for surgeries are high and efforts made in the
efficient utilization of resources can prove to be productive in long term. Our aim was
to optimally allocate the Operating Rooms of the hospital and to minimize the total
length of stay of patient. For that, a methodology for allocating operating room
integer programming (MIP) model which determines a weekly operating room (OR)
allocation template that minimizes inpatients' cost measured as their length of stay.
For the purpose, a hospital with a certain number of operating theatres and specialties
A basic model and two variants of it have been developed. A number of clinical
constraints (e.g. maximum number of hours allocated to each specialty, surgeon and
staff availability) are included in the formulation of the basic model. The first variant
of the model brings in the emergency situations that could arise for each specialty at
the hospital. The second variant considers the post-operative care for the patient at the
hospital. The model output gives optimized allocation of operating rooms to each
Thiruvalla, we show how the hospital length of stay pertaining to surgery can be
reduced.
CONTENTS
1. CHAPTER 1: Introduction
1.1 Introduction 01
2. CHAPTER 2: Study
3. CHAPTER 3: Modeling
3.4 Constraints 41
3.5 Notation 41
3.6 Assumptions 43
3.7 Decision Variables 44
3.8 Models 45
4.4 Results 54
APPENDICES
REFERENCE 71
LIST OF FIGURES
LIST OF TABLES
1.1 INTRODUCTION
generate around two thirds of hospital revenues. On the other hand, it accounts for
(surgeons, anesthetists, nurses, etc.) and facilities (operating rooms, intensive care
beds, etc.). Surgery takes place in a context of challenging trends such as heavy
expenditure on health care, increasing rates in health care costs, and rising surgery
demand due to aging populations and technological advances that have broadened the
mounting pressures to control surgical costs while ensuring quality of care for surgical
In many hospitals, a large percentage of patients undergo some type of surgery when
admitted or during their stay in a hospital. To reduce a patient‘s length of stay and
also for The sake of the patient‘s health, it is ideal that a surgery is performed as soon
patients have to wait in bed for their surgery for a couple of days or sometimes a
In a hospital environment, significant amount of time and resource is allocated for the
working of operating theatres. This is made more complicated by the demand being
1
uncertain. If optimum allocation strategies are devised, then worthy savings in time
and there by resources can be achieved. In the present project, an MILP model has
been formulated with the objective of reducing the length of stay of patient in the
While trying to maximize the utilization of the OR, managers are confronted with the
complexity of the case mix and high costs for overtime of the OR staff. Typically, in
hospitals with a complex case mix with a high variability in the duration of surgical
cases, utilization rates are significantly lower than 100%. For example, 100%
utilization for a cancer medical centre is utopian, since a considerable number of the
surgical cases cannot be completed within the planned duration because of the
cases is unpredictable and they can last much longer than expected. This causes
Public hospitals are non-profit organizations, and their prime operational objective is
significant in the sense that the government is constrained on resources and more
Our work focuses on reducing the delay described above, or, in particular, minimizing
Patients' length of stay waiting for their surgery by developing a methodology for
2
CHAPTER 2
2.1 STUDY OF OPERATION THEATRES
In many hospitals, patients are categorized into two types: emergency patients, non-
emergency patients, in their patient database and also when the hospital staff analyze
and discuss their operational processes (e.g., surgery planning and scheduling).
or Trauma patients. Some specialties have both types of patients undergoing surgery,
hospital often has only a few emergency ORs and all the others as non-emergency
ORs. The emergency ORs are solely allocated to the emergency patients who need
surgery, and usually all specialties‘ surgeries can be performed in that room. The non-
and outpatient surgeries), the room can also accommodate for emergency surgeries of
that particular specialty. Indeed, many medical situations require that the emergency
patients be given a higher priority in accessing the non-emergency ORs than the non-
emergency patients[1].
Before each working day (usually one day in advance), the doctors determine which
inpatients in their specialty will have surgery performed on the following day. When
scheduled for the next day because these have been previously scheduled many days
3
in advance. Also, they take into account the number of blocks/rooms allocated to their
specialty on that day, and the order and degree of urgency of all the active inpatients'
surgery requests. During a working day, surgeons try to finish as many scheduled
demand arises almost every day, and surgeons try to operate upon these emergency
patients as soon as possible because of their critical condition. Usually, they are sent
busy when needed, the emergency patient is operated in one of the non-emergency
rooms allotted to the particular specialty in which the patient or the needed surgery
belongs. As a result, some scheduled inpatient and outpatient surgeries may have to be
postponed to a later date or rescheduled. Also, surgeries scheduled for the afternoon
may not be performed because they are too much behind schedule, and they cannot be
2.2.1 Introduction
language, excellent graphics, and a large standard library. The focus in MATLAB is
possible, except through the optional Symbolic Toolbox. All variables must have
4
values, and all results are numerical and potentially inexact, thanks to the rounding
errors inherent in computer arithmetic. The emphasis on numerics is typical for most
such as C++ and Fortran, MATLAB is usually found to be much easier to use.
However, its execution speed can be slower. This gap is not always as dramatic as
popular lore has it, and it can often be narrowed or closed with good MATLAB
programming. Moreover, one can link other types of code into MATLAB, or vice
versa, and MATLAB has some optional support for parallel computing. Still,
Whatever you think of these or other limitations of MATLAB, they have not held
back its popularity: a recent search for ―matlab‖ on the books section of Amazon.com
turned up 8,543results! Rapid code development and interaction with data often trump
execution speed, and the integrated graphics and expert routines that come with
MATLAB can be decisively helpful. Even for speed hungry users, MATLAB can be a
emphasis on experimentation and interaction with data and algorithms; syntax that is
compact, friendly, and interactive (rather than tightly constrained and verbose); a
2.2.2 History
MATLAB was created in the late 1970s by Cleve Moler, then chairman of the
5
his students access to LINPACK and EISPACK without having to learn Fortran. It
soon spread to other universities and found a strong audience within the applied
joined with Moler and Steve Bangert. They rewrote MATLAB in C and founded The
Math Works in 1984 to continue its development. These rewritten libraries were
MATLAB was first adopted by control design engineers, Little's specialty, but
quickly spread to many other domains. It is now also used in education, in particular
the teaching of linear algebra and numerical analysis, and is popular amongst
When you start MATLAB, you get a multi paneled desktop, as seen in Figure 2.1.
The layout and behavior of the desktop and its components are highly customizable.
The component that is the heart of MATLAB is called the Command Window,
located in the middle by default. Here you can give MATLAB commands typed at the
prompt, shown as >>. Unlike Fortran and other compiled computer languages,
execute it right away, then awaits another. At the left you can see the Current
Directory window. In general MATLAB is aware only of files in the current directory
(folder) and on the list known as its path, which can be customized. Commands for
working with the directory and path include cd, what, which, add path, and edit path
6
(or you can choose Set path ... from the File menu).You can add files to a directory
At the top right is the Workspace window. The Work space shows you what variable
names are currently defined and some information about their contents. At start-up it
is, naturally, empty. This represents another break from compiled environments:
variables created in the work space persist for you to examine and modify, even after
code execution stops. Below the Work space window is the Command History
window. As you enter commands, they are recorded here. This record persists across
from here or saved to files. Thus the Command History is very useful if you realize
belatedly that you need to save some or all of what you have been doing interactively.
As you explore MATLAB, you may encounter some toolboxes. These are
7
individually packaged sets of capabilities that provide in-depth expertise on particular
subject areas. There is no need to issue a command to load them- once installed, they
in that direction. But it is possible to access a great deal of the functionality from
graphical widgets such as menus, buttons, and soon. These interfaces are especially
useful to beginners, because they layout the available choices clearly. In particular,
take time to right-click (or Control-click on a Mac®) on various objects to see what
you might be able to do with them. As a rule, graphical interfaces can be more natural
for certain types of inter-active work, such as annotating a single graph, whereas
typed commands remain better for complex, precise, repeated, or reproducible tasks.
Much of the time, you can choose which ever mode of operation suits you. For
instance, you can write a function that customizes any figure‘s appearance, but you
can also save aspects of a current figure‘s style as a template just by pointing and
clicking. Moreover, you can create your own graphical interfaces and even distribute
them with your code as a package for non-MATLAB users. In the end, an advanced
2.2.5 Help
MATLAB is huge. Nobody can tell you everything that you personally will need to
know; nor could you remember it all anyway. It is essential that you become familiar
8
• If you need quick help on the syntax of a command, type help in the
commandwindow. For example, help plot shows directly in the Command Window all
the ways in which you can use the plot command. Typing help by itself gives you a
separate window. For example, doc plot is better formatted and more informative than
help plot. In the left panel one sees a hierarchical, browsable display of all the online
documentation. Typing doc alone or selecting Help from the drop-down menus brings
listing of available functions, with help available on one more click. Merely pausing
after typing the name of a function and its opening parenthesis brings up a context-
sensitive box with syntactic suggestions, as well. The Getting Started with MATLAB
manual is a good place to get a more leisurely and thorough introduction than the one
PDF form for printing and offline reading, or you can find it on the Web at:
www.mathworks.com/access/helpdesk/help/pdf_doc/matlab/getstart.pdf
Exchange, which consists of code contributions by MATLAB users and friends. It‘s a
good place to check when you suspect that you may be trying to reinvent the wheel.
9
2.2.6 Saving And Loading Work
If you enter save myfile, all defined variables will be saved to a file called myfile.mat
in the current directory. This file format is particular to MATLAB. You can also
select a subset of variables to be saved by typing their names after the file name. If
you later enter load myfile, the saved variables are returned to the workspace,
overwriting any presently defined values assigned to the same names. If you highlight
commands in the Command History window, right-click, and select Create M-File
you can save the typed commands to a text file. This can be very helpful for recreating
what you have done. Another way to save both input and output is to use the diary
command with a file name. This causes all subsequent commands and results to be
recorded in a text file on disk. MATLAB is also capable of loading and saving other
common file formats, such as formatted text files, spread sheet files, and common
graphics and video files. To load such a file, it‘s often easiest to double-click it in the
MATLAB, the application, is built around the MATLAB language. The simplest way
Window, one of the elements of the MATLAB Desktop. In this way, MATLAB can
a text file, typically using the MATLAB Editor, as a script or encapsulated into a
2.2.7 Variables
10
types are implicitly converted. It is a dynamically typed language because variables
can be assigned without declaring their type, except if they are to be treated as
symbolic objects, and that their type can change. Values can come from constants,
function.
floor(X): round to the nearest integer toward minus infinity (round to the
ceil(X): round to the nearest integer toward positive infinity (round to the
Vectors/Matrices
2-dimensional array, i.e. an m×n array where m and n are greater than or equal to 1.
Arrays with more than two dimensions are referred to as multidimensional arrays.
11
MATLAB provides a simple way to define simple arrays using the syntax:
init:increment:terminator. The increment value can actually be left out of this syntax
(along with one of the colons), to use a default value of 1. Indexing is one-based,
which is the usual convention for matrices in mathematics, although not for some
programming languages.
Matrices can be defined by separating the elements of a row with blank space or
comma and using a semicolon to terminate each row. The list of elements should be
surrounded by square brackets: []. Parentheses: () are used to access elements and
A square identity matrix of size n can be generated using the function eye, and
matrices of any size with zeros or ones can be generated with the functions zeros and
ones, respectively.
Most MATLAB functions can accept matrices and will apply themselves to each
element. For example, mod(2*J,n) will multiply every element in "J" by 2, and then
reduce each element modulo "n". MATLAB does include standard "for" and "while"
loops, but using MATLAB's vectorized notation often produces code that is easier to
Unlike many other languages, where the semicolon is used to terminate commands, in
MATLAB the semicolon serves to suppress the output of the line that it concludes (it
Graphics
Function plot can be used to produce a graph from two vectors x and y.
12
Three-dimensional graphics can be produced using the functions surf, plot3 or mesh.
Structures
MATLAB supports structure data types. Since all variables in MATLAB are arrays, a
more adequate name is "structure array", where each element of the array has the
same field names. In addition, MATLAB supports dynamic field names (field look-
ups by name, field manipulations etc). Unfortunately, MATLAB JIT does not support
functions.
2.2.9 Classes
MATLAB supports classes, however the syntax and calling conventions are
significantly different than in other languagues, because MATLAB does not have
normally alter any variables of object variable. To create an impression that the
method alters the state of variable, MATLAB toolboxes use evalin() command, which
Object-Oriented Programming
13
2.2.10 Interactions With Other Languages
MATLAB can call functions and subroutines written in the C programming language
and returned. The dynamically loadable object files created by compiling such
Libraries written in Java, ActiveX or .NET can be directly called from MATLAB and
many MATLAB libraries (for example XML or SQL support) are implemented as
wrappers around Java or ActiveX libraries. Calling MATLAB from Java is more
complicated, but can be done with MATLAB extension, which is sold separately by
MathWorks.
2.2.11 Limitations
lock-in. Although MATLAB Builder can deploy MATLAB functions as library files
which can be used with .NET or Java application building environment, future
MATLAB, like Fortran, Visual Basic and Ada, uses parentheses, e.g. y = f(x), for
both indexing into an array and calling a function. Although this syntax can facilitate
mathematical functions, a careful reading of the code may be required to establish the
intent.
14
Mathematical matrix functions generally accept an optional argument to specify a
direction, while others, like plot, do not, and so require additional checks. There are
other cases where MATLAB's interpretation of code may not be consistently what the
user intended (e.g. how spaces are handled inside brackets as separators where it
makes sense but not where it doesn't, or backslash escape sequences which are
interpreted by some functions like fprintf but not directly by the language parser
considered as a convenience for commands typed interactively where the user can
check that MATLAB does what the user wants may be less supportive of the need to
mathematics, but does not accommodate any indexing convention of sequences that
have zero or negative indices. For instance, in MATLAB the DFT (or FFT) is defined
with the DC component at index 1 instead of index 0, which is not consistent with the
standard definition of the DFT in any literature. This one-based indexing convention
is hard coded into MATLAB, making it difficult for a user to define their own zero-
array with element values equal to the index less 1 that would be used instead of the
index, or the MATLAB programmer can remember to subtract 1 from the index
obtained from functions that return an index such as find(), min(), max().
MATLAB built-in data types are always passed by value. Therefore, all input
parameters to a function are usually copied (later MATLAB releases introduced lazy
15
copy where if an input parameters are not being altered, a copy is not being made,
however this has certain restrictions). Instances of user-defined classes are also copied
and passed by value as the default, however user-defined classes can be made to
exhibit reference behavior by inheriting from the abstract handle class. Variables of
global variables, however MATLAB JIT does not support globals, as well as
The MATLAB editor does not have code completion, references searches, or
refactoring. Since MATLAB is weakly typed, these tools would be hard, if not
object can be called without knowing its type. Without code completion, there is a
tendency to use short cryptic names for variables, function and methods, making code
hard to read. Without code completion or reference searches it can take a long time to
text search for what functions and methods can be called in a given context. Without
will likely be several times slower and result in a higher defect rate than development
in a language and IDE with type checking, code completion, reference search,
16
MATLAB lacks any native support for GPU acceleration such as OpenCL,
2.2.12 Alternatives
There are free open source alternatives to MATLAB, in particular GNU Octave,
FreeMat, and Scilab which are intended to be mostly compatible with the MATLAB
language (but not the MATLAB desktop environment). Among other languages that
treat arrays as basic entities (array programming languages) are APL and J, Fortran 95
and 2003, as well as the statistical language S (the main implementations of S are S-
There is one web / cloud based alternative - Monkey Analytics - which provides a
There are also several libraries to add similar functionality to existing languages, such
as Perl Data Language for Perl and SciPy together with NumPy and Matplotlib for
Python.
2.3.1 Introduction
17
subject to a 11 x 1 + a 12 x 2 +...+ a 1n x n ~ b 1
a 21 x 1 + a 22 x 2 +...+ a 2n x n ~ b 2
...
a m1 x 1 + a m2 x 2 +...+ a mn x n ~ b m
u1≥x1
...
ln≤xn
un≥xn
where ~ can be ≤, ≥, or =, and the upper bounds u i and lower bounds l i may be
...
a m1 , a m2 , ... , a mn
18
The optimal solution that CPLEX® computes and returns is:
Variables x 1 , x 2 , ... , x n
Network Flow problems, a special case of LP that CPLEX® can solve much faster by
Programming (QCP) problems include quadratic terms among the constraints. In fact,
Mixed Integer Programming (MIP) problems, where any or all of the LP, QP, or QCP
variables are further restricted to take integer values in the optimal solution and where
MIP itself is extended to include constructs like Special Ordered Sets (SOS) and semi-
continuous variables.
problem, and deliver the solution interactively or into text files. The program
platforms.
Concert Technology is a set of C++, Java, and .NET class libraries offering an API
19
optimizers in C++, Java, or .NET applications. Concert Technology libraries. lists the
ilocplex.lib
C++ libilocplex.a libconcert.a
concert.lib
ILOG.CPLEX.dll
.NET
ILOG.Concert.dll
FORTRAN, or any other language that can call C functions. The library is
The CPLEX connector for The MathWorks MATLAB enables a user to define
optimization problems and solve them within MATLAB using either the
20
2.3.3 Compatible Platforms
interface works the same way and provides the same facilities on all platforms.
Default settings will result in a call to an optimizer that is appropriate to the class of
problem you are solving. However you may wish to choose a different optimizer for
CPLEX® optimizers: Dual Simplex, Primal Simplex, Barrier, and perhaps also the
Pure network models are all solved by the Network Optimizer. QCP models,
including the special case of SOCP models, are all solved by the Barrier optimizer.
MIP models are all solved by the Mixed Integer Optimizer, which in turn may invoke
The choice of optimizer or other parameter settings may have a very large effect on
the solution speed of your particular class of problem. The CPLEX User's Manual
describes the optimizers, provides suggestions for maximizing performance, and notes
BAS files are text files governed by Mathematical Programming System (MPS)
conventions (that is, they are not binary) for saving a problem basis. They are
21
Table 2.2 Summary of Optimizers
Mixed Integer
yes
Optimizer
BZ2 is not a file format specific to CPLEX® . Rather, this file extension indicates that
a file (possibly in one of the formats that CPLEX® reads) has been compressed by
BZIP2. On most platforms, CPLEX® can automatically uncompress such a file and
then read data from the file in one of the formats briefly described here
CLP is the format CPLEX® uses to represent the conflicting constraints and bounds
CPLEX® for reading and writing such files. See the CPLEX C++ API Reference
IloCsvReader::Iterator.
22
DPE is the format CPLEX® uses to write a problem in a binary SAV file after the
DUA format, governed by MPS conventions, writes the dual formulation of a problem
currently in memory so that the MPS file can later be read back in and the dual
formulation can then be optimized explicitly. This file format is largely obsolete now
since you can use the command set presolve dual in the Interactive Optimizer to tell
to tell CPLEX® to write the dual formulation to a DUA file and then tell CPLEX® to
EMB is the format CPLEX® uses to save an embedded network it extracts from a
FLT is the format CPLEX® uses to save filters for solution pools.
GZ is not a file format specific to CPLEX® . Rather, this file extension indicates that
a file (possibly in one of the formats that CPLEX® reads) has been compressed by
gzip , the GNU zip program. On most platforms, CPLEX® can automatically
uncompress a gzipped file and then read data from a file in one of the formats briefly
described here.
enter problems in terms of their constraints. When you enter problems interactively in
the Interactive Optimizer, you are implicitly using LP format. CPLEX® also reads
23
files in LP format. The section LP file format: matrix models describes the
by DIMACS in 1991.
problems. This file format is documented in MPS file format: industry standard.
Besides the industry conventions, CPLEX® also supports extensions to this format
for CPLEX® -specific cases, such as names of more than eight characters, blank
space as delimiters between columns, etc. The extensions are documented in Special
MST is an XML format available with the CPLEX® MIP optimizer. It is a text
format CPLEX® uses to enter a starting solution for a MIP. MST file format: MIP
named nodes and arcs. NET file format: network flow models offers a fuller
ORD is a format available with the CPLEX® MIP optimizer. It is used to enter and to
save priority orders for branching. It may contain branching instructions for individual
variables. ORD file format: priorities and branching orders documents this file format.
PPE is the format CPLEX® uses to write a problem in a binary SAV file after the
24
PRE is the format CPLEX® uses to write a presolved, reduced problem formulation
to a binary SAV file. Since a presolved problem has been reduced, it does not
PRM is the format CPLEX® uses to read and write nondefault values of parameters
in a file. PRM file format: parameter settings documents the format and conventions
for reading and writing such files through the Callable Library.
REW is a format to write a problem in MPS format with disguised row and column
names. This format is simply an MPS file format with all variable (column) and
through xn , and rows are renamed c1 through cm . This format may be useful, for
SAVis a CPLEX® -specific binary format for reading and writing problems and their
associated basis information. CPLEX® includes the basis in a SAV file only if the
problem currently in memory has been optimized and a basis exists. This format
offers the advantage of being numerically accurate (to the same degree as your
platform) in contrast to text file formats that may lose numerical accuracy. It also has
the additional benefit of being efficient with respect to read and write time. However,
since a SAV file is binary, you cannot read nor edit it with your favorite text editor.
SOL files are XML formatted files that contain solution information; they may also
25
XML as a file format is available to C++ users of Concert Technology to serialize
models and solutions (that is, instances of IloModel and IloSolution). XML file
format: serialized models and solutions explains more about this serialization API.
IBM ILOG CPLEX for MATLAB® can also solve several extensions to LP:
quadratic terms among the constraints. In fact, CPLEX can solve Second
Mixed Integer Programming (MIP) problems, where any or all of the LP, QP,
or QCP variables are further restricted to take integer values in the optimal
solution and where MIP itself is extended to include constructs like Special
The standard MATLAB vector and matrix format is used for the elements of data that
you need to provide. For example, the IBM ILOG CPLEX for MATLAB Toolbox
min f*x
26
Aeq*x = beq
lb <= x <= ub
where f, bineq, beq, lb, and ub are MATLAB vectors, and Aineq and Aeq are
MATLAB matrices.
x = cplexlp(f,Aineq,beq,Aeq,beq,lb,ub)
Provided in IBM ILOG CPLEX for MATLAB is both a toolbox of functions and a
class API. The toolbox contains functions for solving optimization problems, where
the input matrices are provided to the function and results returned. With the class
The benefits of using the Cplex class API include the ability to:
attach an output parser, a GUI with stop buttons, and other controls.
The toolbox provides the functions cplexlp, cplexqp and cplexbilp to solve linear
27
The toolbox provides functions that support the solution of the basic problem types
Functions that support the solution of additional problem types handled by CPLEX
problems,
and
28
cplexlsqnonnegmiqcp for nonnegative quadratically constrained mixed
Options, also called parameters, can be set to control the solution of problems. The
toolbox provides two types of options input. One type is the CPLEX parameters, and
the other type is the MATLAB® toolbox options. You can use either or both of these
types of options. If you use both, the CPLEX parameters will override the MATLAB
options.
You can set the options with the toolbox function cplexoptimset and access the
The advantage of the toolbox design is that you can reuse your code where you had
While the IBM® ILOG® CPLEX® for MATLAB® Toolbox functions provide the
design does not support restart. To enable users to use decomposition algorithms, the
Cplex Class API is also provided in IBM ILOG CPLEX for MATLAB.
The Cplex class stores the model and provides methods for the solution, analysis,
manipulation and reading/writing of the model file. All of the data associated with the
problem is stored in the properties of a Cplex object. These class properties are
standard MATLAB data structures and can be manipulated directly within MATLAB.
29
However, modifying the problem using methods provided in the Cplex class enforces
output
The following methods are provided for reading from and writing to files:
Cplex.readModel
30
Cplex.writeModel
Cplex.readBasis
Cplex.writeBasis
Cplex.readMipStart
Cplex.writeMipStart
Cplex.writeParam
Cplex.writeConflict
The following methods are provided to solve and analyze the model, solution and
mipstart:
Cplex.solve
Cplex.populate
Cplex.feasOpt
Cplex.refineMipStartConflict
Cplex.terminate
The following methods are provided to solve, set and query parameters:
Cplex.tuneParam
Cplex.setDefault
Cplex.getChgParam
31
2.4 STUDY OF OPERATING THEATRE SCHEDULING
2.4.1 Introduction
During the last decades, cost pressures on hospitals have increased dramatically. This
emphasis on cost containment has forced hospital executives to run their organizations
service at ever reduced costs. In order to achieve this purpose, inefficient use of
resources should be identified and actions should be taken to eliminate these sources
of waste. Operations research techniques are increasingly being used to assist in this
complicated task[22].
There are many ways to set up schedule in a hospital. A strict block schedule will
block all or most available time, which usually creates a lot of unused and, therefore,
non-productive operating room time. When using this method, the blocks may not be
released at all or are not released until the day before the surgery date. In another
method, the open schedule, cases are scheduled on a first come–first served basis.
Such schedules can frustrate surgeons, as they may not be able to schedule their cases
who can anticipate their schedules far in advance, such as ophthalmologists or plastic
surgeons, can live with this method far better than OB/GYN or general surgeons, who
often schedule within one to three days of surgery and cannot get a time that works
for them[18].
Modified block scheduling is the most widely used method and affords most centers
32
a block of time, which can range from two hours to an entire day, in which to use the
executive committee— reviews block use and manage the blocks to maximize use of
operating room time. A center should strive to achieve 70% utilization of all operating
room time. Eighty-five percent is probably the maximum anyone can hope to achieve
In a modified block scheduling format, the center reserves some of the available
surgery time for surgeons who can fill the block as required by your center‘s policies.
For example, you may require that a physician fill 60%–70% or more per quarter to
A new medical center will probably set the requirements a little lower, but it must
diligently review block time use and eventually push to achieve a higher percentage.
Unblocked times are called open blocks, which physicians use when they cannot fill a
block alone. OB/GYN surgeons or general surgeons, depending upon their practice,
may fit into this category. Blocktime should be released by the office as early as
possible, if the surgeon will not be using a block due to vacation, seminar, or another
reason. The medical centre releases the blocks according to its policies, usually 72
hours to one week in advance if the surgeon has not filled the block. Whatever part of
the assigned block is released becomes open time. The surgery scheduler can fill this
new open time with any cases that were added to the schedule close to the date of
surgery, as cases from OB/GYNs and general surgeons often are. This method allows
33
Most medical centers include a statement in their scheduling policies that prohibits
nonexistent cases to hold block time to prevent another physician from taking it[15].
In the MMBJS, n jobs are performed on m resources. Each job consists of a sequence
resources is called a mode. The modes of any two consecutive operations of any job
have no common resources. There might be more than one mode available for each
operation, justifying the term multi-mode. Once a mode is chosen for an operation, its
processing entails a processing time during which the resources of the mode are
occupied simultaneously, and possibly a setup time and a cleanup time. All these
Resources are not always available all the time. Therefore, to each mode is attached a
time interval during which the mode is available. There is no buffer between
resources, so that if a job has finished an operation and the job‘s next operation cannot
be started, the resources of the finished operation remain blocked until the next
operation is started. Because of this blocking, one needs to distinguish between the
completion time of an operation, which equals the sum of its starting time and
processing time, and its departure time (the time the job leaves its current processing
stage to enter its next stage or leave the system). Scheduling with blocking is of
emergent research interest for its applicability in various shop environments, e.g. in
34
2.5 STUDY OF MIXED INTEGER LINEAR PROGRAMMING
(MILP)
of their modeling capability and because powerful solvers are available commercially.
The use of MILP for modeling and control problems have been used for cooperative
We have seen that the max flow problem is a special case of the min cost flow
should be sufficient to tackle any of the problems we have seen so far. However, if we
use a general LP solver based on, say, the simplex method to solve max flow
method or Klein's algorithm, it seems that we may lose an important property of the
Klein's algorithm are given integer-valued inputs, the solutions returned are also
instances r(G) with the property that any matching of size v in G leads to a flow of
value v in r(G) and any flow with an integer valued flow along every edge of value v
in r(G) leads to a matching of size v in G. This reduction enables us to use any max
35
flow Algorithm with the integrality property, such as Ford-Fulkerson, to find
maximum cardinality matchings. Suppose we now instead try to use the simplex
appropriate max flow instance as a linear program. The value of the solution found
will give us the cardinality of a maximum matching as desired, but it is not a priori
clear that we can use the solution to extract the matching itself.
Indeed, this only seems to be the case if we can prove an integrality theorem for the
simplex algorithm. Fortunately, it turns out that we can prove such an integrality
theorem for a special class of linear programs that include the linear programs that
express max flow and min cost flow instances. This is captured in the following
loosely formulated (in the sense that we are not being specific about which LP
Fact 1 Max flow instances with integer-valued capacities and min cost flow instances
such a way that every basic feasible solution to the resulting linear program is integer-
valued. In particular, the optimal basic solution returned by the simplex algorithm is
integer-valued.
Of course, we might choose to solve our linear program by methods other than the
we may conceivably have a solver that is guaranteed to return optimal solutions but
not necessarily basic optimal solutions. If this is the case, we can easily build a \shell"
around the solver that converts any non-basic optimal solution found to a basic
optimal solution and Fact 1 again applies. Fact 1 takes care of the integrality property
36
for the special class of linear programs corresponding to flow instances. However,
being able to impose integrality constraints on the solutions we seek is relevant for
many other optimization tasks that can be expressed using linear constraints and for
these, Fact 1 may not apply. Therefore, we shall look at a generalization of linear
kind: Find a point x 2 Rn maximizing (or minimzing) a linear form hc; xi so that a
given set of linear inequalities and/or equations and a given set of integrality
Thus, the only addition to the LP formalism we make is the ability to require certain
components of the solution to be integer valued. We shall see, however, that this
seemingly modest added expressiveness in general makes the task of finding the
optimal solution painfully harder. In particular, all algorithms for solving MILPs have
exponential worst case complexity and unlike the case of the simplex algorithm which
running time of any of the MILP solvers we know (and shall describe later in this
Powerful software packages such as CPLEX can solve MILPs efficiently for problems
37
CHAPTER 3
3. MODELING
3.1 PROBLEM IDENTIFICATION
The public health care sector is severely strained with the ever increasing population
.The hospitals are unable to cope up with the increasing demands of the teeming
millions as the resources and facilities available for satisfying the demand are limited
.This has resulted in long serpentine queues which cripples the health sector reforms
and initiatives. Operating rooms (OR) are considered among the most costly hospital
facilities and it often becomes a bottleneck in the hospital . The efficient management
An unnecessarily long length of stay (LOS) for inpatients is one of the common issues
surgical and ancillary services, since most inpatients require one or both of these
during their stay at the hospital. In most hospitals, a large percentage of inpatients
undergo some type of surgery during their stay in a hospital. To reduce inpatient
length of stay and also from the patient‟s health point of view, it is ideal that a surgery
wait in bed for their surgery for a day or two or even longer (especially in public
hospitals). Outpatients also may not always undergo their surgery on schedule,
although this is not directly counted in the hospital‟s expenditures. Thus, it is of great
interest to hospital administrators to reduce inpatients' LOS. There are many possible
reasons for delays. For example, a patient who is considered to need surgery
38
immediately might be given preference over another patient who has been waiting for
a week, and has a scheduled surgery. Or, a hospital may face a situation where a large
number of emergency patients needing surgery use up most of the available Operating
Room capacity. As a result, the delayed inpatients stay in the hospital longer,
incurring higher non-reimbursable costs for the hospital and the delayed outpatients
may remain in a long outpatient queue (often in the form of a waiting list) waiting for
surgery and also continue to “compete” for operating room capacity with inpatients,
affecting LOS indirectly[3]. Thus the unnecessarily long length of stay in the hospital
due to the inefficient scheduling procedure is the problem which needs immediate
The mixed integer linear programming technique is used to solve the problem of
operating room scheduling. The model determines an allocation template and each
objective of minimizing inpatients‟ length of stay in the hospital. Based on the study
conducted on the operating theatre systems the various constraints are also identified.
The mixed integer programming method is adopted as some of the decision variables
Here we have developed a basic model without considering the emergency and has
improved this model to consider the case of emergency demand also. The following
represents the general description of the various aspects identified and represented in
39
The decision variables identified to be analysed in the system includes
day.
The objective function aims at minimising the patient‟s length of stay in the hospital.
In order to represent the patient‟s length of stay in the hospital three penalty terms are
identified. The objective function of the formulation consists of three cost or penalty
terms. The first two represent the inpatients‟ length of stay caused by the delay in
meeting surgery demand within one cycle (or for up to 7 days) and by “unmet”
demand, respectively. The third term represents the total penalty caused by the
the percentage of total non-emergency surgery demand for each specialty. This
inpatients‟ length of stay waiting for their surgery; yet inclusion of this term is useful
40
in determining, among solutions yielding the same or similar sum of the first two
terms or total length of stay, the one that leads to the most reasonable allocation of the
non-emergency OR idle time (in the sense that the larger non-emergency surgery
demand a specialty has, the more non-emergency OR idle time it tends to occupy) and
thus would perform the best when subject to actual demand and time uncertainty[6].
3.4 CONSTRAINTS
All the decision variables can take only positive values. The decision variable
representing the number of operating rooms can take only positive integral values.
The number of operating rooms available for each of the speciality for a particular day
(both emergency and non emergency operating rooms) represents the main
„resources‟ constraint. The amount of available OR hours and the total idle time are
the other resource constraint identified. Also the model should make sure that the
emergency demand for a day should be met whereas the non emergency demand can
the constraint representing the number of post operative beds capacity as it has been
identified as one of the limited facilities. The various constraints are elaborated along
3.5 NOTATION
D: set of days.
41
i: index for room type. A room can be considered a different type due to its location
ejk: emergency patients‟ surgery demand for specialty j on day k, measured in hours.
cjk: the maximum number of operating rooms that specialty j can utilize on day k,
determined by the number of surgeons and the amount of equipment or any other
ρkl: the number of days delayed if a surgery is postponed from day k to day l.
θ: the equivalent number of days delayed if some surgery demand is not met in the
each specialty. Inclusion of this penalty term in the objective function serves the
purpose of smoothing the OR capacity. The β value should be much smaller than
θ.
42
3.6 ASSUMPTIONS
1. The number of working days can be defined by the end user subject to the
maximum of a 7 workdays.
2. Staffed hours can also be given by the user. Overtime work is not modelled.
3. The demand pattern for a week is known before hand. The model does not
patients' stay in the hospital on Saturdays and Sundays does incur cost just like
on weekdays. Therefore,
Note that if k = l or k > l, day l represents a weekday following the week for
day k.
Wednesday and the average length of this specialty's emergency surgery is 1.6
43
multiplying the postponed demand volume (i.e. the amount of OR hours
postponed) by the number of days between the day that amount of demand
8. All emergency surgery demand must be met on the day it arises. Non-
requested day, it can be met on the remaining days of the current week, on any
day in the following week, or become unmet (equivalent to being met θ days
late).
10. Each specialty performs their non-emergency surgeries only in the non-
11. Each specialty can perform their emergency surgeries either in the emergency
xijk: the number of operating rooms of type i allocated to specialty j on day k. The
yjk: the amount of the emergency OR‟s staffed hours allocated to specialty j on day k.
44
bjk: the amount of idle time of the OR allocated to specialty j on day k.
3.8 MODELS
The objective function of the formulation consists of three cost or penalty terms. The
first two represent the inpatients‟ length of stay caused by the delay in meeting
surgery demand within one cycle (or for up to 7 days) and by “unmet” demand (or
equivalent to being postponed θ days, by our notation), respectively. The third term
represents the total penalty caused by the undersupply of OR hours to each specialty,
surgery demand for each specialty. This penalty term is less dominant, considering
our practical objective of minimizing inpatients‟ length of stay waiting for their
surgery; yet inclusion of this term is useful in determining, among solutions yielding
the same or similar sum of the first two terms or total length of stay, the one that
leads to the most reasonable allocation of the non-emergency OR idle time (in the
sense that the larger non-emergency surgery demand a specialty has, the more non-
emergency OR idle time it tends to occupy) and thus would perform the best when
45
Min ∑ ∑ (ρkl ∑ zjkl) + θ ∑ ∑ ujk + β∑qj
kϵD lϵD jϵJ jϵJ kϵD jϵJ
Subjected To
h = ∑ ∑ bjk (4)
jϵJ kϵD
h∑ ojk
kϵD
∑ ∑ ojk For all j (5)
jϵJ kϵD
h, pj, qj, xijk, bjk, yjk, zjkl, ujk ≥ 0 For all I, j, k (7)
Constraint (1) guarantees that all the operating rooms are allocated to some
46
Constraint (2) ensures that on any day each specialty has at least the OR
day.
Constraint (3) states that specialty j's non-emergency surgery demand on day k
must be met either on that day, some remaining day in the current week, some
day in the next week, or unmet (that is, met θ days late).
Constraint (4) defines h as the sum of idle hours of all the non-emergency ORs
demand for specialty j. More specifically, given the weekly total of non-
emergency OR idle hours, it is desired that each specialty occupies the amount
represent the difference between the actual allocation and the desired level for
specialty j.
Constraint (6) ensures that specialty j is at most allocated cjk ORs on day k.
47
Subjected To
h = ∑ ∑ bjk (4)
jϵJ kϵD
h∑ ojk
kϵD
∑ ∑ ojk For all j (5)
jϵJ kϵD
h, pj, qj, xijk, bjk, yjk, zjkl, ujk ≥ 0 For all i, j, k (9)
48
Constraint (1) guarantees that all the operating rooms are allocated to some
Constraint (2) ensures that on any day each specialty has at least the OR
capacity to meet
the sum of its emergency demand on that day and non-emergency demand
Constraint (3) states that specialty j's non-emergency surgery demand on day k
must be met either on that day, some remaining day in the current week, some
day in the next week, or unmet (that is, met θ days late).
Constraint (4) defines h as the sum of idle hours of all the non-emergency ORs
demand for specialty j. More specifically, given the weekly total of non-
emergency OR idle hours, it is desired that each specialty occupies the amount
represent the difference between the actual allocation and the desired level for
specialty j.
Constraint (7) ensures that specialty j is at most allocated cjk ORs on day k.
49
Constraint (8) guarantees that the daily emergency OR capacity allocated to
3.8.3 Model 2 (introducing the post operative care beds capacity constraint)
Subjected To
The constraints (1)-(10) remain unaltered for this variant of the basic model.
However a new constraint taking into consideration the number of beds available in
post operative care has been introduced. The constraint (11) states that the sum of the
total non-emergency demand and the demand that has been postponed to day k from l
minus the non emergency demand that has been postponed from day k for a specialty j
must be less than or equal to the number of hours available on post-operative care.
50
CHAPTER 4
4. CASESTUDY
The data for the model was collected from Pushpagiri Institute of Medical Sciences
The collected data contained basic statistical information about the hospital such as
the number of operating theatres, number of staffed hours of the theatre, etc.,
information about the average daily out patient attendance in various departments of
The hospital has separate intensive care units and post-operative rooms. However, for
convenience, both of these can be clubbed together and termed as Post-Operative Care
(POC).
As part of the analysis, it is necessary to find the number of people each day who are
sent in for surgery. In order to find this approximate percentage 2 and 3 have been
used. This method of calculation is better explained with the help of an example.
51
Total daily OPD attendance for a year = 111 * 365 = 40515
Hence it can be seen that approximately 13% of the total number of patients coming
in per day at the general surgery department would undergo surgical treatment.
This analysis was carried out for all the four departments and the results have been
tabulated below:
Based on the data collected a set of sample data was drawn for input to the model.
This input data considers the General Surgery and Orthopedics department of the
Number of Specialties : 2
52
Number of operating rooms of type 1 : 3
The input data for non-emergency demand for the operating day is tabulated below:
The input data for the emergency demand for the operating days is tabulated below:
The MILP model was solved on computer with the following configuration:
3GB RAM
53
4.4 RESULTS
The results of the MATLAB model give the minimized length of stay of the patient in
the hospital and also gives the optimal allocation of operating rooms to each specialty
Monday 2 2 1 0
Tuesday 1 0 3 1
Wednesday 3 1 0 1
Thursday 0 1 2 2
Friday 2 2 1 1
Two graphs are plotted based on the allocation template for Speciality 1 and
Speciality 2. From the graphs, we can find that for specialty 1,two operating rooms
are each allocated for each of the two types of operating rooms available on Monday.
For Tuesday and Thursday we find that no operating rooms are scheduled for one of
the types which are due to lack of demand on those days. The graphs for the second
54
Allocation for Speciality 1
3.5
2.5
OR Rooms
1.5
0.5
0
Monday Tuesday Wednesday Thursday Friday
SPECIALITY 1 Type 1 2 1 3 0 2
SPECIALITY 1 Type 2 2 0 1 1 2
2.5
OR Rooms
1.5
0.5
0
Monday Tuesday Wednesday Thursday Friday
SPECIALITY 2 Type 1 1 3 0 2 1
SPECIALITY 2 Type 3 0 1 1 2 1
55
CHAPTER 5
Usually we find that researches done in medical fields are focused on developing
room allocation to each specialty. The methodology was illustrated on a case example
of Pushpagiri Institute of Medical Sciences and Research Centre, Thiruvalla, and the
analysis showed that the average inpatient waiting time for surgery could be reduced
The templates generated by the optimization model could perform poorly in practice
when there are high variances associated with surgery length and volatile patient
arrival patterns since the optimization model does not account for uncertainty in the
into the analytical model. Also, since the problem sizes were relatively small the MIP
study. However, for larger problem sizes specialized algorithms or heuristics may be
incorporating other commonly seen constraints like Staff shifts, taking a detailed view
56
APPENDICES
Basic Information:
Shifts of Doctors & nurses: 4 shifts; 8:30 AM - 3:30 PM; 1 - 9 PM; 3:30 - 11:30 PM;
11:30 PM - 7:30 AM
OR
GS Ortho Ophthalmology
Laryn
Old 84 61 37 11
New 27 17 11 2
Total 111 78 48 13
57
Table AP 1.2 Number of surgeries for the year 2009
58
APPENDIX 2: MATLAB code for MILP Model 2
function projcpy()
try
%DEFINE DATA
no_of_types_of_theatres = input('Enter the number of operating theatres types:');
no_of_staffed_hours = input('Enter the number of staffed hours:');
delay_for_unmet_demand = input('Enter the delay for unmet demand:');
no_of_operating_days = input('Enter the number of operating days:');
no_of_specialities = input('Enter the number of specialities:');
penalty_rate = input('Enter the penalty rate:');
no_of_beds_in_POC = input('Enter the number of bed in post-operative care:');
total_hours_in_POC = no_of_beds_in_POC*168;
59
end
%Build Model
cplex = Cplex('proj');
cplex.Model.sense = 'minimize';
%OBJECTIVE FUNCTION
%For the demand that has been postponed from the previous week
a = 1;
for j = 1:no_of_specialities,
for k = 1:no_of_operating_days,
for l = 1:no_of_operating_days,
obj(a) = delay(k,l);
ctype(a) = char('C');
a = a+1;
end
end
end
60
obj(a) = penalty_rate;
ctype(a) = char('C');
a = a+1;
end
a=a+1;
61
%Constraints formulation
rows
=((no_of_types_of_theatres*no_of_operating_days)+5*(no_of_specialities*no_of_op
erating_days)+1+no_of_operating_days);
A = zeros(rows,a);
d=((no_of_operating_days*no_of_operating_days*no_of_specialities)+(no_of_specia
lities*no_of_operating_days)+(2*(no_of_specialities))+(no_of_specialities*no_of_op
erating_days)+(no_of_types_of_theatres*no_of_specialities*no_of_operating_days));
A(e+1,d+1)=-1;
62
end
end
end
d=((no_of_operating_days*no_of_operating_days*no_of_specialities)+(no_of_specia
lities*no_of_operating_days)+(2*(no_of_specialities)));
for j=1:no_of_specialities
for k=1:no_of_operating_days
A(e+((j-1)*no_of_operating_days)+k,d+((j-1)*no_of_operating_days)+k)=-1;
end
63
end
d=((no_of_operating_days*no_of_operating_days*no_of_specialities));
for j=1:no_of_specialities
for k=1:no_of_operating_days
A(e+(j-1)*no_of_operating_days+k,d+((j-1)*no_of_operating_days)+k) = 1;
end
end
d=((no_of_operating_days*no_of_operating_days*no_of_specialities)+(no_of_specia
lities*no_of_operating_days)+(2*(no_of_specialities))+(no_of_specialities*no_of_op
erating_days)+(no_of_types_of_theatres*no_of_specialities*no_of_operating_days)+
1);
for j=1:no_of_specialities
for k=1:no_of_operating_days
A(e+(j-1)*no_of_operating_days+k,d+((j-1)*no_of_operating_days)+k) = 1;
end
end
64
%For the POC constraint
e=((no_of_types_of_theatres*no_of_operating_days)+(4*(no_of_specialities*no_of_
operating_days)+1+no_of_operating_days)+no_of_specialities);
for j=1:no_of_specialities
for k=1:no_of_operating_days
A(e+(j-1)*no_of_operating_days+k,d+((j-1)*no_of_operating_days)+k) = 1;
end
end
d=((no_of_operating_days*no_of_operating_days*no_of_specialities));
for j=1:no_of_specialities
for k=1:no_of_operating_days
A(e+(j-1)*no_of_operating_days+k,d+((j-1)*no_of_operating_days)+k) = -1;
end
end
d=((no_of_operating_days*no_of_operating_days*no_of_specialities)+(no_of_specia
lities*no_of_operating_days)+(2*(no_of_specialities)));
e=(no_of_types_of_theatres*no_of_operating_days)+2*(no_of_specialities*no_of_op
erating_days)+1;
for j=1:no_of_specialities
for k=1:no_of_operating_days
A(e+(j-1)*no_of_operating_days+k,d+((j-1)*no_of_operating_days)+k)=1;
end
end
d=(no_of_operating_days*no_of_operating_days*no_of_specialities)+(no_of_special
ities*no_of_operating_days);
e=(no_of_types_of_theatres*no_of_operating_days)+2*(no_of_specialities*no_of_op
erating_days)+1;
for j=no_of_specialities
A(e+j,d+1)=1;
end
d=(no_of_operating_days*no_of_operating_days*no_of_specialities)+(no_of_special
ities*no_of_operating_days)+no_of_specialities;
e=(no_of_types_of_theatres*no_of_operating_days)+2*(no_of_specialities*no_of_op
erating_days)+1;
for j=no_of_specialities
A(e+j,d+1)=1;
end
sum=0;
for j=1:no_of_specialities
for k=1:no_of_operating_days
65
sum= sum+o(j,k);
end
end
for j=1:no_of_specialities
g(j)=0;
for k=1:no_of_operating_days
g(j)=g(j)+o(j,k) ;
end
end
d=((no_of_operating_days*no_of_operating_days*no_of_specialities)+2*(no_of_spe
cialities*no_of_operating_days)+(2*(no_of_specialities))+(no_of_types_of_theatres*
no_of_operating_days*no_of_specialities));
for j=1:no_of_specialities
for k=1:no_of_operating_days
A(e+(j-1)*no_of_operating_days+k,d+((j-1)*no_of_operating_days)+k)=-
(g(j)/sum);
end
end
%Constraint bounndary
rs=(no_of_types_of_theatres*no_of_operating_days)+(5*(no_of_specialities*no_of_o
perating_days))+1+no_of_operating_days+no_of_specialities;
left_hand=zeros(rs,1);
right_hand=zeros(rs,1);
right_hand(row+1,1)=0;
left_hand(row+1,1)=0;
66
for j=1:no_of_specialities
for k=1:no_of_operating_days
right_hand(((rows+((j-1)*no_of_operating_days)+k)),1)=c(j,k);
left_hand(((rows+((j-1)*no_of_operating_days)+k)),1)=0;
end
end
67
%Boundary for POC
rows=((no_of_types_of_theatres*no_of_operating_days)+(4*(no_of_specialities*no_
of_operating_days)+1+no_of_operating_days)+no_of_specialities);
for j=1:no_of_specialities,
for k=1:no_of_operating_days
left_hand(((rows+((j-1)*no_of_operating_days)+k)),1)= 0;
right_hand((rows+(((j-1)*no_of_operating_days)+k)),1)= total_hours_in_POC-
o(j,k);
end
end
%Display
display(cplex.Solution.status);
solf=cplex.Solution.x;
fprintf ('\nMinimum Time: %f \n', cplex.Solution.objval);
f=((no_of_operating_days*no_of_operating_days*no_of_specialities)+(no_of_special
ities*no_of_operating_days)+(2*(no_of_specialities))+(no_of_specialities*no_of_ope
rating_days))+1;
68
%Solution matrix
for i = 1:no_of_types_of_theatres,
for j = 1:no_of_specialities,
for k = 1:no_of_operating_days,
B(i,j,k)=solf(f);
f=f+1;
end
end
end
display(B);
catch m
disp (m.message);
end
end
69
APPENDIX 3: Screenshots of MATLAB
70
REFERENCE
[1] Aida Jebali, Atidel B. Hadj, Alouane,Pierre Ladet “Operating Rooms Scheduling”,
[2] Blake, J. T., F. Dexter, and J. Donald, “Operating Room Managers, Use of Integer
354-366.
[4] Brian D Hahn, “Essential MATLAB for Scientists and Engineers”, Elsevier, 2006.
[5] Brian R Hunt, “A Guide to MATLAB - For Beginners and Experienced Users”,
[6] Bo Zhang, PavanKumar Murali, Maged Dessouky, and David Belson. “A Mixed
California,2006.
[7] David J Anto, “A guide to Optimization using CPLEX”, Dave guide series, 2008.
Job Shop Scheduling Problem”, European Journal of operation Research 185 (2008),
pp1011-1025.
71
[9] Dexter, F., A. Macario, and R. D. Traub, “Which Algorithm for Scheduling Add-
[10] Dexter, F., and R. D. Traub, “How to Schedule Elective Surgical Cases into
78(2009), pp 144-54.
[14] Mark Van Houdenhoven & Erwin W. Hans & Jan Klein & Gerhard Wullink &
Geert Kazemier ,“A Norm Utilisation for Scarce Hospital Resources: Evidence from
[15] Marshall, A., C. Vasilakis, and E. El-Darzi, “Length of Stay-Based Patient Flow
72
[17] May, J. H., D. P. Strum, and L. G. Vargas, “Fitting the Lognormal Distribution to
Surgical Procedure Times”, Decision Sciences, Vol. 31, pp. 129–148, 2000.
[20] Tobin A. Driscoll (2009). Learning MATLAB. Society for Industrial and
Applied Mathematics.
[21] Vante Gash, “Approach to Mixed Integer Linear Programming”, MathJoke Press,
2007.
[22] Vincent Augusto, Xiaolan Xie, “Operating Theatre Scheduling With Patient
Recovery In Both Operating Rooms And Recovery Beds.”, Computers & Industrial
73