> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/pe-add-on-simulink/model-and-simulation/use-the-scenarios-feature.md).

# Use the Scenarios Feature

## Overview

The **Scenarios feature** can be used to modify the characteristics of **passive elements** in the circuit model while the simulation is running. This article describes how to create and import a Scenarios template file, and how to manage Scenarios during the simulation.

{% hint style="info" %}
Note that **Microsoft Excel** is required to use this feature.
{% endhint %}

{% stepper %}
{% step %}

## Create the template scenarios file

* In the VeriStand System Definition, browse to the **Circuit Model** section. Confirm that a circuit model has already been added.
* Click **Refresh** to display the **Maximum Number of Scenarios** available for the circuit model.
* Enable the **Use Scenarios?** checkbox.
* Click the **Scenario Path** file browser button and select a new file name and path for the Scenario template file. The file name must have the extension *.xls*.
* Click **New.** The template will be created at the specified file path.

<figure><img src="https://2999842053-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe9Kk9pJCHht2LLBSxPap%2Fuploads%2F9ktC5VJoDHgZDfu462tI%2FScenarioTemplatev2.gif?alt=media&amp;token=260edf8c-018f-40a4-ada8-e757fa018ed7" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

## Complete the scenarios file

* Open the template file in Microsoft Excel and observe. The top row of the file displays a list of all modifiable passive component parameters, while the second row, titled *Default*, lists the parameter values defined in the Circuit Model file.
* Update the template by adding a row for each desired Scenario, titled *ScenarioX* where *X* is the index of the Scenario in ascending order (i.e. *Scenario1*, *Scenario2*, etc). For each defined Scenario, add new parameter values to the desired columns.
* **Save** the file.

<figure><img src="https://2999842053-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe9Kk9pJCHht2LLBSxPap%2Fuploads%2FE1sXO0Ag9Zuwxpsw0p7o%2Fimage.png?alt=media&amp;token=9025560c-eb1c-454f-b53f-58b638bb3c6e" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

## Run the scenario

* In VeriStand, click **Refresh** to validate that the **Scenarios Used** indicator matches the number of scenarios defined in the template.
* **Save** the System Definition file.
* To switch between Scenarios at execution time, modify the value of the **Scenario ID** channel. For instance, a **Numeric Control** can be added to the project Workspace to allow the operator to modify the **Scenario ID** channel manually while the simulation runs.

<figure><img src="https://2999842053-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe9Kk9pJCHht2LLBSxPap%2Fuploads%2F3bEZAspapZSxXB3uruEh%2Fd9f74a5a-ac73-4efa-8bf5-a6de22619eb0.gif?alt=media&amp;token=cb5030fe-1a10-4d38-972e-31752a7c0bca" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/pe-add-on-simulink/model-and-simulation/use-the-scenarios-feature.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
