수학적 모델: 핵심 프로세스 반영하기
아래와 같이, 휴대폰을 생산하는 회사의 공급망 운영에 포함된 단계 정보를 담은 사전 processes를 만들었어요.
processes = {
"Sourcing raw material": 5,
"Transport of raw material": 1,
"Manufacturing parts": 3,
"Assembling parts": 2,
"Selling products": 3,
}
모델은 discrete_model_build_phone()라는 함수에 저장되어 있으며, 사전에 정의된 프로세스를 반영해 생산 라인을 시뮬레이션합니다. 모델의 입력 인자는 다음과 같아요(순서대로):
processes: 프로세스 정보를 담은 사전simulation_time: 실행 기간
모델에서 시간 단위는 일(day)입니다.
Maptlotlib.pyplot 패키지는 이미 plt로 불러와 두었어요.
이 연습은 강의의 일부입니다
Python으로 배우는 이산 사건 시뮬레이션
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
# Add the new key-value pair to the processes dictionary
processes["____"] = ____
# Assign the simulation time
simulation_time = ____
# Run the model
time_all = ____(____)