Holarch
Capítulos do curso

Treinamento · Trilha 3. Comportamento e arquitetura · Capítulo 3.1 de 6

3.1 Funções e o FFBD 3:52

Dê às funções uma função de nível superior, depois escreva seu fluxo como texto e obtenha o FFBD.

Mostra o Holarch 1.27.

Todos os capítulos · 3.2 Diagramas de Action →

O que você vai aprender

  • Escolher uma função de nível superior na página Análise funcional
  • Decompor uma função em subfunções com o relacionamento decomposed by
  • Escrever um fluxo funcional como texto com setas, AND e LOOP
  • Ler o FFBD que o Holarch desenha a partir do fluxo e abrir o FFBD próprio de uma subfunção

Organize as funções da Bike-Share Dock sob uma função de nível superior na página Análise funcional, adicione uma função, escreva o fluxo funcional como uma linha de texto com setas, AND e LOOP e deixe o Holarch desenhar a partir dele o diagrama de blocos de fluxo funcional (FFBD).

Arquivos de projeto

  • Projeto inicial (.holarch.json; Gerenciar projetos → Arquivos de projeto ▾ → Importar projeto (.json)…)
  • Projeto concluído (.holarch.json; Gerenciar projetos → Arquivos de projeto ▾ → Importar projeto (.json)…)

O vídeo é reproduzido a partir de holarch.app; veja a Política de Privacidade.

Prática

Faça isto você mesmo no Holarch, no projeto de demonstração CubeSat EO-1.

  1. Abra seu projeto de demonstração EO-1 ou crie-o: Gerenciar projetos → Arquivos de projeto ▾ → Novo projeto de demonstração → CubeSat (engenharia de sistemas guiada).
  2. No Banco de dados, selecione F9 Transmit Payload Data. Na sua seção Rastreabilidade, clique em + ao lado de decomposed by (marque Mostrar todas as relações se não estiver listado), escolha Nova Action… e crie Enable Transmitter, Send Data File, Confirm Receipt, Disable Transmitter e Report Pass Summary.
  3. Abra Comportamento → Análise funcional, clique em Escolher… ao lado de Função de nível superior e escolha F9 Transmit Payload Data. A aba Funções lista suas cinco subfunções.
  4. Em Fluxo e FFBD, clique em Editar como texto…, digite "Enable Transmitter" -> LOOP[return="next file"]("Send Data File" -> "Confirm Receipt") -> AND("Disable Transmitter" | "Report Pass Summary") e clique em Aplicar.
  5. Clique em Abrir FFBD e encontre o laço com sua seta de retorno e a porta AND. Depois escolha de novo F0 Perform EO-1 Mission como função de nível superior, abra seu FFBD e dê um clique duplo em F9 para abrir o FFBD próprio de F9.
  6. Para um passo a passo checado, execute o tutorial 4 Functional Analysis (Ajuda → Tutoriais).

Você terminou quando o FFBD de F9 mostrar Enable Transmitter, um laço de Send Data File e Confirm Receipt com a seta de retorno rotulada next file, e um AND com dois ramos.

Teste-se

  1. Por que a página Análise funcional precisa de uma função de nível superior?
  2. Qual é a diferença entre AND e OR em um fluxo?
  3. O que acontece com uma função que você deixa de fora do fluxo em texto?
  4. Você muda o fluxo na aba Fluxo e FFBD. O que acontece com o FFBD?
Mostrar as respostas
  1. Por que a página Análise funcional precisa de uma função de nível superior?

    A página trabalha a partir de uma Action: seus filhos decomposed by são as funções que ela lista, encadeia e desenha. Escolher outra função de nível superior, como F9, mostra a decomposição dessa função.

  2. Qual é a diferença entre AND e OR em um fluxo?

    AND executa todos os seus ramos em paralelo, e o fluxo continua quando todos os ramos terminam. OR segue exatamente um dos seus ramos.

  3. O que acontece com uma função que você deixa de fora do fluxo em texto?

    O Holarch a lista como ausente do texto e a acrescenta após o último elemento do fluxo, então nenhuma função se perde.

  4. Você muda o fluxo na aba Fluxo e FFBD. O que acontece com o FFBD?

    Ele é redesenhado. O FFBD, a árvore de funções e a tabela de funções leem o mesmo modelo, então não há nada para atualizar à mão.

Saiba mais

Transcrição

Mostrar a transcrição (narração e o que aparece na tela)

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.