# GENERICEQUATIONDESC

> GENERICEQUATIONDESC defines a generic equation identifier with a description. The formulation of the generic equation is detailed in [`GENERICEQUATIONRHS`](./GENERICEQUATIONRHS.md).

> GENERICEQUATIONDESC data is public to all participants.
> 
> Source
> 
> GENERICEQUATIONDESC updates when new a generic equation is created for
> the first time.
> 
> Volume
> 
> Approximately 100 records per year
> 
> Note
> 
> [`GENERICEQUATIONRHS`](./GENERICEQUATIONRHS.md) and GENERICEQUATIONDESC allow commonly used
> constraint right hand side formulations to be defined as a generic
> equation. Once defined, the generic equation can be referenced from any
> Generic constraint RHS formulation defined in [`GENERICCONSTRAINTRHS`](./GENERICCONSTRAINTRHS.md).

## Column Schema

### EQUATIONID

> Generic Equation Identifier

SQL Type: `VARCHAR2(20)`
Polars Type: `str`

This column is mandatory, and a primary key.

Examples:

- `SWMP_IF_GFT2_IS`
- `SWMP_IF_GFT2_OS`
- `SWMP_IF_KM_CB_IS`
- `SWMP_IF_KM_CB_OS`
- `X-7C2K0H350(2G)_DS`
- `X-7C2K0H350(2G)_PD`
- `X-7C2K0H350(2G)_ST`
- `X-7C2K350(2G)_DS`
- `X-7C2K350(2G)_PD`
- `X-7C2K350(2G)_ST`

### ADDITIONALNOTES

> Extra notes on the constraint

SQL Type: `VARCHAR2(256)`
Polars Type: `str`

This column is not mandatory.

Examples:

- `A17.b and A17.c ver 30`
- `A17.b row 1 Rev30; A38.d row 3 Rev31; A39 row 3 Rev31`
- `A17.b row 3 Ver 30`
- `A17.c row 1 Rev30; A38.d row 4 Rev31; A39 Row 4 Rev31`
- `A17.c row 3 Rev30; A38.d row 8 Rev31; A39 row 8 Rev31`
- `A38.d Row 5 Rev31, A39 Row 5 Rev31`
- `A38.d Row 5 Rev31, A39 Row 5 Rev31; Assume Haughton Syncon ON`
- `A38.d Row 6 Rev31, A39 Row 6 Rev31`
- `A38.d Row 6 Rev31, A39 Row 6 Rev31; Assume Haughton Syncon ON`
- `A39b Row 2 Rev31`

### DESCRIPTION

> Generic Equation Description

SQL Type: `VARCHAR2(256)`
Polars Type: `str`

This column is not mandatory.

Examples:

- `Check Townsville GT Unit 1 available; If true return 1 else 0 (PREDISPATCH ONLY)`
- `Check if Generator Fast Tripping (GFT) is out of service and swamp out if not in service`
- `Check if Kiamal is connected and swamp out if in service`
- `Limit calc for Lower Tumut to Wagga (51) 330kV line flow to avoid voltage collapse post contingency trip of line 51 - Dispatch`
- `Limit calc for Lower Tumut to Wagga (51) 330kV line flow to avoid voltage collapse post contingency trip of line 51 - PreDispatch`
- `Limit calc for Wagga to Lower Tumut (051) 330kV line flow to avoid voltage collapse post contingency trip of line 051 - Dispatch`
- `Limit calc for Wagga to Lower Tumut (051) 330kV line flow to avoid voltage collapse post contingency trip of line 051 - Predispatch`
- `Limit calc for Wagga to Lower Tumut (051) 330kV line flow to avoid voltage collapse post contingency trip of line 051 - ST PASA`
- `Limit calc for Wagga to Lower Tumut (51) 330kV line flow to avoid voltage collapse post contingency trip of line 51 - Dispatch`
- `Limit calc for Wagga to Lower Tumut (51) 330kV line flow to avoid voltage collapse post contingency trip of line 51 - PreDispatch`

### IMPACT

> The device(s) affected by the constraint (e.g. Interconnector, Generator(s) or Cutset)

SQL Type: `VARCHAR2(64)`
Polars Type: `str`

This column is not mandatory.

Examples:

- `NSW Generation + Interconnectors`
- `Other`
- `Qld Generation`

### LASTCHANGED

> Last date and time record changed

For more information, see the [dedicated documentation page](../../guide/querying.md#deduplication).

SQL Type: `DATE`
Polars Type: `pl.Datetime()`

This column is not mandatory.

Example: `2026/09/01 14:56:19`

### LIMITTYPE

> The limit type of the constraint e.g. Transient Stability, Voltage Stability

SQL Type: `VARCHAR2(64)`
Polars Type: `pl.Categorical`

This column is not mandatory.

Examples:

- `Other`
- `System Strength`
- `Voltage Stability`

### MODIFICATIONS

> Details of the changes made to this version of the generic equation RHS

SQL Type: `VARCHAR2(256)`
Polars Type: `str`

This column is not mandatory.

Examples:

- `Fix Limondale BESS`
- `New`
- `New limit for commissioning of PEC2`
- `New, CCR10205`
- `New, CCR10207`
- `New, CCR10216`
- `New, CCR10237`
- `Updated for PEC stage 2 commissioning - tune PD/ST and fix Limondale BESS`
- `Updated for PEC stage 2 commissioning and fix Limondale BESS`
- `updated to include Townsville GT Syncon Status; CCR10257`

### REASON

> The contingency or reason for the constraint

SQL Type: `VARCHAR2(256)`
Polars Type: `str`

This column is not mandatory.

Examples:

- `Check calc for Townsville GT Unit 1 online (PREDISPATCH)`
- `Check status of NQ WAMPAC`
- `Check status of Stanwell, Callide B, Gladstone, Kareeya, NQ demand, Ross+FNQ demand, NQ WAMPAC`
- `Check status of Stanwell, Callide, Gladstone, Haughton Syncon, NQ demand, Ross+FNQ demand`
- `Check status of Stanwell, Callide, Gladstone, Kareeya, Haughton Syncon, NQ demand, Ross+FNQ demand`
- `Check status of Stanwell, Callide, Gladstone, Kareeya, NQ demand, Ross+FNQ demand`
- `Check status of Stanwell, Callide, Gladstone, Kareeya, NQ demand, Ross+FNQ demand,Haughton Syncon`
- `Check status of Stanwell, Callide, Gladstone, Kareeya, NQ demand, Ross+FNQ demand,Haughton syncon`
- `Check status of Stanwell, Callide, Gladstone, Kareeya,Townsville GT, NQ demand, Ross+FNQ demand`
- `Check status of Stanwell, Callide, Gladstone, NQ demand, Ross+FNQ demand`

### SOURCE

> The source of the constraint formulation

SQL Type: `VARCHAR2(128)`
Polars Type: `str`

This column is not mandatory.

Examples:

- `AEMO`
- `Powerlink`
- `Transgrid`

## New Data Timing

> When new a generic equation is created

## Code Examples

### Polars

Explicitly listing every column, casting to enums, categoricals etc is not essential, but may speed up parsing.
Swapping `int` for `pl.UInt16`, `pl.Int32` would also speed up parsing. However some of the datatypes are inferred, so they may be wrong.

This code deduplicates for you.
Deduplication is normally only required across multiple months.

This code assumes that all columns are present, which may not be true for older files.

```python
import polars as pl
import polars.selectors as cs

# e.g. "2029/03/15 00:05:00"
dt_s_fmt = "%Y/%m/%d %H:%M:%S"

csv_paths = ["SOMEFILE.CSV", "OTHERFILE.CSV"]

lf = (
    pl.concat(
        [
            pl.scan_csv(
                csv_path,  # must be unzipped beforehand
                skip_rows=1,  # skip the header
                infer_schema=False,  # much faster
            )
            .filter(cs.by_index(0) == "D")  # drop the footer
            .select(~cs.by_index(range(4)))  # drop metadata columns
            for csv_path in csv_paths
        ],
        how="diagonal_relaxed",
    )
    .with_columns(
        pl.col("LASTCHANGED").str.strptime(pl.Datetime, dt_s_fmt),
    )
    .cast(
        {
            "EQUATIONID": str,
            "ADDITIONALNOTES": str,
            "DESCRIPTION": str,
            "IMPACT": str,
            "LIMITTYPE": pl.Categorical,
            "MODIFICATIONS": str,
            "REASON": str,
            "SOURCE": str,
        }
    )
    # Deduplicate
    # We want one row per ['EQUATIONID']
    # Tie-breaker: greatest value of ['LASTCHANGED']
    .sort(["LASTCHANGED"], descending=False)
    .unique(subset=["EQUATIONID"], keep="last")
)

```

### Nemosis

This table is not yet available in [Nemosis](https://github.com/UNSW-CEEM/NEMOSIS/#static_table).

## Example File

From [PUBLIC_ARCHIVE_GENERICEQUATIONDESC_FILE01_202609010000.zip](https://www.nemweb.com.au/Data_Archive/Wholesale_Electricity/MMSDM/2026/MMSDM_2026_09/MMSDM_Historical_Data_SQLLoader/DATA/PUBLIC_ARCHIVE%23GENERICEQUATIONDESC%23FILE01%23202609010000.zip)

=== "Raw Text with Metadata"
    ```csv
    C,SETP.WORLD,DVD_GENERICEQUATIONDESC,AEMO,PUBLIC,2026/10/09,15:36:57,001791524217896,MONTHLY_ARCHIVE,001791524217896
    I,GEQDESC,NULL,2,EQUATIONID,DESCRIPTION,LASTCHANGED,IMPACT,SOURCE,LIMITTYPE,REASON,MODIFICATIONS,ADDITIONALNOTES
    D,GEQDESC,NULL,2,X-7C2K350N_DS,"if >=2 Stanwell, >=3 Stanwell+Callide, >=2 Callide+Gladstone, >=7 Stanwell+Callide+Gladstone, >=2 Kareeya, >=350 NQ demand, >=150 Ross+FNQ demand and Night check is true: return 1 else 0;   NOTE: DISPATCH","2026/09/01 14:56:19","Qld Generation",Powerlink,"System Strength","Check status of Stanwell, Callide, Gladstone, Kareeya, NQ demand, Ross+FNQ demand","New, CCR10205","A50 row 3, ver30"
    D,GEQDESC,NULL,2,X-7C2K350N_PD,"if >=2 Stanwell, >=3 Stanwell+Callide, >=2 Callide+Gladstone, >=7 Stanwell+Callide+Gladstone, >=2 Kareeya, >=350 NQ demand, >=150 Ross+FNQ demand and Night check is true: return 1 else 0;   NOTE: PREDISPATCH","2026/09/01 14:56:19","Qld Generation",Powerlink,"System Strength","Check status of Stanwell, Callide, Gladstone, Kareeya, NQ demand, Ross+FNQ demand","New, CCR10205","A50 row 3, ver30"
    D,GEQDESC,NULL,2,X-7C2K350N_ST,"if >=2 Stanwell, >=3 Stanwell+Callide, >=2 Callide+Gladstone, >=7 Stanwell+Callide+Gladstone, >=2 Kareeya, >=350 NQ demand, >=150 Ross+FNQ demand and Night check is true: return 1 else 0;   NOTE: PASA ","2026/09/01 14:56:19","Qld Generation",Powerlink,"System Strength","Check status of Stanwell, Callide, Gladstone, Kareeya, NQ demand, Ross+FNQ demand","New, CCR10205","A50 row 3, ver30"
    D,GEQDESC,NULL,2,X-7C2K350_DS,"if >=2 Stanwell, >=3 Stanwell+Callide, >=2 Callide+Gladstone, >=7 Stanwell+Callide+Gladstone, >=2 Kareeya, >=350 NQ demand, >=150 Ross+FNQ demand: return 1 else 0;   NOTE: DISPATCH","2026/09/01 14:56:19","Qld Generation",Powerlink,"System Strength","Check status of Stanwell, Callide, Gladstone, Kareeya, NQ demand, Ross+FNQ demand","New, CCR10205","A50 row 1, ver 30"
    D,GEQDESC,NULL,2,X-7C2K350_PD,"if >=2 Stanwell, >=3 Stanwell+Callide, >=2 Callide+Gladstone, >=7 Stanwell+Callide+Gladstone, >=2 Kareeya, >=350 NQ demand, >=150 Ross+FNQ demand: return 1 else 0;   NOTE: PREDISPATCH","2026/09/01 14:56:19","Qld Generation",Powerlink,"System Strength","Check status of Stanwell, Callide, Gladstone, Kareeya, NQ demand, Ross+FNQ demand","New, CCR10205","A50 row 1, ver 30"
    D,GEQDESC,NULL,2,X-7C2K350_ST,"if >=2 Stanwell, >=3 Stanwell+Callide, >=2 Callide+Gladstone, >=7 Stanwell+Callide+Gladstone, >=2 Kareeya, >=350 NQ demand, >=150 Ross+FNQ demand: return 1 else 0;   NOTE: PASA ","2026/09/01 14:56:19","Qld Generation",Powerlink,"System Strength","Check status of Stanwell, Callide, Gladstone, Kareeya, NQ demand, Ross+FNQ demand","New, CCR10205","A50 row 1, ver 30"
    D,GEQDESC,NULL,2,X-7C2KH350_DS,"if >=2 Stanwell, >=3 Stanwell+Callide, >=2 Callide+Gladstone, >=7 Stanwell+Callide+Gladstone, >=2 Kareeya,Haughton syncon IS, >=350 NQ demand, >=150 Ross+FNQ demand: return 1 else 0;   NOTE: DISPATCH","2026/09/01 14:56:19","Qld Generation",Powerlink,"System Strength","Check status of Stanwell, Callide, Gladstone, Kareeya, NQ demand, Ross+FNQ demand,Haughton syncon","New, CCR10205","A5 row 2, ver 30"
    D,GEQDESC,NULL,2,X-7C2KH350_PD,"if >=2 Stanwell, >=3 Stanwell+Callide, >=2 Callide+Gladstone, >=7 Stanwell+Callide+Gladstone, >=2 Kareeya,Haughton syncon IS, >=350 NQ demand, >=150 Ross+FNQ demand: return 1 else 0;   NOTE: PREDISPATCH","2026/09/01 14:56:19","Qld Generation",Powerlink,"System Strength","Check status of Stanwell, Callide, Gladstone, Kareeya, NQ demand, Ross+FNQ demand,Haughton syncon","New, CCR10205","A5 row 2, ver 30"
    D,GEQDESC,NULL,2,X-7C2KH350_ST,"if >=2 Stanwell, >=3 Stanwell+Callide, >=2 Callide+Gladstone, >=7 Stanwell+Callide+Gladstone, >=2 Kareeya, >=350 NQ demand, >=150 Ross+FNQ demand: return 1 else 0;   NOTE: PASA ","2026/09/01 14:56:19","Qld Generation",Powerlink,"System Strength","Check status of Stanwell, Callide, Gladstone, Kareeya, NQ demand, Ross+FNQ demand","New, CCR10205","A5 row 2, ver 30"
    D,GEQDESC,NULL,2,X-7CH50(2G)_DS,"if >=2 Stanwell, >=3 Stanwell+Callide, >= 2 Glad, >=7 Stanwell+Callide+Gladstone, >=1 Haughton Syncon, >=50 NQ demand, >=0 Ross+FNQ demand: return 1 else 0;   NOTE: DISPATCH","2026/09/01 14:56:19","Qld Generation",Powerlink,"System Strength","Check status of Stanwell, Callide, Gladstone, Haughton Syncon, NQ demand, Ross+FNQ demand","New, CCR10205","A17.b row 3 Ver 30"
    D,GEQDESC,NULL,2,X-7CH50(2G)_PD,"if >=2 Stanwell, >=3 Stanwell+Callide, >= 2 Glad, >=7 Stanwell+Callide+Gladstone, >=1 Haughton Syncon, >=50 NQ demand, >=0 Ross+FNQ demand: return 1 else 0;   NOTE:PRE DISPATCH","2026/09/01 14:56:19","Qld Generation",Powerlink,"System Strength","Check status of Stanwell, Callide, Gladstone, Haughton Syncon, NQ demand, Ross+FNQ demand","New, CCR10205","A17.b row 3 Ver 30"
    ...
    C,"END OF REPORT",62
    ```

## Availability

Visibility: Public

This table is in the public monthly [MMSDM archive](https://www.nemweb.com.au/Data_Archive/Wholesale_Electricity/MMSDM/).

I have collated the list of all those files into one place, in [this CSV metadata file](../../manifests/per_table/csv/GENERICEQUATIONDESC.csv). (Columns `year`, `month`, `url`, `compressed_size` in bytes).

The earliest available data is month 1 of 2015.
The most recent available data is month 9 of 2026.

!!! warning Warning
    There are some months with no files.

## Data Size

Each year of data is approximately
28 KB when zipped,
276 KB as unzipped CSV.

## Deduplication and PDR Loader Configuration

The primary keys are:

- [`EQUATIONID`](#equationid)

The transaction type is ["INSERT-UPDATE"](https://di-help.docs.public.aemo.com.au/Content/pdrLoader/How_it_works.htm?TocPath=pdrLoader%7CAbout+pdrLoader%7C_____5#UPDATEINSERT), which means that you will likely see duplicate data with different values.

You should deduplicate by sorting based on `LASTCHANGED`, within each group of primary keys.

[PDR Loader configuration](https://nemweb.com.au/Reports/Current/MMSDataModelReport/PDRCONFIG/PROD_PUBLIC_PDR_CONFIG_FULL.zip) is:

| Report Name | Report Subtype | Version |
|---------------|-------------------|-----------|
| GEQDESC | NULL  | 1 |
| GEQDESC | NULL  | 2 |

This means that the CSV files start with metadata columns:

```csv
I,GEQDESC,NULL,1,...
D,GEQDESC,NULL,1,...
```

or

```csv
I,GEQDESC,NULL,2,...
D,GEQDESC,NULL,2,...
```

`ROW_FILTER_TYPE` is LASTCHANGED

## Indexes

- [`LASTCHANGED`](#lastchanged)

## Links

[This page as JSON](../json/tables/GENERICEQUATIONDESC/bespoke.json) (schema documented [here](https://gitlab.com/MatthewDavis/mms-schema/-/blob/master/schema.py?ref_type=heads), but may change)

Download a [JSON Schema](../json/tables/GENERICEQUATIONDESC/json-schema.json) specification for this table.

[Official AEMO schema documentation](https://nemweb.com.au/Reports/Current/MMSDataModelReport/Electricity/ElectricityDataModelReport_files/Elec29.htm#54)

## Other Information

Package: [GENERIC_CONSTRAINT](../packages/GENERIC_CONSTRAINT.md)
