> ## Documentation Index
> Fetch the complete documentation index at: https://docs.simcel.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Running Simulation

> Launch and monitor supply simulations to validate plan feasibility and compute constrained KPIs.

## Purpose

Running a supply simulation in SIMCEL is a critical step to evaluate the alignment between your supply plans and demand forecasts. This guideline helps you navigate the process effectively, so you achieve accurate and meaningful results.

## Prerequisites

Before running a supply simulation, make sure the following prerequisite is met:

* **SIT levels** - You have finished setting the SIT (Sales In Target) levels per distributor and product. This defines the expected Sales In levels for each scenario.

### Preparation

<Steps>
  <Step title="Create or edit the scenario">
    Create or edit the scenario you want to run the simulation for.

    <Frame caption="Creating or editing the scenario to simulate">
      <img src="https://mintcdn.com/simcel-knowledge/aNdF9ypT9JISx_3e/images/supply-simulation/running-simulation-1.png?fit=max&auto=format&n=aNdF9ypT9JISx_3e&q=85&s=e4bd53f0f4a1c90373820e277959b670" alt="Scenario panel where you create or edit the scenario that the simulation will run against" width="2547" height="462" data-path="images/supply-simulation/running-simulation-1.png" />
    </Frame>
  </Step>

  <Step title="Associate the scenario with a supply plan">
    Ensure that the scenario is associated with the appropriate supply plan. If it is not already imported, upload the supply plan scenario in the ETL screen.

    <Frame caption="Associating the scenario with a supply plan">
      <img src="https://mintcdn.com/simcel-knowledge/aNdF9ypT9JISx_3e/images/supply-simulation/running-simulation-2.png?fit=max&auto=format&n=aNdF9ypT9JISx_3e&q=85&s=550b757fb2ba21de132c7aa8c99343d8" alt="Scenario settings showing the supply plan selection field" width="2522" height="1007" data-path="images/supply-simulation/running-simulation-2.png" />
    </Frame>

    <Frame caption="Uploading a supply plan in the ETL screen">
      <img src="https://mintcdn.com/simcel-knowledge/aNdF9ypT9JISx_3e/images/supply-simulation/running-simulation-3.png?fit=max&auto=format&n=aNdF9ypT9JISx_3e&q=85&s=4cb55f3aea9b5bbf4ef938d558a17d78" alt="ETL upload screen used to import a supply plan that is not yet available in the workspace" width="1727" height="652" data-path="images/supply-simulation/running-simulation-3.png" />
    </Frame>
  </Step>
</Steps>

## Running the simulation

Click **Run Simulation** in the scenario dropdown menu.

<Frame caption="The Run Simulation option in the scenario dropdown menu">
  <img src="https://mintcdn.com/simcel-knowledge/aNdF9ypT9JISx_3e/images/supply-simulation/running-simulation-4.png?fit=max&auto=format&n=aNdF9ypT9JISx_3e&q=85&s=aaffc5f61f8e283aab6a92139e5dc72c" alt="Scenario dropdown menu with the Run Simulation button" width="2550" height="777" data-path="images/supply-simulation/running-simulation-4.png" />
</Frame>

This action triggers the simulation process with the following steps.

### 1. Validate Sales In

* SIMCEL performs a sanity check on Primary Sales by checking whether any negative value exists.
* A popup warning may appear to inform you about the exclusion of negative values. If this happens, click **Confirm** to continue, or **Cancel** if you would prefer to adjust your SIT parameters.

<Frame caption="The warning popup about excluded negative Sales In values">
  <img src="https://mintcdn.com/simcel-knowledge/aNdF9ypT9JISx_3e/images/supply-simulation/running-simulation-5.png?fit=max&auto=format&n=aNdF9ypT9JISx_3e&q=85&s=e9668cbe5b0068da06ed8fafd1af178e" alt="Popup dialogue warning that negative primary sales values will be excluded, with Confirm and Cancel buttons" width="2430" height="1167" data-path="images/supply-simulation/running-simulation-5.png" />
</Frame>

### 2. Run simulation

* **Initial stock determination** - The simulation begins by determining the initial stock level, using the closing stock of the period before the simulation start date.
* **Sales and inventory simulation**:
  * For each month, the tool adds the supply quantity to the beginning inventory.
  * The resulting inventory level is compared with the Unconstrained Sales In to determine demand fulfillment.
  * If the inventory level meets or exceeds the unconstrained demand, the Constrained Sales In equals the Unconstrained Sales In. If not, it is limited to the available stock.
  * The closing stock for the month is calculated as:

```text theme={null}
Closing stock = Opening stock + Supply quantity - Constrained Sales In
```

### 3. Metrics calculation

* SIMCEL calculates all the metrics used to generate the simulation output and atomic KPIs.
* This ensures that all metrics accurately reflect the impact of supply constraints on distributor demand fulfillment.

### 4. Simulation output

Once the simulation is complete, you can access the output files of each scenario. These include:

* **Simulation Sales In** - Contains Constrained Sales In data for each distributor.
* **Demand Fulfillment Metric** - Breaks down distributor demand into individual orders, showing fulfillment status.
* **Detailed Inventory Metrics** - Provides a comprehensive record of inventory levels, including opening and closing stocks, quantities received, quantities shipped, and any adjustments.
* **Atomic KPIs** - Offers granular data, including product details, distributor information, and location data, for in-depth analysis.

### 5. Interpreting KPIs

Navigate to the **Business Explorer** page to review the performance KPIs generated by SIMCEL.

### 6. Adjusting plans based on insights

Use the insights gained from the simulation to make necessary adjustments to your supply and demand plans.

<Note>
  * After you validate the Primary Sales In, the simulation starts running. A dialogue indicates the steps and the current simulation progress.
  * You can temporarily hide this dialogue by clicking **Keep working**.
  * After hiding the dialogue, you can still monitor the simulation's progress by checking the scenario tab. A loading indicator appears right next to the scenario being triggered.
</Note>

<Frame caption="The simulation progress dialogue with the Keep working button">
  <img src="https://mintcdn.com/simcel-knowledge/aNdF9ypT9JISx_3e/images/supply-simulation/running-simulation-6.png?fit=max&auto=format&n=aNdF9ypT9JISx_3e&q=85&s=7b05e8978081412d7c066424f99bb3d7" alt="Dialogue showing the simulation steps and current progress, with a Keep working button to hide it" width="2427" height="1192" data-path="images/supply-simulation/running-simulation-6.png" />
</Frame>

<Frame caption="The loading indicator next to the running scenario in the scenario tab">
  <img src="https://mintcdn.com/simcel-knowledge/aNdF9ypT9JISx_3e/images/supply-simulation/running-simulation-7.png?fit=max&auto=format&n=aNdF9ypT9JISx_3e&q=85&s=f69ff5700c248c9b6567bf97bffde32b" alt="Scenario tab showing a loading indicator beside the scenario whose simulation is in progress" width="2531" height="987" data-path="images/supply-simulation/running-simulation-7.png" />
</Frame>

## Constrained SIT

Once a supply simulation is complete, you can access detailed metrics to analyze the outcomes and make informed decisions. The SIT table lets you toggle between unconstrained and constrained metrics, giving a comprehensive view of supply chain performance.

The primary outcome of the simulation is the **Constrained Primary Sales**, which is the volume of products the company can supply to its distributors. Based on this revised sales input, the tool recalculates the following metrics.

### 1. Constrained Secondary Sales

* Represents the sales to end customers, considering the available supply from distributors after accounting for constraints.
* Indicates how much of the distributor's demand can be fulfilled based on the available inventory.

### 2. Constrained Stock Value

* Shows the inventory levels at the end of each period after meeting the Constrained Sales In.
* Helps you understand the remaining stock and plan for future supply needs.

### 3. Constrained Stock Days (SIT)

* Reflects the quantity of stock currently at the distributors, expressed in days of sales.
* Provides insight into inventory levels in a normalized way.

<Note>
  - If any of the selected scenarios have not been simulated, switching to Constrained mode shows no data for that scenario.
  - If you modify the input - for example by choosing a new supply plan or setting new unconstrained metrics - you can re-run the simulation with the updated inputs.
</Note>

<Frame caption="The SIT table toggled to constrained metrics after a simulation">
  <img src="https://mintcdn.com/simcel-knowledge/aNdF9ypT9JISx_3e/images/supply-simulation/running-simulation-8.png?fit=max&auto=format&n=aNdF9ypT9JISx_3e&q=85&s=afe0c5d282bc9f6b479b4f547aa399ac" alt="SIT table showing constrained primary sales, secondary sales, stock value, and stock days after the simulation" width="2540" height="1041" data-path="images/supply-simulation/running-simulation-8.png" />
</Frame>
