과정의 장
교육 · 트랙 9. SysML v2 기초 · 9.5장 (전체 8장)
9.5 요구사항 4:15
검사 가능한 요구사항을 작성하고, 명세 안에 중첩하고, 충족되지 않은 요구사항을 확인합니다.
Holarch 2.22 화면입니다.
학습 내용
- 요구사항의 한계를 단위가 있는 속성으로 이름 붙이기
- 번호, 문장, 주체, require 제약 조건이 있는 요구사항 정의 작성하기
- 명세 안에 요구사항 사용을 중첩하고 `:>>`로 각자의 한계 지정하기
- 무엇이 요구사항을 충족하는지 기술하고, 설계가 충족하지 않을 때 편집기의 표시 읽기
- 품질 페이지에서 요구사항 문장 검사하기
Hybrid Car라는 작은 프로젝트에서 SysML v2 튜토리얼 Requirements를 따라 Holarch에서 SysML v2 요구사항을 작성합니다. 이름 있는 한계, 번호, 문장, 주체, require 제약 조건이 있는 요구사항 정의, 삽입, 중첩된 요구사항이 있는 명세, satisfy, 세단이 더 이상 충족하지 않는 요구사항, 요구사항 표, 요구사항 뷰, 품질 검사를 다룹니다. SysML은 Object Management Group, Inc.의 등록 상표입니다.
실습
Hybrid Car 데모 프로젝트(SysML v2)에서 Holarch로 직접 해 보십시오.
- Hybrid Car 데모 프로젝트를 열고(필요하면 만드십시오: 프로젝트 관리 → 프로젝트 파일 ▾ → 새 데모 프로젝트 → Hybrid Car (SysML v2)), 모델 → 편집기와 패키지
VehicleRequirements를 엽니다. attribute minElectricRange뒤에attribute minTopSpeed : SpeedValue = 180 [km/h];를 추가합니다.requirement def <'VR-5'> ChargeTime아래에서 삽입 ▾ → 요구사항 정의를 선택하고, 문장The sports car shall reach at least the minimum top speed., 주체car : SportCar,require constraint { car.topSpeed >= minTopSpeed }로<'VR-8'> TopSpeed를 작성합니다.- 다른
satisfy줄 뒤에satisfy requirement roadsterSpeed : TopSpeed by fleet.roadster;를 추가합니다. minTopSpeed를220 [km/h]로 바꿉니다. 편집기가 satisfy에 붙인 표시를 가리켜 비교한 값을 읽은 다음, ⌘Z / Ctrl+Z를 누릅니다.- 니즈 및 요구사항 → 요구사항을 열고 VR-8을 찾은 다음, 니즈 및 요구사항 → 품질을 열고 품질 검사를 클릭합니다.
VR-8이 요구사항 표에 있고, 180 km/h에서 satisfy에 표시가 없으며, 품질 검사가 그 문장에 점수를 매겼으면 완료입니다.
스스로 확인
maxCurbMass같은 한계를 각 제약 조건에 숫자로 쓰지 않고 이름 있는 속성으로 두는 이유는 무엇입니까?requirement <'VR-1.1'> sedanMass : CurbMass { attribute :>> limit = maxCurbMass; }에서:>>는 무엇을 합니까?satisfy carSpec by fleet.sedan;은 Holarch가 무엇을 검사할 수 있게 합니까?- 요구사항 페이지에서 요구사항의 상태와 우선순위를 설정합니다. SysML 텍스트가 바뀝니까?
답 보기
maxCurbMass같은 한계를 각 제약 조건에 숫자로 쓰지 않고 이름 있는 속성으로 두는 이유는 무엇입니까?그 이름을 사용하는 모든 요구사항이 한 번의 편집을 따르며, 한계가 단위를 지니므로 검사기가 단위와 함께 값을 비교합니다.
requirement <'VR-1.1'> sedanMass : CurbMass { attribute :>> limit = maxCurbMass; }에서:>>는 무엇을 합니까?sedanMass가 CurbMass로부터 상속하는
limit속성을 재정의하여, 이 사용에 자체 값을 지정합니다.satisfy carSpec by fleet.sedan;은 Holarch가 무엇을 검사할 수 있게 합니까?세단의 값이 carSpec의 제약 조건을 충족하는지입니다. 세단의 공차 질량이 한계를 넘으면 편집기가 satisfy에 표시를 하고 비교한 값을 보여 줍니다.
요구사항 페이지에서 요구사항의 상태와 우선순위를 설정합니다. 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.