コースのチャプター
トレーニング · トラック 3. 振る舞いとアーキテクチャ · チャプター 3.2(全 6 チャプター)
3.2 Action 図 2:55
機能を、並列分岐、判断、ステップをトリガーする項目を含むステップに分解します。
Holarch 1.27 の画面です。
学習内容
- 機能を Action 図として開き、Action をライン上にドラッグしてステップを追加する
- 並列分岐と、合計 100% になる分岐確率を持つ判断を追加する
- あるステップが生成し、別のステップがトリガーとして受け取る Input/Output を作成する
- ダイアグラム上のステップがモデル内の Action になる仕組みを説明する
Rent a Bike を Action 図として開き、キャンバス上でステップを組み立てます。直列のアクション、並列分岐、分岐確率を持つ判断、そしてあるステップが生成し別のステップが受け取る入出力項目です。
プロジェクトファイル
- 開始時のプロジェクト (.holarch.json。プロジェクトを管理 → プロジェクトファイル ▾ → プロジェクトをインポート (.json)…)
- 完成したプロジェクト (.holarch.json。プロジェクトを管理 → プロジェクトファイル ▾ → プロジェクトをインポート (.json)…)
動画は holarch.app から再生されます。プライバシーポリシーをご覧ください。
演習
CubeSat EO-1 デモプロジェクトを使って、Holarch で実際に操作します。
- EO-1 デモプロジェクトを開くか、作成します:プロジェクトを管理 → プロジェクトファイル ▾ → 新しいデモプロジェクト → CubeSat(ガイド付きシステムズエンジニアリング)。
- データベースで F10 Enter Safe Mode を選択し、開く場所 ▾ → Action 図を選びます。
- 追加パネルから Action をライン上にドラッグし、
Detect Undervoltageという名前を付けます。次に、その後ろのライン上に Parallel をドラッグし、一方の分岐にShed Payload Loads、もう一方にPoint Arrays to Sunを置きます。 - Parallel の後ろのライン上に Or をドラッグし、
Battery recovered?という名前を付けます。インスペクターで分岐確率を 80 と 20 に設定し、最初の分岐にResume Nominal Mode、2 番目の分岐にKeep Chargingを置きます。 - Input/Output を Detect Undervoltage の上にドラッグし、
Undervoltage Flagという名前を付けます。I/O の下のハンドルを Shed Payload Loads の上にドラッグし、Input(トリガー)を選択します。
F10 のダイアグラムに 5 つのステップ、並列分岐、合計 100% の OR、そして Detect Undervoltage から Shed Payload Loads に渡される Undervoltage Flag が表示されれば完了です。
確認問題
- Action をライン上にドロップすると、モデルに何が追加されますか?
- トリガー入力と任意入力の違いは何ですか?
- OR の分岐確率の合計が 100% でなければならないのはなぜですか?
解答を表示
Action をライン上にドロップすると、モデルに何が追加されますか?
新しい Action です。ダイアグラムが属する機能の下に、フロー内のその位置で分解されます。データベースと、それを表示するすべてのビューに表示されます。
トリガー入力と任意入力の違いは何ですか?
トリガー入力を持つステップは、その項目が届くまで開始しません。任意入力は受け取られますが、ステップを待たせることはありません。
OR の分岐確率の合計が 100% でなければならないのはなぜですか?
シミュレーターは確率に従って分岐を選びます。数値の合計が 100% にならない場合は、インスペクターが警告します。確率が不明な場合は「なし」を選択します。シミュレーターは実行中に確認し、モンテカルロでは等しい確率を使います。
関連資料
トランスクリプト
トランスクリプトを表示 (ナレーションと画面の内容)
Introduction
Welcome back. This chapter takes one function, Rent a Bike, and draws what happens inside it, step by step.
You will build an action diagram on the canvas, from the Add panel.
The canvas
Open the Database, select Rent a Bike, and choose Open in, then Action Diagram. The canvas starts with a start, an end, and the line between them. The Add panel on the left holds the building blocks.
On screen: Database → F.1 → Open in ▾ → Action Diagram.
Steps in order
Drag an Action onto the line, and name it Identify Rider. The rider taps a card or a phone at the kiosk.
On screen: Action → line → Identify Rider.
The next step drops onto the line after it: Check Account. The back office confirms the rider can rent. Each new step is joined to the last for you.
On screen: Action → Check Account.
Parallel branches and a decision
Two things happen at once next: the bay unlocks, and the kiosk shows the rider which bay it is. Drag a Parallel onto the line. It opens two branches that start together and join when both finish.
On screen: Parallel → line.
Drop an action onto each branch: Unlock Bay on the first, Show Bay Number on the second.
On screen: An action on each branch.
Then a decision: does the rider take the bike within thirty seconds? Drag an Or onto the line, and put the question in its name.
On screen: Or → line → name.
Each branch of a decision has a probability, for simulation later. Most riders take the bike: ninety-five percent for yes, five for no. The panel checks that they add up to one hundred.
On screen: Branch probabilities 95 / 5.
On the yes branch the rental starts: Start Rental. On the no branch the bay locks again: Relock Bay.
On screen: An action on each branch.
Inputs and outputs
Steps also pass items to each other. Drag an Input/Output onto Check Account: the step now produces it. Name it Unlock Code, the approval the back office sends.
On screen: I/O → Check Account → Unlock Code.
Unlock Bay receives the code, and receiving it is what starts that step. Drag from the handle on Unlock Code onto Unlock Bay, and choose Input, trigger. An optional input would not start the step.
On screen: Handle on Unlock Code → Unlock Bay → Input (trigger).
The diagram is part of the model. The steps are actions under Rent a Bike, and the item and its links appear in the Database and on every view that shows them.
On screen: The completed action diagram.
Recap
Let's recap. You opened a function as an action diagram, dropped steps onto the line, added parallel branches and a decision with probabilities, and connected an item that triggers a step.
Next, you decide which part of the dock performs each function: allocation.