課程章節
培訓 · 第 6 單元:移轉到 Holarch · 第 6.4 章,共 5 章
6.4 來自其他工具的模型 2:44
從 XMI 匯入 SysML 模型:哪些內容會帶過來、哪些不會,以及如何重建檢視。
展示 Holarch 2.21。
您將學到
- 將 UML/SysML 模型(XMI 或 Cameo .mdzip 專案)匯入已開啟的專案
- 說出從其他工具匯入會帶來什麼、留下什麼
- 在資料庫與「追溯」區段中檢查匯入的項目與關係
- 從匯入的關係重建檢視
從 XMI 檔案(SysML 工具匯出的交換格式)匯入 Plant Inspection Drone 的舊模型:其區塊、零件、活動及其流程與分配會以資產、動作與關係的形式帶過來,圖面配置則不會。在資料庫與匯入的 Action 圖中檢查結果,並以依據匯入關係繪製的 Asset 圖重建檢視。
練習
在 Holarch 中於 CubeSat EO-1 示範專案上親自操作。
- 開啟您的 EO-1 示範專案(如果還沒有,請建立:管理專案 → 專案檔案 ▾ → 新增示範專案 → CubeSat(引導式系統工程))。開啟需要與需求 → 匯入和匯出,在「匯出」卡片上按一下匯出 UML/SysML (XMI)…,將格式保持為 OMG XMI 2.5.1 (.xmi),然後按一下匯出。這個檔案代替從 Cameo 或 Enterprise Architect 等 SysML 工具匯出的檔案。
- 在管理專案中按一下 + 新增專案,將它命名為
EO-1 Import Practice,然後按一下建立專案。開啟需要與需求 → 匯入和匯出,拖放 .xmi 檔案,確認格式顯示 UML/SysML (.xmi, .uml, .mdzip),按兩次繼續,閱讀審查,然後按一下匯入 N 個項目。 - 在資料庫中搜尋
class:Asset,選取 Payload Camera,並在追溯中確認它是 EO-1 Spacecraft 的一部分,以及它執行哪些動作。 - 開啟圖,按一下 + 新增圖,選擇 Asset 圖,在圖的對象中選擇 EO-1 Spacecraft,然後按一下建立。
- 開啟執行的 Action,列出每個子系統的功能。
當新專案的 Asset 圖顯示太空船的子系統及其執行的動作時,即完成。
自我檢查
- Holarch 可以匯入 SysML v1 工具的哪些檔案?要如何取得?
- 為什麼匯入後可以快速重建圖?
- 您匯入同一模型較新的匯出檔。為什麼不會產生副本?
顯示答案
Holarch 可以匯入 SysML v1 工具的哪些檔案?要如何取得?
來自 Cameo/MagicDraw、Enterprise Architect、Rhapsody 或 Papyrus、帶有 SysML 1.x 設定檔的 XMI 2.x(從工具匯出),直接匯入的 Cameo 或 MagicDraw .mdzip 專案,以及 Papyrus .uml 檔案。單純的需求也可以用 ReqIF 匯入,表格則可用 Excel 或 CSV。
為什麼匯入後可以快速重建圖?
其他工具的圖面配置不會匯入,但關係會。Holarch 會依據這些關係繪製 Asset 圖、階層圖與其他圖。
您匯入同一模型較新的匯出檔。為什麼不會產生副本?
每個匯入的項目都保留其 XMI id,而對 XMI 檔案而言,「現有實體的比對依據」預設為 XMI ID,因此後續的匯入會更新這些項目。已存在的關係不會重複新增。
延伸閱讀
文字稿
顯示文字稿 (旁白與畫面內容)
Introduction
Chapter four: models from other tools. Teams that used another modeling tool usually have a model to bring along, not just requirements. Holarch reads UML and SysML models in XMI, the exchange format that SysML tools export.
We import an older model of the Plant Inspection Drone. The file was made for this course, in the form a SysML tool exports.
What comes across
Be clear about what comes across. Blocks become assets, and their parts become the decomposition. Activities become actions, with their flow, and allocations say which asset performs each action. Diagram layouts do not come across: you rebuild the views you need in Holarch.
On screen: Card: what comes across.
Import the file
Open Needs and Requirements, then Import and Export, and drop the file. Holarch detects the format from the file: UML and SysML.
On screen: Needs & Requirements → Import and Export → drop the .xmi file → Analyzed.
Click Continue, and Continue again. Review lists ten new items and eleven relationships, and one activity whose flow comes from the file. Click Import, and the items are merged into the open project. Each one keeps its XMI ID, so importing a later export of the same model updates them instead of adding copies.
On screen: Continue → Map → Continue → Review → Import 10 items.
Check the result
Open the Database, and filter to assets: type class, colon, Asset. The drone, its five subsystems and their descriptions are all here.
On screen: Database → class:Asset.
Select the flight controller, and open Trace in its inspector. It is part of the drone, and it performs Fly Inspection Route: the allocation from the old model.
On screen: Flight Controller → inspector Trace.
The activity came across with its flow. Open Inspect a Tank on the Diagrams page: its action diagram runs the three steps in order.
On screen: Diagrams → Inspect a Tank action diagram.
Rebuild the views
The block diagrams did not come across, but the relationships did, so views are quick to rebuild. On the Diagrams page, choose New Diagram, then Asset Diagram, with the drone as its root: its subsystems are drawn at once.
On screen: Diagrams → New Diagram → Asset Diagram → root Plant Inspection Drone → Create.
Turn on Performed Actions, and each subsystem shows the functions it performs.
On screen: Show Performed Actions.
Recap
Let's recap. An XMI file brings blocks, parts, activities with their flow, and allocations, as assets, actions and relationships. Diagram layouts are rebuilt in Holarch, and the imported relationships make that quick.
Next, cleaning up after all these imports.