Using AI to Generate a Use Case Model

Estimated reading: 3 minutes

One of the most revolutionary features of the AI SysML v2 Editor is the ability to generate complex model structures using natural language. This is particularly useful for behavioral modeling, where describing user interactions can be done more naturally in plain English. This tutorial will guide you through using the AI SysML tool to create a Use Case model from scratch.

Objective

By the end of this tutorial, you will have used the AI Assistant to generate a complete Use Case model for an “Automated ATM System,” including actors, use cases, and their relationships, all within a stable SysML v2 tool environment.

Step 1: Open the AI Assistant

  1. Launch the web-based SysML v2 editor.
  2. Create a new file named UseCaseModel.sysml in your project folder.
  3. Locate and click the AI Assistant (Sparkle) icon on the right-hand panel. This will open the AI SysML tool interface.

Step 2: Configure the Generation Settings

The AI Assistant allows you to specify the type of SysML v2 view you want to create to ensure the generated code follows the correct patterns.

  1. In the AI Assistant panel, make sure the Diagram tab is selected.
  2. Find the Diagram Type dropdown menu.
  3. Select Use Case from the list. This tells the AI SysML v2 software to prioritize use case definitions and actor associations.

Step 3: Write Your Natural Language Prompt

The quality of your SysML v2 editor project depends on the clarity of your prompt. We will provide a descriptive requirement for our ATM system.

  1. In the prompt text area, type the following:

    “Generate a use case model for an ATM system. The actors are Customer and Maintenance Technician. Use cases for the Customer include Withdraw Cash, Check Balance, and Deposit Funds. Use cases for the Technician include Replenish Cash and Run Diagnostics.”
  2. Click the Generate button.

Step 4: Review the Generated SysML v2 Code

The AI SysML tool will now communicate with the server to produce standards-compliant SysML v2 code.

  1. A preview window will appear showing the generated textual syntax.
  2. Notice how the AI has used actor, use case, and association keywords.
  3. Because this is a stable SysML v2 tool, you can trust that the generated code respects the rigorous grammar of the SysML v2 standard.

Step 5: Apply the Model to Your Workspace

Once you are satisfied with the preview, you can bring the code into your main SysML editor.

  1. Click the Apply button in the AI Assistant preview window.
  2. The code will be automatically injected into your UseCaseModel.sysml file.
  3. The precise syntax highlighting will instantly color-code the new actors and use cases, making the model easy to read and manage.

Step 6: Verify the Use Case Diagram

The web-based SysML software will now automatically render the visual representation of your AI-generated model.

  1. Look at the Diagram Viewer. You should see actors represented as “stick figures” (or blocks) and use cases as ovals, with lines representing the associations.
  2. If the diagram looks cluttered, use the Layout Direction tool in the diagram menu bar to set it to “Left-to-Right” for a more traditional use case layout.

Summary and Next Steps

Congratulations! You have successfully used artificial intelligence to accelerate your systems engineering workflow. You’ve transformed a plain English description into a formal SysML v2 software model. By leveraging the AI SysML v2 editor, you have saved significant time on manual syntax authoring.

In the next tutorial, “Refining Architectures with AI Recontextualization,” we will learn how to use the AI to update and expand an existing model rather than just starting from scratch.


Share this Doc

Using AI to Generate a Use Case Model

Or copy link

CONTENTS
Scroll to Top