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

# Editing Scenarios

> How to duplicate scenarios, customise model inputs, and use CSV templates.

## **Duplicating a scenario**

Only draft scenarios can be edited. To edit a scenario that has already been run:

1. **Duplicate:** There are two ways to duplicate a scenario:
   * Via the project page: Open the meatballs menu (**...**) in the scenario table and choose **Duplicate**.
   * Via the scenario page: Click the **Duplicate** button on the scenario page.
2. **Rename:** (optional) Click on the new scenario name to edit it.
3. **Edit:** You can now edit the scenario inputs as needed.

## **Customising model inputs**

The app provides default datasets (demand, capital costs, fuel prices, etc.) so you can run a minimal least-cost model immediately. To use custom data:

* **Select a parameter:** Click on a specific input category (e.g. Annual Demand).
* **Download template:** Click **Template .csv** to download the required format.
* **Edit and upload:** Modify the **user\_data** column in the CSV and use **Upload .csv** to apply your changes.

## **Understanding templates**

Most CSV templates share the same column types; dimensions and units differ by input.

* **Dimension columns** (identify each row):
  * **year:** The model year the value applies to (when the parameter is time-varying).
  * **technology:** The technology slug (e.g. photovoltaic, coal-subcritical, transmission). Omitted or NA where the parameter is not technology-specific.
  * **commodity:** The commodity slug where applicable (e.g. electricity, fossil-fuel). Often NA for technology-only parameters.
  * **node** and **node\_name:** The geography/node the value applies to. Used for all technologies **except** transmission. In regional models, every non-transmission row is tied to a node.
  * **interconnector** and **interconnector\_name:** The link between two nodes. Populated **only** when technology is **transmission**; for all other technologies these columns are blank.
* **Data columns:**
  * **default\_data:** Current model value.
  * **user\_data:** Where you enter custom values.
  * **unit:** e.g. MW, FRACTION, USD/MW.

For transmission, each row is identified by the interconnector (the link between two nodes). For other technologies, each row is identified by the node (the geography).

## **Editing the CSV**

* The **default\_data** column contains the existing values the model uses and is read-only for reference. It may be blank, 0, or another value.
* Use the **user\_data** column for your custom data. If this column is blank or you remove a value, the model uses **default\_data**.
* All possible row/column combinations already exist in the template. Do not add new rows or remove existing ones—edit the existing rows only (with the exception of applying group constraints, as discussed below).

## **Limitation: unconstraining values**

You cannot explicitly unconstrain any value. Default values are often set to 0 or another number; they are not necessarily unconstrained. In addition:

* You cannot change **default\_data** (including deleting values). To change behaviour, add new values in **user\_data**.
* Deleting values in **user\_data**, or setting them to N/A, does not unconstrain—the model reverts to **default\_data**.
* You cannot set a value to infinity.

To mimic unconstrained behaviour, set a very high value (e.g. 99999) in **user\_data**, ideally in the same order of magnitude as the highest value already in the model to avoid solver instability.

## Group Constraints

Some inputs types allow the use of *group constraints*. These allow you to apply a constraint across a group of nodes or technologies.

For example, you might want to limit the combined emissions of all of the nodes in your model.

To add a group constraint:

* You must *append a new row* to the template, with a comma-separated list in the relevant group column. E.g.
  for node\_group: `GRIDREGION-IDN-JW,GRIDREGION-IDN-KA,GRIDREGION-IDN-PP`.
* You need to add one row for each time slice where you want grouping to apply.
* As above, use the **user\_data** column for your custom data for each group.

The model aggregates the group using either sum or mean, depending on the input. Grouping is only available for these inputs (aggregation in brackets):

* Maximum total capacity (sum)
* Minimum total capacity (sum)
* Total emissions (sum)
* Annual emissions (sum)
* Minimum generation (mean)

### Examples

* Annual Emissions: group nodes to create a country-level emissions target.
* Minimum generation: group technologies to mandate minimum renewable generation targets. Additionally group nodes to set these at a national level.
