> 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/set-simulation-parameters.md).

# Set Simulation Parameters

To configure the simulation parameters, click **Simulation Settings** in the **Simulation** section of the **HYPERSIM** ribbon. This opens the **Simulation Settings** dialog box.

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

## General

<table data-search="false"><thead><tr><th width="190" valign="top">Parameter</th><th>Description</th><th width="140">Variable &#x26; Constraints</th></tr></thead><tbody><tr><td valign="top"><strong>Target</strong></td><td><p>Target IP or hostname on which to compile, load, and execute the simulation.</p><p>The drop-down box lists every target previously set up in the Target Manager menu.</p><p>The button on the right is a shortcut to open the Target Manager and focus on the selected target.</p></td><td></td></tr><tr><td valign="top"><strong>Simulation mode</strong></td><td><p><em>Real-Time Accelerated</em> (RTA) is a type of offline (or non-real-time) simulation that runs as fast as possible, meaning the actual execution time is usually much faster than real-time depending on the PC specifications.</p><p><strong>NOTE:</strong> All I/Os are not initialized in this mode.</p><p><em>Real-Time</em> runs a standard real-time simulation where all I/Os are available.</p><p><strong>NOTE:</strong> When the operating system is Windows, real-time performance cannot be guaranteed due to the nature of this OS, but that doesn't mean that doing HIL simulation is impossible. Certain protocols such as C37.118 whose data are time-stamped and the tolerance on latency is relatively high are very favorable to this kind of application. It's up to the user to define the acceptable boundaries of simulation performance when running in real-time with I/Os on Windows.</p></td><td></td></tr><tr><td valign="top"><strong>Architecture</strong></td><td>Non-editable field. It reports the operating system expected on the target simulator.</td><td></td></tr><tr><td valign="top"><strong>Time-step (s)</strong></td><td>Size of the discretization used by all equations.<br>The execution is in real-time if the performance factor = 1, faster than real-time if the performance factor &#x3C; 1, and slower if the performance factor > 1.</td><td>simulation.calculationStep</td></tr><tr><td valign="top"><strong>Performance factor</strong></td><td><p>This parameter can be used for optimizing and debugging in real-time mode. It helps to alter the actual execution time by a specified factor and is usually used to slow down the simulation when more time is needed to compute all equations than what the time step allows.</p><p><strong>/!\ Real-time is only when performance factor = 1.</strong> The other modes are for debugging purposes only.</p><p>Step duration = performance factor * simulation time step</p><p>For example, a time step of 50 μs with a performance factor of 2 gives the simulation 100 μs to complete calculations (while the size of the discretization remains 50 μs) and exchange I/Os. Since I/Os are only exchanged between two calculations, it also means that their output frequency is slowed down to every 100 μs.</p><p>In other words, with a performance factor > 1, the processors have more time, and heavy tasks can be completed before I/Os have to be exchanged again, and thus overruns can be avoided.</p><p>To illustrate the behaviour, say a sine wave is observed on a real oscilloscope: its period is equal to the product of the performance factor and the real period. This is like playing a video in slow motion.</p></td><td>simulation.performance</td></tr><tr><td valign="top"><strong>Code directory</strong></td><td><p>This parameter is set automatically depending on the chosen target.</p><p>Before the simulation, HYPERSIM generates C code specific to each network. This parameter is used to define the directory where the code is saved.</p><p>If there is no modification to the model, the second execution is faster as HYPERSIM detects the code has already been generated and skips the compilation step.</p></td><td></td></tr><tr><td valign="top"><strong>Enable simulation logging</strong></td><td><p>For debugging purposes, add more information to the simulation log file (*.simout).</p><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>This decreases real-time performance.</p><p>Communication Protocols have their simulation logging mode that can be configured in the IO interface.</p></div></td><td>simulation.logging</td></tr><tr><td valign="top"><strong>Activate iterative method</strong></td><td><p>Enable the iterative solver for non-linearities and zero-crossing. It is enabled on a task-by-task basis depending on the following:</p><ul><li>If switches or breakers are present and iteration is enabled, the iteration is done on the entire topology to guarantee the natural commutation (current crossing zero).</li><li>If nonlinear components are present, in addition to the 'Enable iteration' option, the iteration must be enabled for every component individually. This gives flexibility to the user to optimize for precision or computation time.</li></ul><p>To activate iteration for all components, check to <strong>Apply to all nonlinear elements</strong>.</p><p><strong>NOTE</strong>: if the precision valve parameter is enabled in a switch, it disables the iteration for all components within the same task.</p></td><td>simulation.iteration.activate</td></tr><tr><td valign="top"><strong>Maximum iterations</strong></td><td>Limit the maximum number of iterations for the iterative method at each step. There is a trade-off between precision and computation time.</td><td>simulation.iteration.max</td></tr><tr><td valign="top"><strong>Apply to all nonlinear elements</strong></td><td>Override individual components' iteration parameters and activate iteration for all components.</td><td>simulation.iteration.enable_all_comp</td></tr><tr><td valign="top"><strong>Default sensor file name</strong></td><td><p>This is the sensor file that is loaded when opening a model. The default value is the eponym .csv file next to the .ecf.</p><p>More information on the default sensor file can be found in <a href="https://www.opal-rt.com/docs/hypersim/model-and-simulation/manage-sensors.md">Manage Sensors</a> section.</p></td><td></td></tr><tr><td valign="top"><strong>Automatically open sensor file with design</strong></td><td><p>Enables or disables the loading of the default sensor file name.</p><p>It can be useful to deactivate this option if the model is meant to be run on different hardware which requires different I/O Factors in the sensor configuration.</p></td><td></td></tr><tr><td valign="top"><strong>Frequency (Hz)</strong></td><td>The nominal frequency of the power system model. For example, this value is used to calculate the load flow and to calculate monitoring values of the Monitor component.</td><td>loadflow.frequency</td></tr><tr><td valign="top"><strong>Power base (MVA)</strong></td><td>The power base when displaying power in PU.</td><td>loadflow.pbase</td></tr><tr><td valign="top"><strong>PQ tolerance (MVA)</strong></td><td>The load flow convergence tolerance.</td><td>loadflow.tolerancePQ</td></tr><tr><td valign="top"><strong>Max iterations</strong></td><td>The maximum number of iterations for the load flow algorithm to search for a convergent solution.</td><td>loadflow.maxIteration</td></tr><tr><td valign="top"><strong>Deceleration factor</strong></td><td>Usually set to 1 for most cases, this parameter is used only when iteration is necessary to find a solution. Decreasing its value reduces the size of the variation between two iterations.</td><td>loadflow.decelerationFactor</td></tr><tr><td valign="top"><strong>Perform load flow</strong></td><td>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.</td><td>loadflow.steadyStateStart</td></tr></tbody></table>

### Target

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

This tab allows you to override the target's advanced settings related to compilation and task mapping.

These settings override the target configuration for the current model only and do not alter the values defined in **Target Manager**.

In the table below, the third column shows the name of the corresponding setting in the Python API. The architecture name appears in square brackets \<ARCH\_NAME> and must be replaced with the target architecture name.

HYPERSIM currently supports two architectures **Windows-rt** and **linux-oprtlinux3-64-rt**.

For example, to retrieve the value of the **Cflags** setting for the Windows architecture, use the preference name: architecture.Windows-rt.cflags.

<table data-search="false"><thead><tr><th width="190" valign="top">Parameter</th><th>Description</th><th width="140">Variable &#x26; Constraints</th></tr></thead><tbody><tr><td valign="top"><strong>Cflags</strong></td><td><p>C Flags are specific to the compiler used. They are used to send extra arguments to the compiler when generating the C code of a model.</p><p>For Intel and GCC compilers, the basic optimization levels are <strong>-O0</strong>, <strong>-O1</strong>, and <strong>-O2</strong>:</p><ul><li><strong>-O0</strong> – No optimization</li><li><strong>-O1</strong> – Basic optimization</li><li><strong>-O2</strong> – Maximum recommended optimization</li></ul><p><strong>-O2</strong> is the default optimization level used by both the Intel and GCC compilers.</p><p>Example: Passing defines (-D) :</p><ul><li>-Ddef1, -Ddef2=val2</li><li>or options (-O) : -O2 -O3 to the compiler.</li></ul></td><td>architecture.&#x3C;ARCH_NAME>.cflags</td></tr><tr><td valign="top"><strong>Make command</strong></td><td><p>Used to build generated code in parallel on several cores.</p><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>It is highly recommended that users not modify this parameter.</strong></p></div><ul><li>Localhost default value: %{TOOLS_MSYS}/usr/bin/make -j10</li><li>Target default value: /usr/bin/gmake -j10</li></ul></td><td>architecture.&#x3C;ARCH_NAME>.makecmd</td></tr><tr><td valign="top"><strong>Compiler</strong></td><td><p>A compiler generates object files from source code. This field chooses what compiler to build with either opgcc or opicc. (Intel compiler requires a license.)</p><p>Using gcc builds faster, but using icc gets better performance.</p><ul><li>Localhost default value: %{TOOLS_MINGW}/bin/gcc</li></ul><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>For localhost, only gcc is compatible.</p></div><ul><li>Target default value: opicc (wrapper of icc)</li></ul><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>if you use icc as Compiler for example, you must use icc as Linker.</p></div></td><td>architecture.&#x3C;ARCH_NAME>.compiler</td></tr><tr><td valign="top"><strong>Linker</strong></td><td><p>A linker combines these object code files into an executable. This field chooses what linker to use. Either gcc or icc.</p><ul><li>Localhost default value: %{TOOLS_MINGW}/bin/gcc</li><li>Target default value: opicc (wrapper of icc)</li></ul><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>If you use gcc as Compiler for example, you must use gcc as Linker.</p></div></td><td>architecture.&#x3C;ARCH_NAME>.linker</td></tr><tr><td valign="top"><strong>Server</strong></td><td><p>It indicates what server is used for compilation.</p><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>This value must not be modified.</strong></p></div><ul><li>Localhost default value: localhost</li><li>Target default value: "IP address" or "Target Name"</li></ul></td><td></td></tr><tr><td valign="top"><strong>Communication overhead</strong></td><td><p>Delay allocated for communication between processors.</p><p>For example, when doing a task mapping, the minimum time step required to run the simulation is calculated as follows:</p><p><strong>Minimum Time Step per core = (Estimated execution time per task assigned to a core / Processor Performance) + Communication overhead + I/O overhead</strong></p><p>Where the Exec Time is the maximum execution time needed by the biggest task.</p><ul><li>Localhost default value: 1.0e-9</li><li>Target default value: 4.0e-6</li></ul></td><td>architecture.&#x3C;ARCH_NAME>.overheadcomm</td></tr><tr><td valign="top"><strong>I/O overhead</strong></td><td><p>It's the delay allocated to I/Os to communicate.</p><p>For example, when doing a task mapping, the minimum time step required to run the simulation is calculated as follows:</p><p><strong>Minimum Time Step per core = (Estimated execution time per task assigned to a core / Processor Performance) + Communication overhead + I/O overhead</strong></p><p>Where the Exec Time is the maximum execution time needed by the biggest task.</p><p>Note that I/O overhead is considered by the core only if this core has I/Os. So if you don't use any I/O, the minimum time step becomes:</p><p><strong>Time step = (Estimated execution time per task assigned to a core / Processor Performance) + Communication overhead</strong></p><ul><li>Localhost default value: 1.0e-9</li><li>Target default value: 2.0e-6</li></ul></td><td>architecture.&#x3C;ARCH_NAME>.overheadio</td></tr><tr><td valign="top"><strong>Processor performance</strong></td><td><p>This parameter quantifies the computation capability of the cores. Correctly estimating the target’s processor performance helps the task mapping to be more accurate with the real time behavior.</p><p>During task assignments, the theoretical execution time of the individual tasks will be divided by the processor performance, which allows to assign more tasks on each core.</p><p><strong>Effective Task Execution Time = Theoretical Execution Time / Processor Performance</strong></p><ul><li>Localhost default value: 8.5</li><li>Target default value: 20</li></ul><p>Example, if a task costs in theory 15us.</p><ul><li>When ran on localhost, the Task mapper will consider the task to take an effective time of 15 / 8.5 = 1.74us.</li><li>When ran on a target, the Task mapper will consider the task to take an effective time of 15 / 20 = 0.75us.</li></ul><p>/!\ Overestimating the processor performance of a target will result in overruns, as too many tasks may be assigned to the same core.</p></td><td>architecture.&#x3C;ARCH_NAME>.procperf</td></tr></tbody></table>

## Advanced

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

This tab allows you to override the target's advanced settings related to **Acquisition**, **Code Generation**, **Simulation Server**, **Topology** and **Overrun Monitoring**.

<table data-search="false"><thead><tr><th width="190" valign="top">Parameter</th><th>Description</th><th width="140">Variable &#x26; Constraints</th></tr></thead><tbody><tr><td valign="top"><strong>Point-on-wave detection timeout</strong></td><td>This timeout is applied when the trig signal is not received by ScopeView.</td><td>acq.powTimeoutDelay</td></tr><tr><td valign="top"><strong>Number of CPU for code generation</strong></td><td><p>Set the number of CPU for code generation</p><p>-1: use as many CPU as the system can carry</p><p>0: disable the feature</p><p>from 1: use the number of CPUs specified by the user. if this value is higher than the number of CPUs available, it uses as many CPUs as the system can carry.</p></td><td>simulation.numThreadCodeGen</td></tr><tr><td valign="top"><strong>Solve control inputs before solving power</strong></td><td><p>When a control component is connected to the input of a network component, the control can be solved after the network in the task. It means that there is a calculation step delay on values measured by network components connected to the control.</p><p><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-9cd11f90829e9c87d61c94092f756d7b2570b68d%2Fcode-execution-1.png?alt=media" alt="" data-size="original"></p><p>When this option is enabled, control components connected to the input of network components are solved before in the task and the calculation step delay disappears.</p><p>This option is enabled by default. If you want to disable the feature, it needs to be specified before generating the code for the simulation to take it into account allowing the power blocks to initialize correctly.</p><p><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-04355879acbbbc1dc9d9c383b9fb4014a00b3df7%2Fcode-execution-2.png?alt=media" alt="" data-size="original"></p></td><td>simulation.preVNodePowerInputControls</td></tr><tr><td valign="top"><strong>Start/stop timeout</strong></td><td><p>This timeout applies to the initialization (such as creating I/O connections, connecting to external hardware...) and stopping the sequence of the simulation. Increasing its value may be necessary when working with a high number of I/O connections.</p><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Increasing its value also causes a longer waiting time when other issues prevent the simulation from correctly starting/stopping.</p><p>Should this happen, <a href="https://www.opal-rt.com/contact-technical-support/">contact technical support</a>.</p></div></td><td>simulation.rpcCallTimeout</td></tr><tr><td valign="top"><strong>External simulation start</strong></td><td><p>Indicates that this simulation’s start is synchronized with another external simulation’s start using a synchronization signal.</p><p>To configure the signal, see the section<a href="https://www.opal-rt.com/docs/hypersim/configure-ios/analog-digital-and-sfp-ios/opal-rt-board-workflow.md"> OPAL-RT Board Workflow</a>.</p><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Synchronization is carried out by a driver (Opal-Board) and is therefore always performed after a waiting period to stabilize the model (see next line).</p></div></td><td>simulation.extSimStartEnable</td></tr><tr><td valign="top"><strong>Number of steps before enabling I/Os</strong></td><td><p>Specify the number of steps to wait before enabling I/O operations and starting to monitor simulation performance.</p><p>This delay allows the CPU to stabilize its performance, ensuring accurate monitoring and optimal system behavior. A large value might negatively impact numeric stability when using I/Os. A small value might result in overruns for the first few steps. The correct number depends on the model and its I/Os.</p></td><td>simulation.fullSpeedCount</td></tr><tr><td valign="top"><strong>Auto-transceiver</strong></td><td><ul><li>If checked, a transceiver component is automatically added in all locations where it is needed to succeed in mapping tasks.</li><li>If unchecked and a transceiver is needed, an error message during the task mapping step specifying the location where it is needed is displayed.</li></ul><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Transceivers are used to decouple control tasks into different tasks.</p></div></td><td>simulation.autoAddTransceiver</td></tr><tr><td valign="top"><strong>Convert signal type mismatch</strong></td><td>Automatically convert the signal from FLOAT to INT or INT to FLOAT. This option replaces the use of conversion control components.</td><td>simulation.autoAddFtoIItoF</td></tr><tr><td valign="top"><strong>Enable transceiver validation</strong></td><td>Check if more than one output signal is connected to the transceiver.</td><td>simulation.transceiverValidation</td></tr><tr><td valign="top"><strong>Enable overrun monitoring</strong></td><td>Monitors whether each simulation step exceeds its real-time execution window.</td><td>simulation.overrunsMonitorEnable</td></tr><tr><td valign="top"><strong>Number of overruns to ignore</strong></td><td>Number of overruns tolerated before triggering an alert.</td><td>simulation.overrunsMaxAllowed</td></tr><tr><td valign="top"><strong>Interrupt simulation when threshold is reached</strong></td><td>If enabled, the simulation stops automatically once the number of overruns reaches the configured threshold. If disabled, HYPERSIM shows a warning but the simulation continues running.</td><td>simulation.overrunsMonitorInterrupt</td></tr></tbody></table>

## Exata CPS

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-403783e4aa8208600cea5504ffc0a4012ab00a57%2Fsimulation-settings-window-4.png?alt=media" alt="" width="560"><figcaption></figcaption></figure>

This tab allows the configuration of EXata with HYPERSIM.

<table data-search="false"><thead><tr><th width="190">Parameter</th><th>Variable &#x26; Constraints</th><th width="140">Variable &#x26; Constraints</th></tr></thead><tbody><tr><td><strong>Auto-run Exata CPS simulation</strong></td><td>If the condition is set to True, the designated EXata CPS Executable will automatically launch at the initiation of the simulation, utilizing the specified configuration file format (JSON or config)<br>Value: True/False</td><td></td></tr><tr><td><strong>Close Exata CPS GUI on stop simulation</strong></td><td>if the condition is set to true, stopping the simulation will automatically close Exata opened earlier.<br>This can only be true if Auto-run is set to true<br>Value: True/False</td><td></td></tr><tr><td><strong>EXata CPS Executable</strong></td><td>path to EXata executable (String)</td><td></td></tr><tr><td><strong>From json</strong></td><td>Not editable, path to the auto-generated configuration file (String), located in hyp_folder/exata/exata_opalrt_configfile.json</td><td></td></tr><tr><td><strong>From config</strong></td><td>Path to EXata configuration file (String).</td><td></td></tr><tr><td><strong>Open Scenario</strong></td><td>open EXata GUI with the selected configuration file</td><td><br><br></td></tr></tbody></table>


---

# 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/set-simulation-parameters.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.
