You are on page 1of 38

Lecture 4: Optimization Under

Uncertainty (Part 1)
MH4702: Probabilistic Methods in
Operations Research

Lecturer: Yan Zhenzhen


Office: SPMS-MAS-05-19
Email: yanzz@ntu.edu.sg
Tel: 6513 7466

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


What is Operations Research? (cont.)

Optimise the system - Optimisation

Computer mimics real system - Simulation

Analysis of a stochastic system - Queue

Human - MDP (decision making when outcomes are partly random and partly under the control of a decision maker)

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


2
Learning Objectives

By the end of this course, you should be able to:

 Have a basic understand what is optimization, how it is


different from simulation model.

 Understand what is a linear optimization model

 Understand how to build a linear optimization model to


model the practical problem.

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


3
Introduction to Optimization

MH4702: Probabilistic Methods


in Operations Research

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


What is Optimization

 Optimization refers to the selection of a best element from some


set of available alternatives.

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


5 5
Appointment System

• Patients make an appointment to see


a doctor
• The clinic opens 8 hours per day
• Assume the doctor’s service time is exponential
distributed with rate customers per hour
• To schedule 24 patients per day

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


6 6
Appointment System

• Constant schedule: schedule patients with a constant


inter-arrival time 20 min
• Simulation model evaluates its performance
(defined as expected total cost including patients’ waiting cost,
doctor’s over time cost)
• Suppose the unit waiting cost ,
• the doctor’s overtime cost

Can this schedule minimize the expected total cost?


What is the schedule to minimize the expected total cost?
© 2020 Nanyang Technological University, Singapore. All Rights Reserved.
7 7
Differences Between Optimization and Simulation

Simulation models
• Require the decision variables as inputs
• Give only a satisfactory answer (by comparing different
alternatives)

Optimization models
• Yield decision variables as outputs
• Promise the best (optimal) solution to the model

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


8 8
Outline

Review of Linear Optimization

Data Uncertainty and Sensitivity Analysis

Modelling Power of Mixed Integer Linear


Optimization

Optimization under Uncertainty

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


9 9
Review of Linear Optimization

MH4702: Probabilistic Methods


in Operations Research

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


Linear Optimization Model
are given inputs Objective

Constraints
• are (continuous) decision variable to be optimized
• If a particular satisfies all the constraints, it is a feasible solution
• If a particular is feasible and achieves the
most favorable value of objective function, ©it2020isNanyang
an optimal solution
Technological University, Singapore. All Rights Reserved.
11 11
Example: The Lego Game

• You have two types of Lego bricks

Big (2x4) Small (2x2)

x 40 pieces x 120 pieces

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


12 12
Example: The Lego Game

• You can make two products with the bricks

Chair Table

1 Big + 4 Small 2 Big + 3 Small

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


13 13
Example: The Lego Game

• If Chair sells at $40 and Table sells at $50 each, how many Chairs and Tables
to make in order to maximize the total profit?

Chair Table

Available

Big 1 2 40

Small 4 3 120

Price $40 $50


Quantity ? ?

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


14 14
Example: The Lego Game

• Decisions: Number of Chairs and Tables to produce (, )


• Objective: Maximize total profit
• Constraints:
• Total available units of Big and Small bricks
• Non-negativity

Max
s.t.

How to solve the linear programming model?


© 2020 Nanyang Technological University, Singapore. All Rights Reserved.
15 15
Optimization Software

• Why do we need optimization software?

• Large-scale real-world optimization problem


• Concise and readable syntax to the mathematical notation
• Easy model development, debug and maintenance
• Clear output presentation
• Exchange data with external sources Data

Solution

Model Algorithm

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


16 16
Optimization Software

• Algebraic Modeling Language for Optimization


• A high-level computer programming languages for modeling optimization
problems e.g. AIMMS, EXCEL Solver, AMPL, ROME
• Programming languages
• Python, C, C++, Julia
• Solver
• Well-established algorithms to solve the program
• Cplex, Gurobi, Mosek,SDPT3, etc.

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


17 17
Excel Model for Lego Game

𝑎 𝑖𝑗

𝑏𝑖

Decision
variable 𝑐𝑗
Objective
Value

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


18 18
Example: Transportation Problem

A company has three PC assembly plants at locations, 1, 2 and 3,


with monthly production capacity of 1700 units, 2000 units, and
1700 units, respectively. Their PC’s are sold through four retail
outlets in locations A, B, C,D, with monthly orders of 1700 units,
1000 units, 1500 units, and 1200 units respectively.

Shipping A B C D
costs ($/unit)
1 5 3 2 6

2 7 7 8 10

3 6 5 3 8

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


19 19
Example: Transportation Problem
 
A
1
B

2
C

3
D

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


20 20
Example: Transportation Problem
 

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


21 21
Example: Transportation Problem
 
A

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


22 22
Example: Transportation Problem
 

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


23 23
Example: Transportation Problem

General representation

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


24 24
Example: Transportation Problem

Formulation

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


25 25
Example: Revenue Management

 The Airline industry in US


 Prior to Deregulation in 1978.
 Carriers only allowed to certain routes. Hence airlines
such as Northwest, Eastern Southwest etc.
 Fares determined by Civil Aeronautics Board (CAB)
based on mileage and other costs - (CAB no longer exists)

 Post Deregulation
 anyone can fly anywhere
 fares determined by carrier and the market

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


26 26
Example: Revenue Management

 Economics
 Huge sunk and fixed costs
 Very low variable costs per passenger
 $10 per passenger or less
 Highly perishable inventory
 Result: Multiple fares

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


27 27
Multiple fare classes: a monopolist’s perspective

• The two-fare model presumes that customers are willing to


pay the higher price, even if the lower price is available.
• In the two-fare model, how did airlines manage the fare
allocation?
© 2020 Nanyang Technological University, Singapore. All Rights Reserved.
28 28
Example: Revenue Management

 Origin, Destination and Hub

1 Destination
1
Origin

2
2 0

Hub
:
:
:
:

n
n

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


29 29
Example: Revenue Management

 2 class (for simplicity) Q and Y

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


30 30
Example: Revenue Management

 The right question asked…

 How many class Q and Y customers should


we accept in order to maximize revenue?

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


31 31
Example: Revenue Management

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


32 32
Back to Appointment System Example

• Patients make an appointment to see a doctor


• The clinic opens 8 hours per day
• Assume the doctor’s service time is a constant with customers
per hour
• To schedule 24 patients per day
• Suppose the unit waiting cost , the doctor’s overtime cost
• What is the schedule to minimize the expected total cost?

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


33 33
Back to Appointment System Example

• Decision variables:
• Calculate patient ’s waiting time
• Denote patient ’s service time as ,
• Under schedule
for
0
-1
𝑥𝑖 − 1
0

𝑤𝑖 − 1 𝜉 𝑖

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


34 34
Back to Appointment System Example

• Calculate doctor’s overtime


• Introduce a virtual customer who arrives at the end of time horizon,
denoted as customer
• The virtual customer’s waiting time is doctor’s overtime

for

𝑥𝑛 Doctor’s over time


0 T

𝑤𝑛 𝜉 𝑛

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


35 35
Back to Appointment System Example

• Given a schedule the total cost can be calculated by a linear program

where

where 𝑛
𝑚𝑖𝑛𝑥 ∈ 𝜒 f ( 𝑥 )=𝑚𝑖𝑛 𝑥∈ 𝜒 , 𝑤𝜖 𝑊 ∑ 𝑐 𝑤 𝑤𝑖 +𝑐𝑂 𝑤𝑛+1
𝑖=1

{ | }
𝑛
𝜒= 𝒙 ∑ 𝑥 𝑖= 𝑇 , 𝑥𝑖 ≥ 0
𝑖 =1

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


36 36
Summary

MH4702: Probabilistic Methods


in Operations Research

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


Summary

1. Have a basic understand what is optimization, how it is different


from simulation model.

2. Understand how to build a linear optimization model to model the


practical problem.

© 2020 Nanyang Technological University, Singapore. All Rights Reserved.


38

You might also like