Kurskapitel
Schulung · Reihe 3. Verhalten und Architektur · Kapitel 3.2 von 6
3.2 Action-Diagramme 2:55
Eine Funktion in Schritte zerlegen, mit parallelen Zweigen, einer Entscheidung und dem Element, das einen Schritt auslöst.
Zeigt Holarch 1.27.
Das lernen Sie
- Eine Funktion als Action-Diagramm öffnen und Schritte hinzufügen, indem Sie Action auf die Linie ziehen
- Parallele Zweige und eine Entscheidung mit Zweigwahrscheinlichkeiten hinzufügen, die zusammen 100 % ergeben
- Ein Input/Output anlegen, das ein Schritt erzeugt und ein anderer Schritt als Auslöser empfängt
- Erklären, wie die Schritte im Diagramm zu Actions im Modell werden
Öffnen Sie Rent a Bike als Action-Diagramm und bauen Sie seine Schritte auf der Zeichenfläche auf: serielle Aktionen, einen parallelen Zweig, eine Entscheidung mit Zweigwahrscheinlichkeiten und ein Input/Output-Element, das ein Schritt erzeugt und ein anderer Schritt empfängt.
Projektdateien
- Startprojekt (.holarch.json; Projekte verwalten → Projektdateien ▾ → Projekt importieren (.json)…)
- Fertiges Projekt (.holarch.json; Projekte verwalten → Projektdateien ▾ → Projekt importieren (.json)…)
Das Video wird von holarch.app abgespielt; siehe Datenschutzerklärung.
Übung
Führen Sie dies selbst in Holarch durch, am Demoprojekt CubeSat EO-1.
- Öffnen Sie Ihr EO-1-Demoprojekt oder erstellen Sie es: Projekte verwalten → Projektdateien ▾ → Neues Demoprojekt → CubeSat (Geführtes Systems Engineering).
- Wählen Sie in der Datenbank F10 Enter Safe Mode aus und wählen Sie Öffnen in ▾ → Action-Diagramm.
- Ziehen Sie Action aus dem Bereich Hinzufügen auf die Linie und nennen Sie sie
Detect Undervoltage. Ziehen Sie dann ein Parallel hinter ihr auf die Linie, mitShed Payload Loadsauf einem Zweig undPoint Arrays to Sunauf dem anderen. - Ziehen Sie ein OR hinter dem Parallel auf die Linie und nennen Sie es
Battery recovered?. Setzen Sie im Inspektor die Zweigwahrscheinlichkeiten auf 80 und 20, und legen SieResume Nominal Modeauf den ersten Zweig undKeep Chargingauf den zweiten. - Ziehen Sie Input/Output auf Detect Undervoltage und nennen Sie es
Undervoltage Flag. Ziehen Sie den Griff unter dem I/O auf Shed Payload Loads und wählen Sie Input (Auslöser).
Sie sind fertig, wenn das Diagramm von F10 die fünf Schritte, die parallelen Zweige, das OR mit Gesamt 100 % und Undervoltage Flag zeigt, das von Detect Undervoltage an Shed Payload Loads übergeht.
Selbsttest
- Was fügt das Ablegen einer Action auf der Linie dem Modell hinzu?
- Was ist der Unterschied zwischen einem auslösenden und einem optionalen Input?
- Warum müssen die Zweigwahrscheinlichkeiten eines OR zusammen 100 % ergeben?
Antworten anzeigen
Was fügt das Ablegen einer Action auf der Linie dem Modell hinzu?
Eine neue Action, unter der Funktion zerlegt, zu der das Diagramm gehört, an dieser Stelle in ihrem Ablauf. Sie erscheint in der Datenbank und in jeder Ansicht, die sie zeigt.
Was ist der Unterschied zwischen einem auslösenden und einem optionalen Input?
Ein Schritt mit einem auslösenden Input startet erst, wenn dieses Element eintrifft. Ein optionaler Input wird empfangen, hält den Schritt aber nicht auf.
Warum müssen die Zweigwahrscheinlichkeiten eines OR zusammen 100 % ergeben?
Der Simulator wählt einen Zweig nach seiner Wahrscheinlichkeit. Ergeben die Zahlen nicht 100 %, warnt der Inspektor. Sind die Wahrscheinlichkeiten unbekannt, wählen Sie None: Der Simulator fragt dann während des Laufs, und Monte Carlo verwendet gleiche Wahrscheinlichkeiten.
Weiterlesen
Transkript
Transkript anzeigen (Erzählung und Bildschirminhalt)
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.