# STPASA_CASESOLUTION

> STPASA_CASESOLUTION holds one record containing results pertaining to each entire solution

> STPASA_CASESOLUTION is public data.
> 
> Source
> 
> STPASA_CASESOLUTION is updated each STPASA run (i.e. every 2 hours).
> 
> Volume
> 
> Rows per day: 12
> 
> Mb per month: \<1

## Column Schema

### RUN_DATETIME

> Unique Timestamp Identifier for this study

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

This column is mandatory, and a primary key.

Example: `2026/09/01 01:00:00`

### CAPACITYOBJFUNCTION

> Objective Function from the Capacity Adequacy run

SQL Type: `NUMBER(12,3)`
Polars Type: `pl.Float64`

This column is not mandatory.

Examples:
`2958182.898`, `3572247`, `4436203.909`

### CAPACITYOPTION

> Not populated as of 2005 End of Year Release; was the demand forecast used for capacity adequacy assessment. 0 if no assessment, 1 for 10%, 2 for 50%, 3 for 90%

SQL Type: `NUMBER(12,3)`
Polars Type: `pl.Float64`

This column is not mandatory.

Example: `0`

### INTERCONNECTORFLOWPENALTY

> The penalty for non-zero interconnector flow

SQL Type: `NUMBER(12,3)`
Polars Type: `pl.Float64`

This column is not mandatory.

Example: `4.64`

### LASTCHANGED

> Date and time the record was created or modified

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 01:08:48`

### LORCAPACITYOPTION

> Generation Availability to be used in LOR run (either PASA or MARKET)

The SQL type is `VARCHAR2(10)`.
This is actually a factor/enum, with values:

- `PASA`

- `MARKET`

- `Market`

This column is not mandatory.

### LORCONDITION

> Lack of Reserve Condition (LOR) flag for the case indicates the most severe condition in the case (3 = LOR3, 2 = LOR2, 1 = LOR1, 0 = No LOR)

SQL Type: `NUMBER(1,0)`
Polars Type: `pl.Boolean`

This column is not mandatory.

Example: `0`

### LORDEMANDOPTION

> Specifies the Probability of Exceedence (POE) demand forecast for LOR assessment (0 if no assessment, 10 for 10%, 50 for 50%, 90 for 90%)

SQL Type: `NUMBER(12,3)`
Polars Type: `pl.Float64`

This column is not mandatory.

Example: `50`

### LORUIGFOPTION

> UIGF POE forecast availability used for this option

SQL Type: `NUMBER(3,0)`
Polars Type: `pl.UInt16`

This column is not mandatory.

Example: `50`

### MAXSURPLUSRESERVEOPTION

> Not populated as of 2005 End of Year Release; was the demand forecast used for assessment of Maximum surplus Reserve. 0 if no assessment, 1 for 10%, 2 for 50%, 3 for 90%

SQL Type: `NUMBER(12,3)`
Polars Type: `pl.Float64`

This column is not mandatory.

Example: `0`

### OUTAGELRCCAPACITYOPTION

> Generation Availability to be used in Outage LRC run (either PASA or MARKET)

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

This column is not mandatory.

Example: `Market`

### OUTAGELRCDEMANDOPTION

> Specifies the Probability of Exceedence (POE) demand forecast for outage LRC assessment (0 if no assessment, 10 for 10%, 50 for 50%, 90 for 90%)

SQL Type: `NUMBER(12,3)`
Polars Type: `pl.Float64`

This column is not mandatory.

Example: `10`

### OUTAGELRCUIGFOPTION

> UIGF POE forecast availability used for this option

SQL Type: `NUMBER(3,0)`
Polars Type: `pl.UInt16`

This column is not mandatory.

Example: `90`

### PASAVERSION

> Version of the PASA solver used to solve this case

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

This column is not mandatory.

Example: `7.4.4.0`

### RELIABILITYLRCCAPACITYOPTION

> Generation Availability to be used in Reliability LRC run (either PASA or MARKET)

The SQL type is `VARCHAR2(10)`.
This is actually a factor/enum, with values:

- `PASA`

- `MARKET`

- `Market`

This column is not mandatory.

### RELIABILITYLRCDEMANDOPTION

> Specifies the Probability of Exceedence (POE) demand forecast for Reliability LRC assessment (0 if no assessment, 10 for 10%, 50 for 50%, 90 for 90%)

SQL Type: `NUMBER(12,3)`
Polars Type: `pl.Float64`

This column is not mandatory.

Example: `10`

### RELIABILITYLRCUIGFOPTION

> UIGF POE forecast availability used for this option

SQL Type: `NUMBER(3,0)`
Polars Type: `pl.UInt16`

This column is not mandatory.

Example: `90`

### RESERVECONDITION

> Low Reserve Condition (LRC) flag for the case (1 - LRC in the case, 0 - No LRCs in the case) for capacity run

SQL Type: `NUMBER(1,0)`
Polars Type: `pl.Boolean`

This column is not mandatory.

Examples:
`0`, `1`

### MAXSPARECAPACITYOPTION {: .unused-column }

> Not populated as of 2005 End of Year Release; was the demand forecast used for assessment of Maximum Spare Capacity. 0 if no assessment, 1 for 10%, 2 for 50%, 3 for 90%

SQL Type: `NUMBER(12,3)`
Polars Type: `pl.Float64`

This column is unused.

Example: `0`

## New Data Timing

> After each STPASA run (every 2 hours)

## 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("RUN_DATETIME", "LASTCHANGED").str.strptime(pl.Datetime, dt_s_fmt),
    )
    # Polars can't cast string straight to bool. Need to go via something else.
    .cast({"LORCONDITION": pl.UInt8, "RESERVECONDITION": pl.UInt8})
    .cast(
        {
            "CAPACITYOBJFUNCTION": pl.Float64,
            "CAPACITYOPTION": pl.Float64,
            "INTERCONNECTORFLOWPENALTY": pl.Float64,
            "LORCAPACITYOPTION": pl.Enum(["PASA", "MARKET", "Market"]),
            "LORCONDITION": pl.Boolean,
            "LORDEMANDOPTION": pl.Float64,
            "LORUIGFOPTION": int,  # or pl.UInt16
            "MAXSURPLUSRESERVEOPTION": pl.Float64,
            "OUTAGELRCCAPACITYOPTION": str,
            "OUTAGELRCDEMANDOPTION": pl.Float64,
            "OUTAGELRCUIGFOPTION": int,  # or pl.UInt16
            "PASAVERSION": str,
            "RELIABILITYLRCCAPACITYOPTION": pl.Enum(["PASA", "MARKET", "Market"]),
            "RELIABILITYLRCDEMANDOPTION": pl.Float64,
            "RELIABILITYLRCUIGFOPTION": int,  # or pl.UInt16
            "RESERVECONDITION": pl.Boolean,
            "MAXSPARECAPACITYOPTION": pl.Float64,
        }
    )
    # Drop deprecated/unused columns
    .drop("MAXSPARECAPACITYOPTION")
    # Deduplicate
    # We want one row per ['RUN_DATETIME']
    # Tie-breaker: greatest value of ['LASTCHANGED']
    .sort(["LASTCHANGED"], descending=False)
    .unique(subset=["RUN_DATETIME"], keep="last")
)

```

### Nemosis

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

## Example File

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

=== "Raw Text with Metadata"
    ```csv
    C,SETP.WORLD,DVD_STPASA_CASESOLUTION,AEMO,PUBLIC,2026/10/09,16:34:19,001791527659426,MONTHLY_ARCHIVE,001791527659426
    I,STPASA,CASESOLUTION,3,RUN_DATETIME,PASAVERSION,RESERVECONDITION,LORCONDITION,CAPACITYOBJFUNCTION,CAPACITYOPTION,MAXSURPLUSRESERVEOPTION,MAXSPARECAPACITYOPTION,INTERCONNECTORFLOWPENALTY,LASTCHANGED,RELIABILITYLRCDEMANDOPTION,OUTAGELRCDEMANDOPTION,LORDEMANDOPTION,RELIABILITYLRCCAPACITYOPTION,OUTAGELRCCAPACITYOPTION,LORCAPACITYOPTION,LORUIGFOPTION,RELIABILITYLRCUIGFOPTION,OUTAGELRCUIGFOPTION
    D,STPASA,CASESOLUTION,3,"2026/09/01 01:00:00",7.4.4.0,0,0,3922347.381,0,0,0,4.64,"2026/09/01 01:08:48",10,10,50,Market,Market,Market,50,90,90
    D,STPASA,CASESOLUTION,3,"2026/09/01 02:00:00",7.4.4.0,0,0,3933006.12,0,0,0,4.64,"2026/09/01 02:08:59",10,10,50,Market,Market,Market,50,90,90
    D,STPASA,CASESOLUTION,3,"2026/09/01 05:00:00",7.4.4.0,0,0,3927558.451,0,0,0,4.64,"2026/09/01 05:08:57",10,10,50,Market,Market,Market,50,90,90
    D,STPASA,CASESOLUTION,3,"2026/09/01 07:00:00",7.4.4.0,0,0,3940963.337,0,0,0,4.64,"2026/09/01 07:08:39",10,10,50,Market,Market,Market,50,90,90
    D,STPASA,CASESOLUTION,3,"2026/09/01 10:00:00",7.4.4.0,0,0,4377256.951,0,0,0,4.64,"2026/09/01 10:08:54",10,10,50,Market,Market,Market,50,90,90
    D,STPASA,CASESOLUTION,3,"2026/09/01 11:00:00",7.4.4.0,0,0,4382266.208,0,0,0,4.64,"2026/09/01 11:08:33",10,10,50,Market,Market,Market,50,90,90
    D,STPASA,CASESOLUTION,3,"2026/09/01 19:00:00",7.4.4.0,0,0,3924601.563,0,0,0,4.64,"2026/09/01 19:08:44",10,10,50,Market,Market,Market,50,90,90
    D,STPASA,CASESOLUTION,3,"2026/09/01 23:00:00",7.4.4.0,1,0,4010097.223,0,0,0,4.64,"2026/09/01 23:08:45",10,10,50,Market,Market,Market,50,90,90
    D,STPASA,CASESOLUTION,3,"2026/09/02 00:00:00",7.4.4.0,1,0,4016698.021,0,0,0,4.64,"2026/09/02 00:08:57",10,10,50,Market,Market,Market,50,90,90
    D,STPASA,CASESOLUTION,3,"2026/09/01 03:00:00",7.4.4.0,0,0,3939778.797,0,0,0,4.64,"2026/09/01 03:08:40",10,10,50,Market,Market,Market,50,90,90
    D,STPASA,CASESOLUTION,3,"2026/09/01 04:00:00",7.4.4.0,0,0,3927709.134,0,0,0,4.64,"2026/09/01 04:08:56",10,10,50,Market,Market,Market,50,90,90
    ...
    C,"END OF REPORT",723
    ```

## 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/STPASA_CASESOLUTION.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.

 Every month in between has a file. (No gaps.)

## Data Size

Each year of data is approximately
138 KB when zipped,
1 MB as unzipped CSV.

## Deduplication and PDR Loader Configuration

The primary keys are:

- [`RUN_DATETIME`](#run_datetime)

The transaction type is ["insert"](https://di-help.docs.public.aemo.com.au/Content/pdrLoader/How_it_works.htm?TocPath=pdrLoader%7CAbout+pdrLoader%7C_____5#INSERT), which means that you will usually not see duplicate data.
If you do, you can deduplicate based on the primary keys, without sorting first.
Rows from different files with the same primary keys should have the same values.

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

| Report Name | Report Subtype | Version |
|---------------|-------------------|-----------|
| STPASA | CASESOLUTION  | 3 |

This means that the CSV files start with metadata columns:

```csv
I,STPASA,CASESOLUTION,3,...
D,STPASA,CASESOLUTION,3,...
```

## Indexes

- [`LASTCHANGED`](#lastchanged)

## Links

[This page as JSON](../json/tables/STPASA_CASESOLUTION/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/STPASA_CASESOLUTION/json-schema.json) specification for this table.

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

## Other Information

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