कोर्स के अध्याय
प्रशिक्षण · ट्रैक 3. व्यवहार और आर्किटेक्चर · 6 में से अध्याय 3.2
3.2 Action आरेख 2:55
किसी फ़ंक्शन को समानांतर शाखाओं, एक निर्णय और किसी चरण को ट्रिगर करने वाले आइटम के साथ चरणों में बांटें।
Holarch 1.27 दिखाता है।
आप क्या सीखेंगे
- किसी फ़ंक्शन को Action आरेख के रूप में खोलें और Action को रेखा पर खींचकर चरण जोड़ें
- समानांतर शाखाएं और ऐसी शाखा संभावनाओं वाला एक निर्णय जोड़ें जिनका योग 100% हो
- एक Input/Output बनाएं जिसे एक चरण उत्पन्न करता है और दूसरा चरण ट्रिगर के रूप में प्राप्त करता है
- समझाएं कि आरेख पर चरण मॉडल में Actions कैसे बनते हैं
Rent a Bike को Action आरेख के रूप में खोलें और कैनवास पर उसके चरण बनाएं: क्रमिक actions, एक समानांतर शाखा, शाखा संभावनाओं वाला एक निर्णय, और एक input/output आइटम जिसे एक चरण बनाता है और दूसरा चरण प्राप्त करता है।
प्रोजेक्ट फ़ाइलें
- शुरुआती प्रोजेक्ट (.holarch.json; प्रोजेक्ट प्रबंधित करें → प्रोजेक्ट फ़ाइलें ▾ → प्रोजेक्ट आयात करें (.json)…)
- पूरा प्रोजेक्ट (.holarch.json; प्रोजेक्ट प्रबंधित करें → प्रोजेक्ट फ़ाइलें ▾ → प्रोजेक्ट आयात करें (.json)…)
वीडियो holarch.app से चलता है; गोपनीयता नीति देखें।
अभ्यास
इसे Holarch में CubeSat EO-1 डेमो प्रोजेक्ट पर स्वयं करें।
- अपना EO-1 डेमो प्रोजेक्ट खोलें, या उसे बनाएं: प्रोजेक्ट प्रबंधित करें → प्रोजेक्ट फ़ाइलें ▾ → नया डेमो प्रोजेक्ट → CubeSat (गाइडेड सिस्टम्स इंजीनियरिंग)।
- डेटाबेस में F10 Enter Safe Mode चुनें और इसमें खोलें ▾ → Action आरेख चुनें।
- जोड़ें पैनल से Action को रेखा पर खींचें और उसका नाम
Detect Undervoltageरखें। फिर उसके बाद रेखा पर एक समानांतर खींचें, एक शाखा परShed Payload Loadsऔर दूसरी परPoint Arrays to Sunके साथ। - समानांतर के बाद रेखा पर एक या खींचें और उसका नाम
Battery recovered?रखें। इंस्पेक्टर में शाखा संभावनाएं 80 और 20 सेट करें, और पहली शाखा परResume Nominal Modeऔर दूसरी परKeep Chargingरखें। - Input/Output को Detect Undervoltage पर खींचें और उसका नाम
Undervoltage Flagरखें। I/O के नीचे के हैंडल को Shed Payload Loads पर खींचें और इनपुट (ट्रिगर) चुनें।
आपका काम तब पूरा है जब F10 का आरेख पांच चरण, समानांतर शाखाएं, कुल 100% वाला OR, और Detect Undervoltage से Shed Payload Loads तक जाता Undervoltage Flag दिखाता है।
स्वयं जांचें
- रेखा पर Action छोड़ने से मॉडल में क्या जुड़ता है?
- ट्रिगर करने वाले और वैकल्पिक इनपुट में क्या अंतर है?
- OR की शाखाओं की संभावनाओं का योग 100% क्यों होना चाहिए?
उत्तर दिखाएं
रेखा पर Action छोड़ने से मॉडल में क्या जुड़ता है?
एक नया Action, जो उस फ़ंक्शन के अंतर्गत डीकंपोज़ होता है जिसका आरेख है, और उसके फ़्लो में उसी स्थान पर रहता है। यह डेटाबेस में और उसे दिखाने वाले हर व्यू में दिखता है।
ट्रिगर करने वाले और वैकल्पिक इनपुट में क्या अंतर है?
ट्रिगर करने वाले इनपुट वाला चरण तब तक शुरू नहीं होता जब तक वह आइटम नहीं आ जाता। वैकल्पिक इनपुट प्राप्त होता है, पर चरण को रोकता नहीं।
OR की शाखाओं की संभावनाओं का योग 100% क्यों होना चाहिए?
सिम्युलेटर किसी शाखा को उसकी संभावना के अनुसार चुनता है। यदि संख्याओं का योग 100% नहीं है, तो इंस्पेक्टर चेतावनी देता है। यदि संभावनाएं ज्ञात नहीं हैं, तो None चुनें: तब सिम्युलेटर रन के दौरान पूछता है, और Monte Carlo बराबर संभावनाएं उपयोग करता है।
और पढ़ें
ट्रांसक्रिप्ट
ट्रांसक्रिप्ट दिखाएं (नरेशन और स्क्रीन पर क्या है)
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.