# PREDISPATCHCASESOLUTION

> PREDISPATCHCASESOLUTION provides information relating to the complete predispatch run. The fields provide an overview of the dispatch run results allowing immediate identification of conditions such as energy or FCAS deficiencies.

> PREDISPATCHCASESOLUTION data is public, so is available to all
> participants.
> 
> Source
> 
> PREDISPATCHCASESOLUTION updates every half-hour.
> 
> Volume
> 
> Approximately 48 records per day.

## Column Schema

### PREDISPATCHSEQNO

> Unique identifier of predispatch run in the form YYYYMMDDPP with 01 at 04:30

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

This column is mandatory, and a primary key.

Examples:

- `2026090101`
- `2026092140`

### RUNNO

> Predispatch run no, normally 1.

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

This column is mandatory, and a primary key.

Example: `1`

### INTERVENTION

> Flag to indicate if this Pre-Dispatch case includes an intervention pricing run: 0 = case does not include an intervention pricing run, 1 = case does include an intervention pricing run. This field has a default value of 0 and is not nullable

!!! danger "Warning"
    Unlike most tables with an INTERVENTION column, INTERVENTION is not a primary key of PREDISPATCHCASESOLUTION.

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

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

This column is not mandatory.

Example: `0`

### 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 04:02:00`

### NONPHYSICALLOSSES

> Non-Physical Losses algorithm invoked during this run

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

This column is not mandatory.

Example: `0`

### SOLUTIONSTATUS

> If non-zero indicated one of the following conditions: 1 = Supply Scarcity, Excess generation or constraint violations, -X = Model failure

SQL Type: `NUMBER(2,0)`
Polars Type: `pl.Int8`

This column is not mandatory.

Examples:
`1`, `22`

### SPDVERSION

> Current version of SPD

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

This column is not mandatory.

### TOTAL5MINVIOLATION

> Total of 5 minute ancillary service region violations

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

This column is not mandatory.

### TOTAL6SECVIOLATION

> Total of 6 second ancillary service region violations

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

This column is not mandatory.

### TOTAL60SECVIOLATION

> Total of 60 second ancillary service region violations

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

This column is not mandatory.

### TOTALAREAGENVIOLATION

> Total Region Demand violations

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

This column is not mandatory.

Example: `0`

### TOTALASPROFILEVIOLATION

> Total of ancillary service trader profile violations

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

This column is not mandatory.

Example: `0`

### TOTALENERGYCONSTRVIOLATION

> Total of Energy Constrained unit offer violations.

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

This column is not mandatory.

Examples:
`0`, `20`

### TOTALENERGYOFFERVIOLATION

> Total of unit summated offer band violations

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

This column is not mandatory.

Example: `0`

### TOTALGENERICVIOLATION

> Total generic constraint violations

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

This column is not mandatory.

Examples:
`0.002`, `0`, `10`, `1763`

### TOTALINTERCONNECTORVIOLATION

> Total interconnector violations

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

This column is not mandatory.

Example: `0`

### TOTALOBJECTIVE

> The Objective function from the LP

SQL Type: `NUMBER(27,10)`
Polars Type: `pl.Float64`

This column is not mandatory.

Examples:
`-1345204.551`, `348809.312`, `1183428804`, `84699544014.542`

### TOTALRAMPRATEVIOLATION

> Total ramp rate violations

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

This column is not mandatory.

Examples:
`0.306`, `0`, `0.79`

### TOTALREGVIOLATION

> Total of Regulation ancillary service region violations

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

This column is not mandatory.

### TOTALUNITMWCAPACITYVIOLATION

> Total unit capacity violations

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

This column is not mandatory.

Examples:
`0.4`, `0`, `7`, `1698`

## New Data Timing

> Every 30 minutes

## 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),
    )
    # Polars can't cast string straight to bool. Need to go via something else.
    .cast({"INTERVENTION": pl.UInt8})
    .cast(
        {
            "PREDISPATCHSEQNO": str,
            "RUNNO": int,  # or pl.UInt16
            "INTERVENTION": pl.Boolean,
            "NONPHYSICALLOSSES": int,  # or pl.Int8
            "SOLUTIONSTATUS": int,  # or pl.Int8
            "SPDVERSION": str,
            "TOTAL5MINVIOLATION": pl.Float64,
            "TOTAL6SECVIOLATION": pl.Float64,
            "TOTAL60SECVIOLATION": pl.Float64,
            "TOTALAREAGENVIOLATION": pl.Float64,
            "TOTALASPROFILEVIOLATION": pl.Float64,
            "TOTALENERGYCONSTRVIOLATION": pl.Float64,
            "TOTALENERGYOFFERVIOLATION": pl.Float64,
            "TOTALGENERICVIOLATION": pl.Float64,
            "TOTALINTERCONNECTORVIOLATION": pl.Float64,
            "TOTALOBJECTIVE": pl.Float64,
            "TOTALRAMPRATEVIOLATION": pl.Float64,
            "TOTALREGVIOLATION": pl.Float64,
            "TOTALUNITMWCAPACITYVIOLATION": pl.Float64,
        }
    )
    # Deduplicate
    # We want one row per ['PREDISPATCHSEQNO', 'RUNNO']
    # Tie-breaker: greatest value of ['LASTCHANGED']
    .sort(["LASTCHANGED"], descending=False)
    .unique(subset=["PREDISPATCHSEQNO", "RUNNO"], keep="last")
)

```

### Nemosis

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

## Example File

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

=== "Raw Text with Metadata"
    ```csv
    C,SETP.WORLD,DVD_PREDISPATCHCASESOLUTION,AEMO,PUBLIC,2026/10/09,16:26:59,001791527219617,MONTHLY_ARCHIVE,001791527219617
    I,PREDISPATCH,CASE_SOLUTION,1,PREDISPATCHSEQNO,RUNNO,SOLUTIONSTATUS,SPDVERSION,NONPHYSICALLOSSES,TOTALOBJECTIVE,TOTALAREAGENVIOLATION,TOTALINTERCONNECTORVIOLATION,TOTALGENERICVIOLATION,TOTALRAMPRATEVIOLATION,TOTALUNITMWCAPACITYVIOLATION,TOTAL5MINVIOLATION,TOTALREGVIOLATION,TOTAL6SECVIOLATION,TOTAL60SECVIOLATION,TOTALASPROFILEVIOLATION,TOTALENERGYCONSTRVIOLATION,TOTALENERGYOFFERVIOLATION,LASTCHANGED,INTERVENTION
    D,PREDISPATCH,CASE_SOLUTION,1,2026090101,1,1,,0,4147336767.601,0,0,0,0,9.6,,,,,0,0,0,"2026/09/01 04:02:00",0
    D,PREDISPATCH,CASE_SOLUTION,1,2026090102,1,1,,0,3430179689.92,0,0,0,0,14.1,,,,,0,0,0,"2026/09/01 04:32:00",0
    D,PREDISPATCH,CASE_SOLUTION,1,2026090103,1,1,,0,4353343053.22,0,0,0,0,0,,,,,0,0,0,"2026/09/01 05:02:01",0
    D,PREDISPATCH,CASE_SOLUTION,1,2026090104,1,1,,0,4388635493.421,0,0,0,0,0,,,,,0,0,0,"2026/09/01 05:32:02",0
    D,PREDISPATCH,CASE_SOLUTION,1,2026090105,1,1,,0,5519041407.274,0,0,0,0.306,4.4,,,,,0,0,0,"2026/09/01 06:02:03",0
    D,PREDISPATCH,CASE_SOLUTION,1,2026090106,1,1,,0,5464215728.184,0,0,0,0,8.6,,,,,0,0,0,"2026/09/01 06:32:04",0
    D,PREDISPATCH,CASE_SOLUTION,1,2026090107,1,1,,0,7408821235.384,0,0,0,0,0,,,,,0,0,0,"2026/09/01 07:01:49",0
    D,PREDISPATCH,CASE_SOLUTION,1,2026090108,1,1,,0,5917402635.745,0,0,0,0,0,,,,,0,0,0,"2026/09/01 07:31:50",0
    D,PREDISPATCH,CASE_SOLUTION,1,2026090109,1,1,,0,4799217817.124,0,0,0,0,0,,,,,0,0,0,"2026/09/01 08:01:51",0
    D,PREDISPATCH,CASE_SOLUTION,1,2026090110,1,1,,0,3357003296.661,0,0,0,0,0,,,,,0,0,0,"2026/09/01 08:31:51",0
    D,PREDISPATCH,CASE_SOLUTION,1,2026090111,1,1,,0,3610969902.59,0,0,0,0,0,,,,,0,0,0,"2026/09/01 09:01:52",0
    ...
    C,"END OF REPORT",1003
    ```

## 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/PREDISPATCHCASESOLUTION.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
383 KB when zipped,
4 MB as unzipped CSV.

## Deduplication and PDR Loader Configuration

The primary keys are:

- [`PREDISPATCHSEQNO`](#predispatchseqno)

- [`RUNNO`](#runno)

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 |
|---------------|-------------------|-----------|
| PREDISPATCH | CASE_SOLUTION  | 1 |

This means that the CSV files start with metadata columns:

```csv
I,PREDISPATCH,CASE_SOLUTION,1,...
D,PREDISPATCH,CASE_SOLUTION,1,...
```

## Indexes

- [`LASTCHANGED`](#lastchanged)

## Links

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

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

## Other Information

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