# 5 · Variant management

If your model describes a **family** of products rather than a single one, ASysT can **configure** it:
pick options, and see the one product your choices select. This is **product-line engineering** (PLE) —
and ASysT speaks the same concepts as tools like pure::variants.

> This guide is the how-to. For the concepts, the SysML mapping, and how resolution works under the hood,
> see the engineering deep-dive the team maintains (`_Docs/feature_component/ASysT_Variant_management.md`).

---

## The idea in one line

A **variability** model carries *every option for every product at once* — it's over-complete, a
"**150 %** model". You pick a **configuration**, and ASysT **resolves** it down to a single **100 %
product** by removing the options you didn't choose.

| Term | Meaning |
|------|---------|
| **Variation point** | A place the model offers a choice (e.g. an `hvac` that can be one of several systems). |
| **Variant** | One option of that choice (e.g. `heatPump`). |
| **Configuration** | Your set of choices, saved by name. |

## Open the configurator

When your model declares variability **and a Pro entitlement is active**, a **Variants** button appears on
the canvas. It is hidden for models with no variation points, and on Free and Alpha it never appears — the
engine gates every `/api/variants` route on the same entitlement. Click it to open the configurator.

You'll see a **feature tree**:

- Each **variation point** with its **variants** as clickable chips.
- A small badge says how to choose: **choose one** (alternative), **optional** (at most one), or
  **choose any** (an or-group — tick several).
- When you select a variant that has **nested** choices, those appear indented underneath.

## Configure, with live checking

As you pick variants, ASysT validates your configuration **live**:

- **Valid / Invalid** — *invalid* means a hard problem (e.g. two variants picked where only one is
  allowed, or a **selection constraint** is broken).
- **Complete / Incomplete** — *incomplete* means there's still a choice to make.
- **Selection constraints** — the model's own rules (e.g. "heat-pump *requires* solar panels", "A *xor*
  B") are listed with a status: **satisfied**, **violated**, or **indeterminate** (a rule that can't be
  judged yet, or that refers to something outside the configurable choices — these never block you).

## Save, load, apply

- **Name** your configuration and **Save** it — it's stored in a `*.variants.yaml` sidecar next to the
  model (ASysT's own file, never your `.sysml`). Saved configurations appear as chips you can **load** or
  **delete**.
- **Apply to canvas** resolves the configuration and **redraws the diagram as the chosen product** — the
  unselected options (and anything only they used) disappear. A banner shows the active configuration and
  how many elements are hidden.
- **Clear configuration** (on the banner) returns to the full model.

Applying a configuration only changes *what you see*. Your model stays the full 150 % superset; the
product is a view of it.

## What it can and can't do (today)

- It configures **part/usage** variation and prunes the components the unchosen variants bind.
- It **evaluates** selection constraints; it does not yet *solve* them (auto-completing a choice to
  satisfy a rule).
- It does not generate a separate resolved `.sysml` file — the product is a diagram/graph, not a new
  source file.

---

Next: [Exporting & reports](06_Export_and_reports.md).
