> 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/hypersim/model-and-simulation/prepare-the-simulation/run-the-simulation.md).

# Run the simulation

## Start the simulation

In the **HYPERSIM** ribbon, click **Start** to launch the simulation.

By default, the **Start** command executes the following workflow steps in sequence: **Analyze**, **Load Flow** (optional), **Map Tasks**, and **Generate Code**. Each of these steps can also be run individually.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-d41b1e4f2b5b7f41905b7cac169732227a4c31a1%2F4-steps-before%20start.png?alt=media" alt="" width="479"><figcaption></figcaption></figure>

**Analyze**: Performs a model analysis and generates the **electrical netlist.**

[**Load Flow**](https://www.opal-rt.com/docs/hypersim/model-and-simulation/prepare-the-simulation/run-load-flow-analysis.md): Initializes the network at its steady-state operating point before simulation if enable.

[**Map Tasks**](#map-tasks): Evaluates the model’s computational weight, allocating CPU resources and leveraging parallel processing.

**Generate Code:** Converts the model into C code

The whole process can take **from a few seconds to a few minutes** depending on model size. There is a configurable **Model preparation timeout** in Preferences that applies to these pre-simulation steps.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-022d86e0bac783fa852d1ca940cbbcd6c33a247c%2Fmodel-preparation-timeout.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

Once running, the **Start button grays out** and the **Stop button** becomes available.

### Enable load flow and initial conditions

From the **HYPERSIM** ribbon, open the **Simulation Settings** dialog box and enable **Perform load flow** and **Set initial conditions at simulation start**.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-db7b354b974fbcc1df35a1dc37677c70e958a95c%2Fsimulation-setting-enabled-loadflow.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

If checked, the load flow algorithm is executed and initial conditions are set every time the simulation is started. Otherwise, generators start from a steady-state.

## Map tasks

After clicking **Map Task**, review the log window for the current network. **The log window is an important source of information**, providing details about the model, input/output operations, warnings, and error messages.

Each model has **two consoles**:

1. **Model.ecf**: Displays information related to model operations and execution.
2. **Model.simout**: Displays messages and results generated during the simulation.

{% hint style="danger" %}
When something does not work as expected, **always check these windows first**.
{% endhint %}

Here, all tasks are assigned to **Processor #1** because the model is configured to run on a single CPU core. The task mapper also provides an estimate of the time required to execute all tasks.

The next section of the **Network Log Window** lists all configured I/O sensors.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-03d3feacb39e556bddb300f8e7db5777185caf78%2Fmap-task-example-report.png?alt=media" alt=""><figcaption></figcaption></figure>


---

# 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/hypersim/model-and-simulation/prepare-the-simulation/run-the-simulation.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.
