대기(Queue)

Download Report

Transcript 대기(Queue)

Introduction to Operations
Management
Waiting Lines and Simulation
(Ch.18)
Hansoo Kim (金翰秀)
Dept. of Management Information Systems,
YUST
1
OM Overview
Class Overview
(Ch. 0)
X
Operations,
Productivity,
and Strategy
(Ch. 1, 2)
Project
Management
(Ch. 17)
Mgmt of Quality/
Six Sigma Quality
(Ch. 9, 10)
Queueing/
Simulation
(Ch. 18)
Supply Chain
Management
(Ch 11)
Demand Mgmt
Forecasting
(Ch 3)
X
Aggregated
Planning
(Ch. 13)
X X X
Inventory
Management
(Ch. 12)
Strategic
Capacity
Planning
(Ch. 5, 5S)
Location Planning
and Analysis
(Ch. 8)
MRP & ERP
(Ch 14)
Process
Selection/
Facility
Layout; LP
(Ch. 6, 6S)
JIT &
Lean Mfg System
(Ch. 15)
Term
Project
2
Today’s Outline
 Queueing System (줄서기, 대기라인)의 특성




도착하는 방법의 특성
줄을 서서 대기하는 방법의 특성
봉사 하는 방법의 특성
성능을 평가하는 방법
 여러 대기라인의 모델들

Model A: Single-Channel Queuing Model with Poisson
Arrivals and Exponential Service Times

Model B: Multiple-Channel Queuing Model

Model C: Constant Service Time Model

Model D: Limited Population Model
3
질문?
복무 체계(Service system)
도착(Arrivals)
대기(Queue)
복무완료
(Served units)
복무원
(Service
facility)
 평균 줄을 서 있는 사람수는 얼마일까?
 평균 서비스를 받는데 까지 기다리는 시간은?
 복무원의 가동률(Utilization)은?
4
Example D4
 재활용 센타에서 기존의 설비,



트럭 도착율:  = 8 trucks/hr, 포아송 분포 (???)
현재 트럭 운전수들이 물건을 가져와 평균 15분을 기다
린다.
트럭 운전수의 비용은 시간당 $60이다
 새로운 자동화 처리 시스템을 도입 고려


처리속도: 12 truck/hr ( = 5 min/truck)
새로운 시스템 비용: $3/회
 새로운 시스템을 도입하는 것이 좋겠는가 비용적
측면에서 결정해 보시오
5
이런 경험 없으십니까?
‘내가 선 줄은 꼭 느리다!’
기다려 주셔서 감사합니다. 근데 당신
아직도 거기 계시나요?
‘그래서 다른 줄로 바꾸고 나면, 꼭
전에 섰던 줄이 갑자기 빨리 앞으로
가기 시작한다. 거참~’
© 1995 Corel Corp.
6
줄서기(대기라인) 여러 상황들
상황
도착
복무원
복무 내용
은행
Customers
Teller
Deposit etc.
병원
Patient
Doctor
Treatment
교차로
Cars
Light
Controlled
passage
조립라인
Parts
Workers
Assembly
콜 센터
Phone Calls
Tellers
Process Requests
7
대기 이론
Waiting Lines (Queueing Theory)
 First studied by A. K. Erlang (얼랑) in 1913

통신 설비에 대한 분석
 이러한 문제를 다루는 학문을 queuing theory
(대기이론) 이라고 한다

Queue 는 대기하는 줄을 의미한다
 의사결정 문제

Balance cost of providing good service with cost of
customers waiting
(고객의 기다리는 비용과 빨리 처리하는데 드는 비용
의 균형을 찾는 문제)
Waiting
lines are non-value added occurrences
8
Queuing Analysis
Cost
Total
cost
=
Figure 18.1
Customer
waiting cost
+
Total cost
Capacity
cost
Cost of
service
capacity
Cost of
customers
waiting
Service capacity
Optimum
9
Waiting Line Terminology
(대기이론 용어)
 Queue (대기라인): Waiting line
 Arrival (도착): 1 person, machine, part, etc. that
arrives and demands service
 Queue discipline (줄서기 방법): Rules for
determining the order that arrivals receive service
 Channel (대기 줄의 수): Number of waiting lines
 Phase (서비스 단계): Number of steps in service
10
예) 자동차 세차 시스템
11
대기라인의 특성들 (Arrival, 도착)
복무 체계(Service system)
도착(Arrivals)



대기(Queue)
복무완료
(Served units)
복무원
(Service
facility)
도착 방법

Random (임의적), Scheduled (계획적), Constant (고정적)

Limited (제한적), Unlimited (무제한적)



도착 후 서비스를 받을때 까지 기다림
Balk: 대기줄이 긴 경우 대기를 포기하는 경우
Renege: 대기중 포기하고 떠나는 경우
원 모집단 (Input Source or Population) 의 크기
도착의 행태 (Behavior of arrivals)
12
Balking (주저하기)
Input
source
Line was
too long!
Service system
Waiting
line
Service
facility
© 1995 Corel Corp.
13
Reneging (취소하기)
Input
source
Service system
Waiting
line
Service
facility
I give up!
© 1995 Corel Corp.
14
도착 특성치
(Arrival Characteristics)
Input Source
(Population)
Arrival
Pattern
Size
Infinite
Finite
Random
Poisson
NonRandom
Other
Behavior
Patient
Impatient
Balk
Renege
15
대기라인의 특성들
(Queue and Service Facility)
복무 체계(Service system)
도착(Arrivals)

대기 라인의 길이


대기(Queue)
제한적 (Limited), 무제한적
(Unlimited)
서비스 우선 순위 (Queue
Discipline)

FIFO, , 기타
복무완료
(Served units)
복무원
(Service
facility)



대기 줄 (Channel)의 수

단일 대기라인, 복수 대기라인

단일 서비스 단계, 복수 서비스 단계
서비스 단계 (Phase)의 수
서비스 시간

Distribution (분포), Constant (고정적)
16
대기라인 특성치
(Waiting Line Characteristics)
Waiting Line
Queue
Discipline
Length
Unlimited
Limited
FIFO
(FCFS)
Random
Priority
17
대기행렬 분류방법
(Kendall’s Notation)
 A/B/C/D/E
where:
A: 도착시간 간격 분포
B: 서비스 시간 분포
C: 서버의 수
D: 시스템의 크기
E: 고객 모집단 (Population) 수
예)
• D/M/n = 고객은 고정시간
간격으로 들어 오고
서비스는 지수 분포를 하며,
서버는 n명인 시스템
• M/M/n/K/N = 고객의
도착시간 간격은 포아송
분포를 따르고, 서비스는
지수분포를 따르며, 서버의
수는 n 명이고, 시스템 수용
최대 인원은 K명이며, 들어올
가능성이 있는 고객수는
N명이다.
A and B can take any of following distribution types:
M: 지수분포 (서비스 분포시, Exponential Distribution) (Markovian), 포아송
분포(도착분포시, Poisson Distribution)
D: 상수 (Deterministic)
Ek: 얼랑 분포(k = shape parameter)
G: 기타 일반적인 분포
18
Poisson Distribution (포아송 분포)

일정 시간 간격동안 어떤
사건이 일어난 수에 대한
분포
 예) 1시간 동안 교통사
고가 일어나는 수에 대
한 분포,
0번: P0, 1번: P1, 2번:
P2, … N번: PN, …
 평균도착율 = 
(예, 5/hr.)
 x
e

 확률:
P( x) 
x!
.6
.3
.0
X
0
.6
.3
.0
 = 0 .5
P(X)
1
2
3
4
5
 = 6 .0
P(X)
X
0
2
4
6
8
10
19
0.30
0.30
0.25
0.25
0.20
0.20
0.15
0.15
Probability
Probability
도착하는 고객수가
포아송 분포를 하는 경우
0.10
0.05
0.00
0.10
0.05
0 1 2 3 4 5 6 7 8 9 10 11 12
x
=2
0.00
0
1
2
3
4
5
6
x
7
8
9 10 11 12
=4
20
Exponential Distribution (지수분포)
서비스 시간 분포
 예) 서비스 시간이 10
분일 확률
 평균서비스율 ( )
 e.g., customers/hr.
 평균 서비스 시간 = 1/ 

확률:
f ( t  x )  e μ x
.4
Probability t>x

=1
=2
=3
=4
.3
.2
.1
0.
0
2
4
6
8
10
x
21
대기라인 성능 평가치







평균 대기시간: Average queue time, Wq
평균 대기 고객수: Average queue length, Lq
평균 시스템에 있는 시간:
Average time in system, Ws
평균 시스템에 있는 고객수:
Average number in system, Ls
서버의 유휴율:
Probability of idle service facility, P0
서버의 가동률: System utilization,
시스템에 k명 있을 확률:
Probability of k units in system, Pn = k
22
Little’s Law
 = 시간당 도착률 (명/시간)
 = 시간당 서비스률 (명/시간)
 Relationship between L, W, Lq, and Wq
Ls = Ws (Little의 공식)
in addition,
Lq = Wq
and
Ws = Wq + 1/
23
대기 모형의 종류
 Simple (M/M/1)
 예) 슈퍼마켓 계산대
 Multi-Server (M/M/s)
 예): 비행기 체크인 라인
 Constant Service (M/D/1)
 예) 자동 자동체 세차, 커피자판기
 Limited Population
 예) 사무실 컴퓨터 수리
24
M/M/1 모델
 가정
 고객의 원 모집단은 매우 크며, 고객의 도착은
포아송 분포를 따른다
 FIFO (first come first out) 고객은 도착한 순서
대로 서비스 받는다
 고객의 도착은 독립적이다
 고객의 서비스 시간은 고객에 따라 다르며, 서
비스 분포는 지수 분포를 따른다
 서비스 율은 고객의 도착율 보다 크다
25
M/M/1, Model Equations
Ls =
Average number of units
in queue
Average time in
system
Average number of units in
queue
Average time in queue
System utilization

 -
1
=
 -
Ws
Lq =

2
 ( -  )

 ( -  )

=

Wq =
26
M/M/1, Probability Equations
서버가 쉬고 있을 확률: (유휴율)

P = 1-  = 10

시스템 안에 k명 이상 있을 확률
=
P
n>k
()
 k+1

Where n is the number of units in the system
27
Example D1




 = 2 cars arriving per hr (Poisson Arrival)
 = 3 cars served per hr (Exponential Service)
Large Population
M/M/1 Model
1.
2.
3.
4.
5.
6.
7.
Ls = /(- ) = 2/1 = 2 cars in the System
Ws = ?
Lq = ?
Wq = ?
=?
P0 = ?
Pn>3 = ?
28
M/M/s 모델
 가정:
 서버수가 s개 인 것을 제외하고 나머지 가정은
M/M/1과 동일
29
M/M/s Equations
시스템에 고객이
한명도 없을 확률
시스템 내의 평균
고객수
고객이 시스템 내에
평균 머무르는 시간
P0 
1
M 1 1  λ  n  1  λ  M Mμ
       
 n 0 n!  μ   M!  μ  Mμ  λ


    
M



Ls 
P0 
M  1!M   

    
M
1


Ws 
P0 
2

M  1!M   
30
M/M/s Equations
(Little’s law 적용)
평균 대기 고객수
고객의 평균 대기 시간

Lq  L s 

Wq  W s 
1

31
Example D3





 = 2 cars arriving per hr (Poisson Arrival)
 = 3 cars served per hr (Exponential Service)
Large Population
s = 2 (Number of servers)
M/M/s Model
P0 
1
 1 1  2  n  1  2  2(3)
       2
 n 0 n!  3   2!  3  2(3)  2

1
2
 Then Ls, Ws, Lq, Wq?
32
서버가 1명인 경우와 2명인 경우 비교
 = 2 cars / hr
 = 3 cars / hr
P0
Ls
Ws
Lq
Wq
Single Server
Two Server
0.33
2 cars
60 min
1.33 cars
40 min
0.5
0.75 car
22.5 min
0.083 car
2.5 min
33
M/D/1 모델
 가정:
 서비스 시간이 상수인 것을 제외하고 나머지
가정은 M/M/1과 동일
34
M/D/1 Equations
Average number of people
or units waiting for service:

Lq 
   
Average time a person or unit
spends in the queue
Wq 
Average number of people or
units in the system:

Ls  L q 

Average time a unit spends in
the system:

Ws  Wq 


   
35
Example D4
 재활용 센타에서 기존의 설비,



트럭 도착율:  = 8 trucks/hr, 포아송 분포
현재 트럭 운전수들이 물건을 가져와 평균 15분을 기다
린다.
트럭 운전수의 비용은 시간당 $60이다
 새로운 자동화 처리 시스템을 도입 고려


처리속도: 12 truck/hr ( = 5 min/truck)
새로운 시스템 비용: $3/회
 새로운 시스템을 도입하는 것이 좋겠는가 비용적
측면에서 결정해 보시오
36
Birth and Death Process


Let Pn be Probability that state is on state n
Balance Equation (Rate in = Rate out principle)
0:
1P1 = 0P0
1:
0P0 + 2P2 = (1 + 1)P1
2:
1P1 + 3P3 = (2 + 2)P2
….
n-1:
n-2Pn-2 + nPn = (n-1 + n-1)Pn-1
n:
n-1Pn-1 + n+1Pn+1 = (n + n)Pn
….
37
Solving Birth and Death Process
0
P1  P0
1


1

P2  1 P1  ( 1 P1  0 P0 )  1 P1  1 0 P0
2
2
2
 2 1
 

1

P3  2 P2  (  2 P2  1 P1 )  2 P2  2 1 0 P0
3
3
3
3  2 1
...
Pn 
n 1

  ...
1
Pn 1 
(  n 1 Pn 1  n  2 Pn  2 )  n 1 Pn 1  n 1 n  2 0 P0
n
n
n
 n  n 1...1
Let
n 1n2 ...0
, form  1,2,3,...
 n  n1...1
Pn  Cn P0
Cn 
38
Solving Birth and Death Process

P
n 0
n
1
If we have Pi ' s, we can calculate

Ls   nPn

( Cn ) P0  1
n 0
n 0

Lq   (n  s ) Pn
so that
P0 

1
 ( Cn )

C
n 0
n 0
n
n 0
1
by Little' sLaw
Ws 
Ls

, Wq 
Lq


, where    n Pn
n 0
39
Relation with  and Ls (M/M/1)
Ls
120
 


1 

where  

100
80
60
40
20
0
0.
1
0.
15
0.
2
0.
25
0.
3
0.
35
0.
4
0.
45
0.
5
0.
55
0.
6
0.
65
0.
7
0.
75
0.
8
0.
85
0.
9
0.
95
0.
99
Ls 

40
Simulation Model for Q
@ 은행(Bank)
Service
~ mins
1
6
Arrival
1~8 mins
은행 시스템 성능 평가 (Performance Evaluation)
평가항목:
고객의 대기시간 (Waiting Time)
대기 고객수 (Number of Waiting Customers)
은행원 가동율 (Utilization of worker)
Definition of Simulation
(시뮬레이션의 정의)
 Simulation

현실의 프로세스나 시스템의 동작을 시간의 흐름에 따
라 흉내내는 것 (Simulation is the imitation of the
operation of a real-world process or system over time)

시스템의 행동(Behavior)을 인공적으로 만들어 내고, 만
들어진 인공적인 행동을 관찰(Observation)하여 실제
시스템의 특성(Characteristics)을 추론(Inference)
하는 일련의 활동

성능평가 도구 (Performance Evaluation Tool)
Why Simulation?
(왜 시뮬레이션을 해야 하는가?)
 What-if analysis
(만약에 시스템을 이렇게 바꾼다면?)

실제 시스템을 가지고 이런 실험을 한다면?
 Too complex to analysis with other tools

시스템이 너무 복잡한 경우, 시스템의 행동(Behavior)을
분석할 다른 방법이 없다
 Known as Indispensable problem solving
methodology

실제로 문제 해결의 효과적인 도구로 활용되고 있다
When is Simulation the appropriate tool?
(언제 시뮬레이션이 유용한가?)






시스템 내부의 관측 불가능한 (Unobservable) 경우에도 분
석 가능하다
현실적으로 실현 불가능한 경우 (Un-implementable)
현실적으로 통제 불가능한 (Uncontrollable) 상황을 분석해
야 하는 경우(예: 핵실험)
새로운 시스템을 개발할 때, 시뮬레이션 모델링은 유용한
정보를 제공한다 (Design tool for new system design)
시스템 입력 변수를 다양하게 변경함으로써, 시스템에 대
한 정보를 알수 있다 (Sensitivity Analysis)
(수학적)분석적인 방법을 검증하는 도구로 사용할수 있다
(Verification Tool)
Announcement
 HW:
 Review Example 1, 2, 3, 4,
 Review Solved Problem 1, 2
 Solve 1, 2,
45
Good Bye!
46