Chapter 1 Introduction

1.1 What is Operations Research

Operations Research is the application of mathematics and scientific approaches to decision making. It is a field deeply connected with applications.

The field of Operations Research has strong roots in World War II as nations and militaries urgently tried to best make use of their resources and capabilities. Leaders asked people from various disciplines to help improve a variety of problems such as submarine hunting, mining of resources, and production planning. Essentially, these tools are scientific approaches for making decisions for the design and operation of a system with limited resources. The tools that that they used came from combining applied math and scientific approaches resulting in tremendous improvements.

After the war, many of the same approaches were also then used for business applications. Military groups most commonly used the term Operations Research while business groups often used the term Management Science.

Neither term, Operations Research nor Management Science is perfect. Operations Research is often confused with the strongly overlapping area of Operations Management and also the word research implies to some that it is strictly theoretical. Conversely, Management Science might imply that the rest of management is non-scientific or that it is just limited to business applications. In this book, we will use the term Operations Research to mean both Operations Research and Management Science as well as often abbreviate it as OR.

1.2 Purpose of this Book

There are many comprehensive introductions to Operations Research available (Hillier and Lieberman 2020) (Winston 2003), and others. In the past, I had emphasized a spreadsheet-centric based introduction to operations research such as (Ragsdale 2017) and (Baker 2015) which had the side benefit of also encouraging better spreadsheet usage practices. Unfortunately the spreadsheet metaphor constrains the reader’s perspective often leading people to tie models to closely to the data analyzed, specific dimensions of a particular problem, and the rows/columns construct often prevents people from thinking of richer problems. A more rigorous and tool agnostic coverage of optimization can be beneficial, for example, Tovey’s recent book stands out (Tovey 2021). The goal of this book is to provide a timely introduction to Operations Research using a powerful open source tool, R. It was written to support the ETM 540/640 Operations Research course at Portland State University which is taught on a quarter basis for people without a background in Operations Research or R. As such the current scope is limited to what can be readily accomplished in a 10 week quarter, giving an introduction to the tools and methods available. There are many other Operations Research tools available besides R.

This book is meant to be a hybrid, both serving as an introduction to R and to Operations Research in the context of optimization.

You can always access the current version of this book on Github. https://github.com/prof-anderson/OR_Using_R

1.3 Range of Operations Research Techniques

Operations Research covers many different techniques. They can be classified in a wide range of ways. Some of the more common approaches are:

  • Optimization
  • Simulation
  • Queuing Theory
  • Markov Chains
  • Inventory Control
  • Forecasting
  • Game Theory
  • Decision Theory

Each of these topics can require a full book on its own. The focus of this book is on the most widely used operations research technique, optimization and more specifically, linear and mixed integer optimization.

In particular, Optimization and Simulation can be further subdivided into separate sub areas that represent entire specialties of their own. In this book, we currently limit ourselves to the field of Optimization but Chapter 7 incorporates elements of simulation. The interested reader is welcome to explore each area further.

Analysis methods are typically characterized as either descriptive or prescriptive {Prescriptive models}. A descriptive technique would be one that describes the current state of the system. A prescriptive technique is one that would prescribe a certain course of action to achieve a desired outcome. For example, weather forecasting is a very sophisticated descriptive discipline since we don’t generally have control over short term weather. On the other hand, if we were to look at intervention approaches such as cloud seeding we might try to come up a prescriptive application. Prescriptive applications are abundant and can often be wherever decisions need to be made.

1.4 Relationship between Operations Research and Analytics

The field of Operations Research significantly predates that of the term analytics but they are closely linked. This is strongly demonstrated by the leading professional organization for operations research, INFORMS (The Institute for Operations Research and Management Science), developing a professional certification for analytics. This certification process had leadership from industry representing the diverse users of Operations Research techniques.

1.5 Importance of Optimization

Optimization has fundamentally changed the world in diverse applications.

To highlight this, let’s look at how a broad range of industries affected by Covid-19 have been using optimization.

Supply Chain Management: Amazon executives have given keynote speeches at INFORMS international conferences discussing how optimization is used in designing their network of warehouses and delivery services. The rapid growth of online shopping and acceleration of ever faster delivery options in the last decade relies on optimization, even moreso as supply chains have been disrupted by Covid-19 and product demand for certain items has skyrocketed.

Scheduling of sports events: Major League Baseball retained optimization experts for scheduling all regular season games. Dr. Michael Trick from Carnegie Mellon University recounted this his work in an INFORMS Omega Rho 2017 Distinguished Lecture. The need for optimizaton in this domain has only increased with additional complexity of the constant drumbeat of sporting event cancellations and rescheduling due to Covid-19. Analytics revolutionized sports in many ways as documented by the Michael Lewis book, Moneyball, the impact on of optimizaton on scheduling may be just as significant.

Medical Staff Scheduling Management of human resources in the health care area can be a matter of life and death. Having fully staffed emergency departments is a critical issue that is now getting featured regularly on the news due to Covid-19 but the need for optimization was recognized long before the pandemic. Scheduling is so complicated of nursing with that it has created a vertical market industry of companies that tools with built-in optimization engines to provide 24x7 coverage across departments and critical skills.

Transportation Airlines often have their own optimization teams in house to continually reexamine their network of flights, planes used, and crews. In addition to the steady state, using optimization models to rapidly adjust to disruptions whether it is caused by weather, Covid-19, security, or maintenance issues.

In this book we provide tools for engaging with these kinds of applications.

Optimization provides a framework for analyzing a broad range of

1.6 Why R?

This book adopts the platform of R for doing optimization. R is a popular, open source programming language developed by statisticians, originally as an open source alternative to the statistics language S. As such, it has very strong numerical methods implementations. Given the open source nature, it has been popular for researchers and many of these researchers have written their own packages to extend the functionality of R. These packages cover a tremendously broad range of topics and well over 18,000 are available from CRAN (the Comprehensive R Archive Network) as of December, 2021.

In about 2012, my Extreme Technology Analytics Research Group was facing a decision. We had been using proprietary analytics tools for years but had problems with software licensing and the limited range of specialized languages. We wanted a single platform that could do both statistics and optimization, was freely available with no ongoing license renewal, and was readily extensible.

In the end, we debated between Python and R. While R grew out from statisticians to encompass broader areas, Python grew from a general purpose programming language to add features to address a broad range of different application areas including statistics. While they both have deep roots with over 20 years of active development, this also means that aspects of their original designs are somewhat dated and carry forward the burden of legacies of past decisions when computers were more limited and the meaning of a big dataset would have been much smaller.

Python had some advantages from the optimization side while R had advantages from the statistical side. In the end, we chose R because Python’s numerical methods capabilities were not quite as rich. Since that time, both R and Python have significantly matured.

As time has gone by, R has developed robust toolsets such as RStudio making it more powerful and easier to use. R’s extensive package community has become so diverse and powerful that proprietary statistics software such as SPSS and JMP now promote that they can use R packages. The result is that R is still a great choice for analysts and code developed for R should be usable for a long time.

As should be expected, new tools continue to arise. In particular, Julia is a new, modern language developed around numerical analysis. Industry adoption of Julia is far behind R and Python given their head start of multiple decades. Even if Julia or some other environment does someday become more popular, skills developed using R will be readily transferable and provide an excellent foundation for learning new languages.

A PhD student that I knew was preparing for his final defense and did a practice presentation with his advisor and a professor. He was proud of a well polished 250 page thesis with dozens of tables of numerical results. The analysis included dozens of regressions, all with similar form and dependent variables. The professor asked him why his dependent variable was the number of projects rather than projects per year. The student thought for a moment and realized that all of his analysis needed to be redone. This would take days or weeks if he had used a GUI based tool. Using R and a scripting approach, he did a search and replace for the dependent variable, cross-checked results, and met the next day to update that professor and his advisor of the new (and much better!) results. He successfully defended his thesis a couple weeks later.

1.7 Conventions Used in this Book

I’ve adopted the following conventions in this book.

  • R code fragments, including packages will be denoted using monospaced text such as adding two R data objects a+b.
  • Mathematical symbols and equations will be italicized. For example, if two variables are mathematical symbols and being added, then it would be a+b.
  • Tables of information and code fragments are provided liberally and at times erring on the side of being repetitious to assist in interpretation and reproducing analyses.
  • There may be more efficient ways of performing operations but the focus is on readability.
  • When formatting piping operators such as |>, an intent is made to line them up for readability.

References

Baker, Kenneth R. 2015. Optimization Modeling with Spreadsheets. 3rd Edition. Hoboken: Wiley.
Hillier, Frederick, and Gerald Lieberman. 2020. Introduction to Operations Research. 11th edition. Dubuque: McGraw-Hill Education.
Ragsdale, Cliff. 2017. Spreadsheet Modeling & Decision Analysis: A Practical Introduction to Business Analytics. 8 edition. Boston, MA: Cengage Learning.
Tovey, Craig A. 2021. Linear Optimization and Duality: A Modern Exposition.
Winston, Wayne L. 2003. Operations Research: Applications and Algorithms. 4th edition. Belmont, Calif: Cengage Learning.