Holarch
课程章节

培训 · 课程 3. 行为和架构 · 第 3.1 章,共 6 章

3.1 功能和 FFBD 3:52

为功能指定一个顶层功能,然后以文本编写其流程并得到 FFBD。

演示 Holarch 1.27。

所有章节 · 3.2 Action 图 →

您将学到

  • 在功能分析页面上选择顶层功能
  • 使用 decomposed by 关系将功能分解为子功能
  • 使用箭头、AND 和 LOOP 以文本编写功能流程
  • 查看 Holarch 根据流程绘制的 FFBD,并打开子功能自己的 FFBD

在功能分析页面上将 Bike-Share Dock 的功能组织到一个顶层功能之下,添加一个功能,用一行带箭头、AND 和 LOOP 的文本编写功能流程,并让 Holarch 据此绘制功能流程框图 (FFBD)。

项目文件

  • 起始项目 (.holarch.json;管理项目 → 项目文件 ▾ → 导入项目 (.json)…)
  • 完成项目 (.holarch.json;管理项目 → 项目文件 ▾ → 导入项目 (.json)…)

视频从 holarch.app 播放;参见隐私政策。

练习

在 Holarch 中基于 CubeSat EO-1 演示项目亲自完成此操作。

  1. 打开您的 EO-1 演示项目,或创建它:管理项目 → 项目文件 ▾ → 新建演示项目 → CubeSat(引导式系统工程)。
  2. 在数据库中选择 F9 Transmit Payload Data。在其 追溯 部分,单击 decomposed by 旁边的 +(如果未列出,请勾选 显示所有关系),选择 新建 Action…,然后创建 Enable Transmitter、Send Data File、Confirm Receipt、Disable Transmitter 和 Report Pass Summary。
  3. 打开 行为 → 功能分析,单击 顶层功能 旁边的 选择…,然后选择 F9 Transmit Payload Data。功能 标签页列出其五个子功能。
  4. 在 流程与 FFBD 上单击 以文本编辑…,输入 "Enable Transmitter" -> LOOP[return="next file"]("Send Data File" -> "Confirm Receipt") -> AND("Disable Transmitter" | "Report Pass Summary"),然后单击 应用。
  5. 单击 打开 FFBD,找到带返回箭头的循环和 AND 门。然后再次选择 F0 Perform EO-1 Mission 作为顶层功能,打开其 FFBD,并双击 F9 打开 F9 自己的 FFBD。
  6. 如需带检查的分步演练,请运行教程 4“功能分析”(帮助 → 教程)。

当 F9 的 FFBD 显示 Enable Transmitter、由 Send Data File 和 Confirm Receipt 组成且返回箭头标为 next file 的循环,以及一个有两个分支的 AND 时,即完成练习。

自测

  1. 为什么功能分析页面需要一个顶层功能?
  2. 流程中的 AND 和 OR 有什么区别?
  3. 如果在文本流程中遗漏了某个功能,会发生什么?
  4. 您在“流程与 FFBD”标签页上更改了流程。FFBD 会怎样?
显示答案
  1. 为什么功能分析页面需要一个顶层功能?

    该页面以一个 Action 为基础:其 decomposed by 子项就是它所列出、编排流程和绘制的功能。选择另一个顶层功能(例如 F9)会显示该功能自身的分解。

  2. 流程中的 AND 和 OR 有什么区别?

    AND 并行运行其所有分支,所有分支都完成后流程才继续。OR 只选择其中一个分支。

  3. 如果在文本流程中遗漏了某个功能,会发生什么?

    Holarch 会将其列为文本中缺失的功能,并将其添加到流程的最后一个元素之后,因此不会丢失任何功能。

  4. 您在“流程与 FFBD”标签页上更改了流程。FFBD 会怎样?

    FFBD 会重新绘制。FFBD、功能树和功能表都读取同一个模型,因此无需手动更新任何内容。

延伸阅读

文字稿

显示文字稿 (旁白和屏幕内容)

Introduction

Welcome to Behavior and Architecture. This track models what the Bike-Share Dock does, what it is made of, how its parts connect, and whether the design adds up.

This first chapter is about functions, and the order they run in.

Functions and their flow

A function is something the system must do, named with a verb: rent a bike, take a payment. A functional flow block diagram, the F F B D, shows the order the functions run in, which ones run at the same time, and which ones repeat.

On screen: Card: functions and the FFBD.

A top-level function

Open Behavior, then Functional Analysis. The page works from one top-level function, and the dock has none yet. The four functions from Getting Started stand on their own.

On screen: Behavior → Functional Analysis: no top-level function.

Click Choose, then Create New. The top-level function is the whole job of the system: Operate the Bike-Share Dock, numbered F zero.

On screen: Choose… → Create New… → F.0 Operate the Bike-Share Dock.

Now put the four functions under it. Open the Database, select Operate the Bike-Share Dock, and in its Trace section, link Rent a Bike, Return a Bike, Charge Bikes and Take Payment under decomposed by.

On screen: Database → F.0 → decomposed by → F.1–F.4.

One function is missing: the dock reports its status, the free bays and the charge levels, to the back office. Create a new Action, F five, Report Dock Status.

On screen: New Entity: Action F.5 Report Dock Status.

Place it in the hierarchy from the other side: show all relations in its Trace section, and under decomposes, link it to Operate the Bike-Share Dock.

On screen: F.5 → decomposes → F.0.

Back in Functional Analysis, the Functions tab lists all five under the top-level function.

On screen: Functional Analysis → Functions.

The flow as text

Open Flow and FFBD. Until someone writes the flow, it simply lists the functions in number order, which says nothing about how they work together.

On screen: Flow & FFBD tab.

Choose Edit as Text. A flow is written like a sentence: function numbers joined by arrows, in the order they run. A rider pays, takes the bike, and later returns it: F four, arrow, F one, arrow, F two.

On screen: Edit as Text → F.4 -> F.1 -> F.2.

After a return, two things happen at the same time: the bike charges, and the dock reports its status. AND opens parallel branches, separated by a bar. Both start together, and the flow goes on when both are done.

On screen: -> AND(F.3 | F.5).

The whole cycle repeats for the next rider. LOOP repeats what is inside its brackets, and return names the arrow that goes back. Wrap the flow in a loop.

On screen: LOOP[return="next rider"]( … ).

The FFBD

The preview below draws the diagram as you type. Apply it.

On screen: Preview → Apply.

Holarch draws the F F B D from that one line: a numbered box for each function, a circle where the AND branches open and close, and the loop with the return arrow labeled next rider.

On screen: The FFBD.

The diagram, the hierarchy and the functions table all read the same model. Change the flow, and the diagram follows.

On screen: The FFBD.

Recap

Let's recap. You created a top-level function, placed the dock's functions under it, wrote their flow as text with arrows, AND and LOOP, and got the F F B D drawn from it.

Next, you take one function apart, step by step, on an action diagram.