# PASAREGIONSOLUTION

> PASAREGIONSOLUTION shows the Regional solution for ST PASA showing reserves for each half-hour period. This table (PASAREGIONSOLUTION_D) shows the latest calculated result for each period.

!!! tip "Deprecation Warning"
    This table is in the [HISTORICAL TABLES](../packages/HISTORICAL TABLES.md) package,
    so is likely deprecated.

> PASAREGIONSOLUTION is obsolete on 27 March 2002.
> 
> PASAREGIONSOLUTION is public data, so is available to all participants.
> 
> Source
> 
> PASAREGIONSOLUTION is not used; was updated every 2 hours.

## Column Schema

### PERIODID

> PASA Interval (48 half hours)

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

This column is mandatory, and a primary key.

### REGIONID

> Region Identifier

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

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

- `QLD1`

- `VIC1`

- `TAS1`

- `NSW1`

- `SA1`

- `SNOWY1`

This column is mandatory, and a primary key.

### CAPACITYREQUIRED

> Trading interval demand for the region that has a 10% probability of being exceeded, plus the medium term capacity reserve standard.

SQL Type: `NUMBER(15,5)`
Polars Type: `pl.Float64`

This column is not mandatory.

### CAPACITYSURPLUS

> Surplus capacity

SQL Type: `NUMBER(16,6)`
Polars Type: `pl.Float64`

This column is not mandatory.

### CASEID

> PASA Case Identifier

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

This column is mandatory (but not a primary key).

### CONSTRAINEDCAPACITY

> Constrained capacity

SQL Type: `NUMBER(16,6)`
Polars Type: `pl.Float64`

This column is not mandatory.

### DATETIME

> Date and time of the end of the period

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

This column is not mandatory.

Example: `2026/01/20 00:05:00`

### DEMAND10

> 10% exceedence forecast

SQL Type: `NUMBER(16,6)`
Polars Type: `pl.Float64`

This column is not mandatory.

### DEMAND50

> 50% exceedence forecast

SQL Type: `NUMBER(16,6)`
Polars Type: `pl.Float64`

This column is not mandatory.

### DEMAND90

> 90% exceedence forecast

SQL Type: `NUMBER(16,6)`
Polars Type: `pl.Float64`

This column is not mandatory.

### ENERGYREQUIRED

> Total amount of energy required for the reported day

SQL Type: `NUMBER(15,5)`
Polars Type: `pl.Float64`

This column is not mandatory.

### EXCESSGENERATION

> Excess generation in period OR Deficit generation if VoLL

SQL Type: `NUMBER(22,0)`
Polars Type: `pl.Int128`

This column is not mandatory.

### 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/01/20 00:05:00`

### LOADREJECTIONRESERVEREQ

> Load rejection reserve requirement

SQL Type: `NUMBER(16,6)`
Polars Type: `pl.Float64`

This column is not mandatory.

### LOADREJECTIONRESERVESURPLUS

> Load rejection reserve surplus

SQL Type: `NUMBER(16,6)`
Polars Type: `pl.Float64`

This column is not mandatory.

### NETINTERCHANGEUNDEREXCESS

> Net interchange excess

SQL Type: `NUMBER(16,6)`
Polars Type: `pl.Float64`

This column is not mandatory.

### NETINTERCHANGEUNDERSCARCITY

> Net interchange scarcity

SQL Type: `NUMBER(16,6)`
Polars Type: `pl.Float64`

This column is not mandatory.

### RESERVECONDITION

> Reserve condition

SQL Type: `NUMBER(16,6)`
Polars Type: `pl.Float64`

This column is not mandatory.

### RESERVEREQ

> Reserve requirement

SQL Type: `NUMBER(16,6)`
Polars Type: `pl.Float64`

This column is not mandatory.

### RESERVESURPLUS

> Reserve surplus

SQL Type: `NUMBER(16,6)`
Polars Type: `pl.Float64`

This column is not mandatory.

### UNCONSTRAINEDCAPACITY

> Unconstrained capacity

SQL Type: `NUMBER(16,6)`
Polars Type: `pl.Float64`

This column is not mandatory.

## 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("DATETIME", "LASTCHANGED").str.strptime(pl.Datetime, dt_s_fmt),
    )
    .cast(
        {
            "PERIODID": str,
            "REGIONID": pl.Enum(["QLD1", "VIC1", "TAS1", "NSW1", "SA1", "SNOWY1"]),
            "CAPACITYREQUIRED": pl.Float64,
            "CAPACITYSURPLUS": pl.Float64,
            "CASEID": str,
            "CONSTRAINEDCAPACITY": pl.Float64,
            "DEMAND10": pl.Float64,
            "DEMAND50": pl.Float64,
            "DEMAND90": pl.Float64,
            "ENERGYREQUIRED": pl.Float64,
            "EXCESSGENERATION": int,  # or pl.Int128
            "LOADREJECTIONRESERVEREQ": pl.Float64,
            "LOADREJECTIONRESERVESURPLUS": pl.Float64,
            "NETINTERCHANGEUNDEREXCESS": pl.Float64,
            "NETINTERCHANGEUNDERSCARCITY": pl.Float64,
            "RESERVECONDITION": pl.Float64,
            "RESERVEREQ": pl.Float64,
            "RESERVESURPLUS": pl.Float64,
            "UNCONSTRAINEDCAPACITY": pl.Float64,
        }
    )
    # Deduplicate
    # We want one row per ['PERIODID', 'REGIONID']
    # Tie-breaker: greatest value of ['LASTCHANGED']
    .sort(["LASTCHANGED"], descending=False)
    .unique(subset=["PERIODID", "REGIONID"], keep="last")
)

```

### Nemosis

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

## Availability

AEMO's documentation states that this table's visibility is "Public".
However, it is not available in the public monthly [MMSDM archive](https://www.nemweb.com.au/Data_Archive/Wholesale_Electricity/MMSDM/).
AEMO probably call this public because it is available to all market participants over private FTP.

There is a chance that is is still public to non-participants.
It may only be available for some months; or (rarely) it may be available in a non-standard location.

## Deduplication and PDR Loader Configuration

The primary keys are:

- [`PERIODID`](#periodid)

- [`REGIONID`](#regionid)

PDR Loader configuration does not mention this table, so it is unclear how to choose which row to keep when there are multiple rows for a given set of primary keys.

You should probably take the row with the maximum `LASTCHANGED`.

## Indexes

- [`LASTCHANGED`](#lastchanged)

## Links

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

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

## Other Information

Package: [HISTORICAL TABLES](../packages/HISTORICAL TABLES.md)
