Holarch
कोर्स के अध्याय

प्रशिक्षण · ट्रैक 9. SysML v2 की मूल बातें · 8 में से अध्याय 9.5

9.5 आवश्यकताएं 4:15

जांचने योग्य आवश्यकताएं लिखें, उन्हें एक विनिर्देश में नेस्ट करें, और एक ऐसी आवश्यकता देखें जो पूरी नहीं होती।

Holarch 2.22 दिखाता है।

आप क्या सीखेंगे

  • आवश्यकता सीमाओं को इकाइयों वाले एट्रिब्यूट के रूप में नाम दें
  • नंबर, कथन, subject और require constraint के साथ एक requirement परिभाषा लिखें
  • requirement usages को एक विनिर्देश में नेस्ट करें और उन्हें `:>>` से उनकी अपनी सीमाएं दें
  • बताएं कि किसी आवश्यकता को क्या संतुष्ट करता है, और जब डिज़ाइन उसे पूरा नहीं करता तो संपादक का चिह्न पढ़ें
  • गुणवत्ता पेज पर आवश्यकता कथन जांचें

एक छोटे Hybrid Car प्रोजेक्ट पर SysML v2 ट्यूटोरियल Requirements का पालन करते हुए Holarch में SysML v2 आवश्यकताएं लिखें: नामित सीमाएं, नंबर, कथन, subject और require constraint वाली requirement परिभाषाएं, सम्मिलित करें, नेस्ट की गई आवश्यकताओं वाला एक विनिर्देश, satisfy, एक आवश्यकता जिसे सेडान अब पूरा नहीं करती, आवश्यकता तालिका, एक Requirement View और गुणवत्ता जांच। SysML, Object Management Group, Inc. का पंजीकृत ट्रेडमार्क है।

प्रोजेक्ट फ़ाइलें

वीडियो holarch.app से चलता है; गोपनीयता नीति देखें।

अभ्यास

यह स्वयं Holarch में, Hybrid Car डेमो प्रोजेक्ट (SysML v2) पर करें।

  1. अपना Hybrid Car डेमो प्रोजेक्ट खोलें (ज़रूरत हो तो उसे बनाएं: प्रोजेक्ट प्रबंधित करें → प्रोजेक्ट फ़ाइलें ▾ → नया डेमो प्रोजेक्ट → Hybrid Car (SysML v2)), मॉडल → संपादक और पैकेज VehicleRequirements खोलें।
  2. attribute minElectricRange के बाद attribute minTopSpeed : SpeedValue = 180 [km/h]; जोड़ें।
  3. requirement def <'VR-5'> ChargeTime के नीचे सम्मिलित करें ▾ → आवश्यकता परिभाषा चुनें और कथन The sports car shall reach at least the minimum top speed., subject car : SportCar और require constraint { car.topSpeed >= minTopSpeed } के साथ <'VR-8'> TopSpeed लिखें।
  4. अन्य satisfy पंक्तियों के बाद satisfy requirement roadsterSpeed : TopSpeed by fleet.roadster; जोड़ें।
  5. minTopSpeed को 220 [km/h] में बदलें। तुलना किए गए मान पढ़ने के लिए संपादक द्वारा satisfy पर लगाए गए चिह्न पर पॉइंटर ले जाएं, फिर ⌘Z / Ctrl+Z दबाएं।
  6. ज़रूरतें और आवश्यकताएं → आवश्यकताएं खोलें और VR-8 खोजें, फिर ज़रूरतें और आवश्यकताएं → गुणवत्ता खोलें और गुणवत्ता जांचें पर क्लिक करें।

आपका काम तब पूरा है जब VR-8 आवश्यकता तालिका में है, 180 km/h पर satisfy पर कोई चिह्न नहीं है, और गुणवत्ता जांचें ने उसके कथन को स्कोर कर दिया है।

स्वयं जांचें

  1. maxCurbMass जैसी सीमाओं को हर constraint में संख्या लिखने के बजाय नामित एट्रिब्यूट के रूप में क्यों रखें?
  2. requirement <'VR-1.1'> sedanMass : CurbMass { attribute :>> limit = maxCurbMass; } में :>> क्या करता है?
  3. satisfy carSpec by fleet.sedan; से Holarch क्या जांच पाता है?
  4. आप आवश्यकताएं पेज पर किसी आवश्यकता की स्थिति और प्राथमिकता सेट करते हैं। क्या SysML टेक्स्ट बदलता है?
उत्तर दिखाएं
  1. maxCurbMass जैसी सीमाओं को हर constraint में संख्या लिखने के बजाय नामित एट्रिब्यूट के रूप में क्यों रखें?

    नाम का उपयोग करने वाली हर आवश्यकता एक ही संपादन का पालन करती है, और सीमा अपनी इकाई साथ रखती है, इसलिए चेकर इकाइयों के साथ मानों की तुलना करता है।

  2. requirement <'VR-1.1'> sedanMass : CurbMass { attribute :>> limit = maxCurbMass; } में :>> क्या करता है?

    यह उस limit एट्रिब्यूट को पुनर्परिभाषित करता है जो sedanMass को CurbMass से विरासत में मिलता है, और इस usage को उसका अपना मान देता है।

  3. satisfy carSpec by fleet.sedan; से Holarch क्या जांच पाता है?

    क्या सेडान के मान carSpec के constraints पूरे करते हैं। यदि सेडान का कर्ब मास सीमा से अधिक है, तो संपादक satisfy को चिह्नित करता है और तुलना किए गए मान दिखाता है।

  4. आप आवश्यकताएं पेज पर किसी आवश्यकता की स्थिति और प्राथमिकता सेट करते हैं। क्या SysML टेक्स्ट बदलता है?

    नहीं। स्थिति, प्राथमिकता और सत्यापन विधि मॉडल के साथ रखा गया Holarch डेटा है; ये कभी टेक्स्ट नहीं बदलते।

और पढ़ें

ट्रांसक्रिप्ट

ट्रांसक्रिप्ट दिखाएं (नरेशन और स्क्रीन पर क्या है)

Introduction

Chapter five: requirements. In SysML v2 a requirement can carry a constraint, so the model can check whether a design meets it.

In this chapter you write limits and requirement definitions, nest requirements in a specification, say what satisfies them, and see a requirement that is not met.

Start the tutorial

Start the tutorial Requirements from Project Files, Start a Tutorial. Its starter project holds a small copy of the design: a battery, a car, and a fleet with a sedan of fifteen hundred eighty kilograms.

On screen: Project Files ▾ → Start a Tutorial… → SysML v2: Requirements → Start; Model → Editor.

Requirement definitions

Keep limits as named values, so one edit updates every requirement that uses them. After the requirements comment, add the maximum curb mass and the minimum battery capacity.

On screen: After // ---- Requirements ----: maxCurbMass and minBatteryCapacity.

Below the limits, write the first requirement definition. V R one is its number, doc is its statement, subject is what it is about, and require constraint makes it checkable: Holarch evaluates it with units.

On screen: Below the limits: requirement def <'VR-1'> CurbMass.

Insert

Insert writes the frame of a construct for you. Below the curb mass requirement, open Insert and choose Requirement Definition. Type its number and name, then press Tab to move to the subject, its type and the statement.

On screen: Insert ▾ (open on camera) → Requirement Definition; <'VR-3'> BatteryCapacity, Tab, battery, Tab, Battery, Tab, statement.

Then give it its constraint: the battery's capacity is at least the minimum.

On screen: After the doc line: require constraint { battery.capacity >= minBatteryCapacity }

Specification and satisfy

A specification holds the sedan's requirements. Each one is a usage of a definition, and the symbol after attribute redefines the limit with the sedan's own value.

On screen: After BatteryCapacity: requirement carSpec with sedanMass : CurbMass.

Now say what satisfies them. The sedan of the fleet satisfies the car specification, and a named satisfy says that the sedan's battery satisfies the battery capacity requirement.

On screen: After carSpec: satisfy carSpec by fleet.sedan; satisfy requirement batterySpec …

Break a requirement on purpose. In the fleet, change the sedan's curb mass from fifteen hundred eighty to seventeen hundred kilograms.

On screen: In fleet: curbMass = 1580 → 1700.

The Editor marks the satisfy: the sedan no longer meets V R one point one. Point at the mark to read the values it compared.

On screen: The mark on the satisfy; its information card.

Change it back, or press Command Z, and the mark clears.

On screen: curbMass = 1700 → 1580; No problems.

Pages on the model

The requirements pages work on the model. Open Needs and Requirements, then Requirements. The model's requirements are the rows, numbered by their short names. Status, priority and verification method are Holarch data next to the model; they never change the text.

On screen: Needs & Requirements → Requirements.

Open the Diagrams page, click New Diagram, and choose Requirement View. Choose the car specification under Shows, and click Create: the specification as a tree, with what satisfies it.

On screen: Diagrams → + New Diagram → Requirement View; Shows: VehicleRequirements::carSpec; Create.

Last, open Needs and Requirements, then Quality, and click Check Quality. Each requirement's statement is scored on the quality criteria, as in an LML project.

On screen: Needs & Requirements → Quality → Check Quality.

Recap

Every step is ticked off. Click Mark as Done.

On screen: Step panel → Mark as Done.

Let's recap. You named the limits, wrote requirement definitions with a number, a statement, a subject and a constraint, used Insert, nested requirements in a specification, said what satisfies them, and saw the Editor mark a requirement that was not met.

Next, verification cases check these requirements, and the matrix traces them.