Python으로 배우는 이산 사건 시뮬레이션
Diogo Costa (PhD, MSc)
Adjunct Professor, University of Saskatchewan, Canada & CEO of ImpactBLUE-Scientific
참고: "이벤트"와 "프로세스"라는 용어는 혼용됩니다.
이벤트(또는 프로세스) 비결정성이란 무엇일까요?
결정적 프로세스가 중요한 이유는 무엇일까요?
자연 현상
인간 활동 또는 인간이 시작하는 프로세스
비결정적 프로세스
통계
random 패키지가 유용함
예시: random.randint(start, end)
import random
# Non-deterministic processes
process_1 = [5, 15]
while time < simulation_time:
# Update simulation time: process_1
time += random.randint(
process_1[0],
process_1[1]))
비결정적 프로세스를 반영하는 특별한 방법은 없음
이벤트 지속 시간의 변동성은 SimPy를 사용하지 않는 모델과 동일한 방식으로 계산됨
올바른 통계를 .timeout()에 전달
DNT_CURLY_TAG_3
import random
# Non-deterministic processes
process_1 = [5, 15]
while True:
# Update simulation time: process_1
yield env.timeout(random.randint(
process_1[0],
process_1[1]))
Python으로 배우는 이산 사건 시뮬레이션