Holarch
コースのチャプター

トレーニング · トラック 3. 振る舞いとアーキテクチャ · チャプター 3.5(全 6 チャプター)

3.5 シミュレーション 2:39

ステップに所要時間を与え、1 回、続いて 100 回実行し、結果を制限と照合します。

Holarch 1.27 の画面です。

学習内容

  • Action の所要時間を固定値または分布として設定する
  • 離散イベントシミュレーションを 1 回実行し、タイムラインを読む
  • モンテカルロスタディを実行し、平均、ばらつき、95 パーセンタイルを読む
  • 合計時間を、必要な確率で要求の制限と照合する

Rent a Bike のステップに正規分布を含む所要時間を与え、タイムライン上で離散イベントシミュレーションを 1 回実行し、モンテカルロを実行してレンタル時間のばらつきを読み、レンタルが制限時間内に終わる可能性を確認します。

プロジェクトファイル

  • 開始時のプロジェクト (.holarch.json。プロジェクトを管理 → プロジェクトファイル ▾ → プロジェクトをインポート (.json)…)
  • 完成したプロジェクト (.holarch.json。プロジェクトを管理 → プロジェクトファイル ▾ → プロジェクトをインポート (.json)…)

動画は holarch.app から再生されます。プライバシーポリシーをご覧ください。

演習

CubeSat EO-1 デモプロジェクトを使って、Holarch で実際に操作します。

  1. EO-1 デモプロジェクトを開くか、作成します:プロジェクトを管理 → プロジェクトファイル ▾ → 新しいデモプロジェクト → CubeSat(ガイド付きシステムズエンジニアリング)。
  2. データベースで OPS.11 Receive Downlink(9 分)を選択し、パスが長引く場合に備えて、その所要時間を =triang.dist(8, 15, 9) 分に設定します。
  3. 振る舞い → シミュレーターを開き、ルート Action として OPS Run Nominal Imaging Pass を選び、離散イベントのまま ⏩ 最後まで実行を押します。合計時間とタイムラインを確認します。
  4. モンテカルロに切り替え、▶ モンテカルロを実行を押します。Distribution タブで、合計時間の平均とばらつきを確認します。
  5. 要求に照らしてチェック…をクリックし、合計時間のまま、≤ 以下 100 分、要求 6.5 Planning Cycle Time、必要な確率(%) 95 を設定します。P5 / P50 / P95、P(meet)、結果を確認します。
  6. チェック付きのウォークスルーを行うには、チュートリアル 8「機能フローをシミュレーションする」を実行します(ヘルプ → チュートリアル)。

チェックに P(meet) と、95% での 6.5 Planning Cycle Time の合格または不合格の結果が表示されれば完了です。

確認問題

  1. ステップに固定の所要時間ではなく分布を与えるのはなぜですか?
  2. 1 回の離散イベント実行から分かり、モンテカルロからは分からないことは何ですか?
  3. 平均ではなく 95 パーセンタイルでチェックするのはなぜですか?
  4. 「結果を記録」はモデルの何を変更しますか?
解答を表示
  1. ステップに固定の所要時間ではなく分布を与えるのはなぜですか?

    実際の所要時間はばらつきます。分布は実行のたびにサンプリングされるため、モンテカルロは合計時間を 1 つの数値ではなくばらつきとして示します。

  2. 1 回の離散イベント実行から分かり、モンテカルロからは分からないことは何ですか?

    1 回の実行をタイムライン上で再生するため、ステップの順序、並列分岐、判断がどの分岐を選んだかが分かります。モンテカルロは統計のために実行を何度も繰り返します。

  3. 平均ではなく 95 パーセンタイルでチェックするのはなぜですか?

    実行の半数は平均より時間がかかります。100 回中 95 回で満たすべき制限は、その 95 回が収まる時間で判断され、それを P(meet) と P95 が示します。

  4. 「結果を記録」はモデルの何を変更しますか?

    Measure の Projected Value(または Value)を平均に設定し、要求を検証する Test Case を合格または不合格に設定します。変更は先に確認でき、1 回の元に戻す操作の単位として適用されます。

関連資料

トランスクリプト

トランスクリプトを表示 (ナレーションと画面の内容)

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.