Intro 1: Course Overview, Modeling, and Installing Julia

1. Course Overview

Operations Research (OR) is a discipline that involves the development and application of advanced analytical methods to aid complex decisions. This course will provide students with the skills to be able to apply a variety of analytical methods to a diverse set of applications. Focus will be on how to translate real-world problems into appropriate models and then how to apply computational procedures and data so that the models can be used as aids in making decisions. Applications will include improving the operation of a variety of different production and service systems, including healthcare delivery and transportation systems, and also how OR can be used to make better decisions in areas like sports, marketing, and project management. Prerequisites include undergraduate courses in single variable differential and integral calculus and an introductory course in probability.

Software: Will be using Julia and packages like JuMP and the Gurobi solver, all running in a Jupyter notebook envirnoment. Julia and JuMP are open source and Gurobi, although commercial, can be downloaded for free by students.

Prerequisites include undergraduate courses in single variable differential and integral calculus and an introductory course in probability. Don't need any background in programming since the course will only use Julia for scripting solutions using existing packages.

Textbook: No required textbook. All materials provided. Recommended references (not required, just provides some extra background):

Topics

  1. Introduction
  2. Nonlinear Optimization
  3. Linear Programming
  4. Network Models
    Exam 1 (take home)
  5. Mixed-Integer Programming
  6. Combinatorial Optimization
  7. Machine Learning
    Exam 2 (take home)
  8. Review for Final Exam
    Final Exam (2.5 hour proctored)

Grading

Exams 1 and 2 each represent 20% and the Final Exam 25% of your grade in this class. There will be a homework assignment for each topic that, in total, represents 30% of your grade. The remaining 5% of your grade will be based on your class participation.

2. Modeling

Analysis Triangle

image.png

Levels of Modeling

  1. Guesstimation (order of magnitude)
  2. Mean value analysis (linear, ±20%)
  3. Nonlinear models (incl. variance, ±5%)
  4. Simulation models (complex interactions)
  5. Prototypes/pilot studies
  6. Build/do and then tweak it (evolutionary approach)

Guesstimation

Geometric Mean

How many people can be crammed into a car? Certainly more than one and less than 100. The arithmetic mean or average (50) seems to be too high, but the geometric mean (10) is reasonable:

$ \quad\textrm{Geometric Mean: } X = \sqrt{L\!B\times{U\!B}} = \sqrt{1\times{100}} = 10 $

Often it is difficult to directly estimate input parameter $X$, but is easy to estimate reasonable lower and upper bounds ($L\!B$ and $U\!B$) for the parameter:

Fermi Problems

Fermi Problems, named after the physicist Enrico Fermi, are inspired guesses about quantities that seem almost impossible to determine given the limited data that you have available. Solving a Fermi Problem involves guesstimation of the input parameters needed and back-of-the-envelope type approximations.

Ex 1: How many McDonald’s restaurants in U.S.?

“Reasonable” guesstimates can be made for all of the parameters needed to make the estimation except for customer demand; as a result, the geometric mean of the estimated lower and upper bounds on demand is used as the estimate. The actual number of McDonald’s restaurants in the U.S. as of 2013 is 14,267, which is around 10% below the estimate. A key assumption in the analysis is that the number of McDonald’s restaurants in the U.S. has reached market saturation, allowing the entire U.S. population to be used as the customer base.

System Performance Estimation

Often easy to estimate performance of a new system if can assume either perfect (LB) or no control (practical UB), as opposed trying to develop a more detailed model of performance.

Ex 2: Estimate the waiting time for a bus If, during the morning rush, there are five buses operating on Wolfline Route 13 and it takes them 40 minutes, on average, to complete one circuit of the route, what is the estimated waiting time for a student who does not use TransLoc for real-time bus tracking?

Ex 3: Amount spent per grocery trip
Estimate the average amount spent per trip to a grocery store. Total U.S. supermarket sales were recently determined to be \$649,087,000,000, but it is not clear whether this number refers to annual sales, or monthly, or weekly sales.

image.png

Why is the estimate so much less than the reported value?

Ex 4: House construction time
The table below shows the activities associated with the construction of a house. Listed for each activity are the activities that must immediately precede the start of the activity and the time required to complete the activity (in working days). Estimate how many days will be required to construct the house.

image.png

image.png

image.png

image.png

3. Installing Julia

The latest release of Julia (1.6.2) can be downloaded at https://julialang.org/downloads/ Julia is available for Windows, macOS, and Linux. Windows will be used for the demonstrations in class, but Mac and Linux should work with no complications for all of the assignments in class (see https://julialang.org/downloads/platform/ for detailed download instructions for each platform). Using the 64-bit (installer) for Windows, download and run the executable file julia-1.6.2-win64.exe and accept all of the defaults (note: if an earlier version of Julia in on your computer, first uninstall the earlier version).

After starting Julia using the desktop icon, the Julia window will open. Type ] at the command prompt to switch to package manager mode and then add IJulia (note: it can take quite a while to add and to load a package) and then build IJulia. When finished, use the Backspace key to return to the Julia command prompt. Type using IJulia, then jupyterlab(), and then y to install Jupyter via Conda (note: if you have Anaconda installed on your computer, Jupyter should already be installed and this step is not necessary). JupyterLab will launch in your default browser.

Using the File Browser on the left of the JupyterLab window, select/create a new folder where you can save the notebooks that will be used for this class (e.g., select Documents and then create and then select a new folder OR501). In the Lancher tab of the browser window, select the Julia 1.6.2 icon under Notebook and a new notebook named Untitled.ipynb will be created. At the prompt in the first cell, type "Hello world" and then Cntl+Enter to print it below in a new output cell. After saving your notebook, the easiest way to close and exit JupyterLab and Julia is to close each of their windows.

To open the notebook at a later time, start Julia and at the command prompt and type using IJulia, then jupyterlab(), and the notebook will open in your browser. To create a new notebook, under the File menu in JupyterLab, select New and then Notebook and then in the Select Kernel pop-up window select Julia 1.6.2.