과정의 장
교육 · 트랙 3. 동작과 아키텍처 · 3.5장 (전체 6장)
3.5 시뮬레이션 2:39
단계에 소요 시간을 지정하고, 한 번 실행한 다음 백 번 실행하여, 결과를 한계값과 비교합니다.
Holarch 1.27 화면입니다.
학습 내용
- 액션의 기간을 고정값이나 분포로 설정하기
- 이산 이벤트 시뮬레이션을 한 번 실행하고 타임라인 읽기
- Monte Carlo 연구를 실행하고 평균, 퍼짐, 95번째 백분위수 읽기
- 총시간을 필요 확률에서 요구사항의 한계와 비교해 검사하기
Rent a Bike의 단계에 정규 분포를 포함한 기간을 지정하고, 타임라인에서 이산 이벤트 시뮬레이션을 한 번 실행하고, Monte Carlo를 실행하여 대여 시간의 퍼짐을 읽은 다음, 대여가 시간 한계 안에 끝날 가능성을 검사합니다.
실습
CubeSat EO-1 데모 프로젝트에서 Holarch로 직접 해 보십시오.
- EO-1 데모 프로젝트를 열거나 만드십시오. 프로젝트 관리 → 프로젝트 파일 ▾ → 새 데모 프로젝트 → CubeSat (Guided systems engineering).
- 데이터베이스에서 OPS.11 Receive Downlink(9분)를 선택하고, 가끔 길어지는 패스를 반영하도록 Duration을
=triang.dist(8, 15, 9)분으로 설정합니다. - 동작 → 시뮬레이터를 열고 루트 Action으로 OPS Run Nominal Imaging Pass를 선택한 다음, 이산 이벤트를 유지하고 ⏩ 끝까지 실행을 누릅니다. 총시간과 타임라인을 읽습니다.
- Monte Carlo로 전환하고 ▶ Monte Carlo 실행을 누릅니다. 분포 탭에서 총시간의 평균과 퍼짐을 읽습니다.
- Requirement 대비 검사…를 클릭하고, 총시간을 유지한 채 ≤ 이하
100분, 요구사항 6.5 Planning Cycle Time, 필요 확률(%)95를 설정합니다. P5 / P50 / P95, P(충족), 결과를 읽습니다. - 검사가 포함된 단계별 실습은 튜토리얼 8 Simulate the Functional Flow(도움말 → 튜토리얼)를 실행하십시오.
검사에 6.5 Planning Cycle Time에 대한 95% 기준의 P(충족)과 합격 또는 불합격 결과가 표시되면 완료입니다.
스스로 확인
- 단계에 고정 기간 대신 분포를 지정하는 이유는 무엇입니까?
- 한 번의 이산 이벤트 실행은 Monte Carlo가 알려 주지 않는 무엇을 알려 줍니까?
- 평균이 아니라 95번째 백분위수를 기준으로 검사하는 이유는 무엇입니까?
- 결과 기록은 모델에서 무엇을 바꿉니까?
답 보기
단계에 고정 기간 대신 분포를 지정하는 이유는 무엇입니까?
실제 기간은 달라집니다. 분포는 실행할 때마다 샘플링되므로, Monte Carlo는 숫자 하나가 아니라 총시간의 퍼짐을 보여 줍니다.
한 번의 이산 이벤트 실행은 Monte Carlo가 알려 주지 않는 무엇을 알려 줍니까?
타임라인에서 한 번의 실행을 재생하므로 단계의 순서, 병렬 분기, 결정이 택한 분기를 볼 수 있습니다. Monte Carlo는 통계를 위해 실행을 여러 번 반복합니다.
평균이 아니라 95번째 백분위수를 기준으로 검사하는 이유는 무엇입니까?
실행의 절반은 평균보다 오래 걸립니다. 100번 중 95번 지켜야 하는 한계는 그 95번이 넘지 않는 시간으로 판단하며, 이를 P(충족)과 P95가 보고합니다.
결과 기록은 모델에서 무엇을 바꿉니까?
Measure의 Projected Value(또는 Value)를 평균으로 설정하고, 요구사항을 검증하는 Test Case를 Passed 또는 Failed로 설정합니다. 먼저 변경 사항을 검토하며, 변경은 한 번의 실행 취소 단계로 적용됩니다.
더 읽어 보기
대본
대본 보기 (내레이션과 화면 내용)
Introduction
Welcome back. The action diagram of Rent a Bike says what happens. With durations, Holarch can tell you how long it takes.
In this chapter you put numbers on the steps and simulate them.
Durations
Open Rent a Bike as an action diagram again. Select Identify Rider and set its duration. Riders take different times to find their card, so use a distribution: equals norm dot dist, four, one: a normal distribution with a mean of four seconds and a standard deviation of one.
On screen: Database → F.1 → Open in ▾ → Action Diagram; Identify Rider → Duration.
Check Account depends on the network: a normal distribution around two seconds. Unlocking the bay and showing its number take one second each.
On screen: Check Account, Unlock Bay, Show Bay Number.
Starting the rental takes half a second, and relocking the bay, on the rare branch, one and a half.
On screen: Start Rental, Relock Bay.
One run
Open Behavior, then Simulator, and choose Rent a Bike as the root action. Discrete event mode plays one run on a timeline.
On screen: Behavior → Simulator → root F.1 → Discrete Event → Run to End.
Each step appears when it runs, the two parallel branches side by side, and the decision takes one of its branches with the probability you gave it.
On screen: The timeline.
A hundred runs
One run is one sample. Switch to Monte Carlo and run it: a hundred runs, each drawing every duration from its distribution and every decision from its probabilities.
On screen: Monte Carlo → Run.
The statistics give the mean rental time and its spread, and the 95th percentile: the time that ninety-five rentals in a hundred stay under. A commitment to riders needs that number, not the average.
On screen: Statistics and the time chart.
Check against a limit
Is that fast enough? Choose Check Against Requirement. Compare the total time with a limit: at most ten seconds for the whole rental at the kiosk, met in at least ninety-five runs in a hundred.
On screen: Check Against Requirement → ≤ 10 Seconds, 95 %.
The dialog reports the probability of meeting the limit from the hundred runs, and whether it clears the ninety-five percent you asked for. Record Result can save the check on the model.
On screen: The result.
Recap
Let's recap. You gave the steps durations, played one run on a timeline, ran Monte Carlo, read the spread of rental times, and checked the chance of meeting a limit.
Next, the dock's mass: a budget, and a technical performance measure to track it.