MTPASA_CONSTRAINTSOLUTION
MTPASA_CONSTRAINTSOLUTION is obsolete from 2017 End of Year DM4.27 Release. The MTPASA_CONSTRAINTSOLUTION table holds the binding and violated constraint results from the capacity evaluation, including the RHS value. Change Notice 379 announced the replacement of the MT PASA data model so all MTPASAxxx tables become obsolete, replaced by MTPASA_xxx tables.
Deprecation Warning
This table is in the HISTORICAL TABLES package, so is likely deprecated.
MTPASA_CONSTRAINTSOLUTION is public data.
Source
MTPASA_CONSTRAINTSOLUTION is updated each MTPASA run (i.e. weekly).
Volume
Rows per week: 230
To store only the latest solution, divide these figures by 5.
Column Schema
CONSTRAINTID
The unique identifier for the constraint
SQL Type: VARCHAR2(20)
Polars Type: pl.Categorical
This column is mandatory, and a primary key.
Examples:
MT_NSW_HEADROOMMT_QLD_0MT_Q^^NIL_CSMT_Q^^NIL_TRMT_SA_0MT_VIC_HEADROOMN>>N-NIL__H_15MN>N-NIL_LSDUN^^V_NIL_1V>>V_NIL_1A
DAY
Day this solution is for. Generated from the solution file periodid
SQL Type: DATE
Polars Type: pl.Datetime()
This column is mandatory, and a primary key.
Example: 2018/05/06 00:00:00
ENERGYBLOCK
Sunday at start of the week for this solutions energy block. Generated from the solution file energy block
SQL Type: DATE
Polars Type: pl.Datetime()
This column is mandatory, and a primary key.
Example: 2018/05/06 00:00:00
LDCBLOCK
LDC block this solution is for. Generated from the solution file periodid
SQL Type: NUMBER(3,0)
Polars Type: pl.Int16
This column is mandatory, and a primary key.
Example: 1
RUN_DATETIME
Date processing of the run begins
SQL Type: DATE
Polars Type: pl.Datetime()
This column is mandatory, and a primary key.
Example: 2018/05/01 12:00:00
RUN_NO
Unique run id. Generated from the solution file caseid
SQL Type: NUMBER(3,0)
Polars Type: pl.Int16
This column is mandatory, and a primary key.
Example: 20
RUNTYPE
Type of run. Values are RELIABILITY_LRC and OUTAGE_LRC
SQL Type: VARCHAR2(20)
Polars Type: pl.Categorical
This column is mandatory, and a primary key.
Example: RELIABILITY_LRC
CAPACITYMARGINALVALUE
Capacity adequacy assessment marginal value; 0 if not binding
SQL Type: NUMBER(12,2)
Polars Type: pl.Float64
This column is not mandatory.
Examples:
0.01, 0, 3, 14491.61
CAPACITYRHS
The RHS value in the capacity evaluation
SQL Type: NUMBER(12,2)
Polars Type: pl.Float64
This column is not mandatory.
Examples:
-0.05, 153.46, 0, 1705
CAPACITYVIOLATIONDEGREE
Capacity adequacy assessment violation degree; 0 if not violating
SQL Type: NUMBER(12,2)
Polars Type: pl.Float64
This column is not mandatory.
Example: 0
LASTCHANGED
Date the solution was loaded
For more information, see the dedicated documentation page.
SQL Type: DATE
Polars Type: pl.Datetime()
This column is not mandatory.
Example: 2018/05/01 12:31:15
Code Examples
Polars
Casting is 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.
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("DAY", "ENERGYBLOCK", "RUN_DATETIME", "LASTCHANGED").str.strptime(
pl.Datetime, dt_s_fmt
),
)
.cast(
{
"CONSTRAINTID": pl.Categorical,
"LDCBLOCK": int, # or pl.Int16
"RUN_NO": int, # or pl.Int16
"RUNTYPE": pl.Categorical,
"CAPACITYMARGINALVALUE": pl.Float64,
"CAPACITYRHS": pl.Float64,
"CAPACITYVIOLATIONDEGREE": pl.Float64,
}
)
# Deduplicate
# We want one row per ['CONSTRAINTID', 'DAY', 'ENERGYBLOCK', 'LDCBLOCK', 'RUN_DATETIME', 'RUN_NO', 'RUNTYPE']
# Tie-breaker: greatest value of ['LASTCHANGED']
.sort(["LASTCHANGED"], descending=False)
.unique(
subset=[
"CONSTRAINTID",
"DAY",
"ENERGYBLOCK",
"LDCBLOCK",
"RUN_DATETIME",
"RUN_NO",
"RUNTYPE",
],
keep="last",
)
)
Nemosis
This table is not yet available in Nemosis.
Example File
From PUBLIC_DVD_MTPASA_CONSTRAINTSOLUTION_201805010000.zip
| RUN_DATETIME | RUN_NO | ENERGYBLOCK | DAY | LDCBLOCK | CONSTRAINTID | CAPACITYRHS | CAPACITYMARGINALVALUE | CAPACITYVIOLATIONDEGREE | LASTCHANGED | RUNTYPE |
| 2018/05/01 12:00:00 | 20 | 2018/05/06 00:00:00 | 2018/05/06 00:00:00 | 1 | MT_NSW_HEADROOM | -330 | 2.85 | 0 | 2018/05/01 12:31:15 | RELIABILITY_LRC |
| 2018/05/01 12:00:00 | 20 | 2018/05/06 00:00:00 | 2018/05/06 00:00:00 | 1 | MT_QLD_0 | 0 | 2.85 | 0 | 2018/05/01 12:31:15 | RELIABILITY_LRC |
| 2018/05/01 12:00:00 | 20 | 2018/05/06 00:00:00 | 2018/05/06 00:00:00 | 1 | MT_Q^^NIL_TR | 6842.02 | 0.64 | 0 | 2018/05/01 12:31:15 | RELIABILITY_LRC |
| 2018/05/01 12:00:00 | 20 | 2018/05/06 00:00:00 | 2018/05/06 00:00:00 | 1 | MT_SA_0 | 0 | 0.27 | 0 | 2018/05/01 12:31:15 | RELIABILITY_LRC |
| 2018/05/01 12:00:00 | 20 | 2018/05/06 00:00:00 | 2018/05/07 00:00:00 | 1 | MT_NSW_HEADROOM | -330 | 2.91 | 0 | 2018/05/01 12:31:15 | RELIABILITY_LRC |
| 2018/05/01 12:00:00 | 20 | 2018/05/06 00:00:00 | 2018/05/07 00:00:00 | 1 | MT_Q^^NIL_TR | 6842.02 | 0.63 | 0 | 2018/05/01 12:31:15 | RELIABILITY_LRC |
| 2018/05/01 12:00:00 | 20 | 2018/05/06 00:00:00 | 2018/05/07 00:00:00 | 1 | MT_SA_0 | 0 | 0.24 | 0 | 2018/05/01 12:31:15 | RELIABILITY_LRC |
| 2018/05/01 12:00:00 | 20 | 2018/05/06 00:00:00 | 2018/05/07 00:00:00 | 1 | N>N-NIL_LSDU | -3.55 | 5.61 | 0 | 2018/05/01 12:31:15 | RELIABILITY_LRC |
| 2018/05/01 12:00:00 | 20 | 2018/05/06 00:00:00 | 2018/05/08 00:00:00 | 1 | MT_NSW_HEADROOM | -330 | 2.89 | 0 | 2018/05/01 12:31:15 | RELIABILITY_LRC |
| 2018/05/01 12:00:00 | 20 | 2018/05/06 00:00:00 | 2018/05/08 00:00:00 | 1 | MT_Q^^NIL_TR | 6842.02 | 0.72 | 0 | 2018/05/01 12:31:15 | RELIABILITY_LRC |
| 2018/05/01 12:00:00 | 20 | 2018/05/06 00:00:00 | 2018/05/08 00:00:00 | 1 | MT_SA_0 | 0 | 0.27 | 0 | 2018/05/01 12:31:15 | RELIABILITY_LRC |
| ... |
| C | SETP.WORLD | DVD_MTPASA_CONSTRAINTSOLUTION | AEMO | PUBLIC | 2018/06/07 | 00:35:03 | 0000000295553418 | 0000000295553313 | ||||||
| I | MTPASA | CONSTRAINTSOLUTION | 1 | RUN_DATETIME | RUN_NO | ENERGYBLOCK | DAY | LDCBLOCK | CONSTRAINTID | CAPACITYRHS | CAPACITYMARGINALVALUE | CAPACITYVIOLATIONDEGREE | LASTCHANGED | RUNTYPE |
| D | MTPASA | CONSTRAINTSOLUTION | 1 | 2018/05/01 12:00:00 | 20 | 2018/05/06 00:00:00 | 2018/05/06 00:00:00 | 1 | MT_NSW_HEADROOM | -330 | 2.85 | 0 | 2018/05/01 12:31:15 | RELIABILITY_LRC |
| D | MTPASA | CONSTRAINTSOLUTION | 1 | 2018/05/01 12:00:00 | 20 | 2018/05/06 00:00:00 | 2018/05/06 00:00:00 | 1 | MT_QLD_0 | 0 | 2.85 | 0 | 2018/05/01 12:31:15 | RELIABILITY_LRC |
| D | MTPASA | CONSTRAINTSOLUTION | 1 | 2018/05/01 12:00:00 | 20 | 2018/05/06 00:00:00 | 2018/05/06 00:00:00 | 1 | MT_Q^^NIL_TR | 6842.02 | 0.64 | 0 | 2018/05/01 12:31:15 | RELIABILITY_LRC |
| D | MTPASA | CONSTRAINTSOLUTION | 1 | 2018/05/01 12:00:00 | 20 | 2018/05/06 00:00:00 | 2018/05/06 00:00:00 | 1 | MT_SA_0 | 0 | 0.27 | 0 | 2018/05/01 12:31:15 | RELIABILITY_LRC |
| D | MTPASA | CONSTRAINTSOLUTION | 1 | 2018/05/01 12:00:00 | 20 | 2018/05/06 00:00:00 | 2018/05/07 00:00:00 | 1 | MT_NSW_HEADROOM | -330 | 2.91 | 0 | 2018/05/01 12:31:15 | RELIABILITY_LRC |
| D | MTPASA | CONSTRAINTSOLUTION | 1 | 2018/05/01 12:00:00 | 20 | 2018/05/06 00:00:00 | 2018/05/07 00:00:00 | 1 | MT_Q^^NIL_TR | 6842.02 | 0.63 | 0 | 2018/05/01 12:31:15 | RELIABILITY_LRC |
| D | MTPASA | CONSTRAINTSOLUTION | 1 | 2018/05/01 12:00:00 | 20 | 2018/05/06 00:00:00 | 2018/05/07 00:00:00 | 1 | MT_SA_0 | 0 | 0.24 | 0 | 2018/05/01 12:31:15 | RELIABILITY_LRC |
| D | MTPASA | CONSTRAINTSOLUTION | 1 | 2018/05/01 12:00:00 | 20 | 2018/05/06 00:00:00 | 2018/05/07 00:00:00 | 1 | N>N-NIL_LSDU | -3.55 | 5.61 | 0 | 2018/05/01 12:31:15 | RELIABILITY_LRC |
| D | MTPASA | CONSTRAINTSOLUTION | 1 | 2018/05/01 12:00:00 | 20 | 2018/05/06 00:00:00 | 2018/05/08 00:00:00 | 1 | MT_NSW_HEADROOM | -330 | 2.89 | 0 | 2018/05/01 12:31:15 | RELIABILITY_LRC |
| D | MTPASA | CONSTRAINTSOLUTION | 1 | 2018/05/01 12:00:00 | 20 | 2018/05/06 00:00:00 | 2018/05/08 00:00:00 | 1 | MT_Q^^NIL_TR | 6842.02 | 0.72 | 0 | 2018/05/01 12:31:15 | RELIABILITY_LRC |
| D | MTPASA | CONSTRAINTSOLUTION | 1 | 2018/05/01 12:00:00 | 20 | 2018/05/06 00:00:00 | 2018/05/08 00:00:00 | 1 | MT_SA_0 | 0 | 0.27 | 0 | 2018/05/01 12:31:15 | RELIABILITY_LRC |
| ... | ||||||||||||||
| C | END OF REPORT | 1003 |
RUN_DATETIME,RUN_NO,ENERGYBLOCK,DAY,LDCBLOCK,CONSTRAINTID,CAPACITYRHS,CAPACITYMARGINALVALUE,CAPACITYVIOLATIONDEGREE,LASTCHANGED,RUNTYPE
"2018/05/01 12:00:00",20,"2018/05/06 00:00:00","2018/05/06 00:00:00",1,MT_NSW_HEADROOM,-330,2.85,0,"2018/05/01 12:31:15",RELIABILITY_LRC
"2018/05/01 12:00:00",20,"2018/05/06 00:00:00","2018/05/06 00:00:00",1,MT_QLD_0,0,2.85,0,"2018/05/01 12:31:15",RELIABILITY_LRC
"2018/05/01 12:00:00",20,"2018/05/06 00:00:00","2018/05/06 00:00:00",1,MT_Q^^NIL_TR,6842.02,0.64,0,"2018/05/01 12:31:15",RELIABILITY_LRC
"2018/05/01 12:00:00",20,"2018/05/06 00:00:00","2018/05/06 00:00:00",1,MT_SA_0,0,0.27,0,"2018/05/01 12:31:15",RELIABILITY_LRC
"2018/05/01 12:00:00",20,"2018/05/06 00:00:00","2018/05/07 00:00:00",1,MT_NSW_HEADROOM,-330,2.91,0,"2018/05/01 12:31:15",RELIABILITY_LRC
"2018/05/01 12:00:00",20,"2018/05/06 00:00:00","2018/05/07 00:00:00",1,MT_Q^^NIL_TR,6842.02,0.63,0,"2018/05/01 12:31:15",RELIABILITY_LRC
"2018/05/01 12:00:00",20,"2018/05/06 00:00:00","2018/05/07 00:00:00",1,MT_SA_0,0,0.24,0,"2018/05/01 12:31:15",RELIABILITY_LRC
"2018/05/01 12:00:00",20,"2018/05/06 00:00:00","2018/05/07 00:00:00",1,N>N-NIL_LSDU,-3.55,5.61,0,"2018/05/01 12:31:15",RELIABILITY_LRC
"2018/05/01 12:00:00",20,"2018/05/06 00:00:00","2018/05/08 00:00:00",1,MT_NSW_HEADROOM,-330,2.89,0,"2018/05/01 12:31:15",RELIABILITY_LRC
"2018/05/01 12:00:00",20,"2018/05/06 00:00:00","2018/05/08 00:00:00",1,MT_Q^^NIL_TR,6842.02,0.72,0,"2018/05/01 12:31:15",RELIABILITY_LRC
"2018/05/01 12:00:00",20,"2018/05/06 00:00:00","2018/05/08 00:00:00",1,MT_SA_0,0,0.27,0,"2018/05/01 12:31:15",RELIABILITY_LRC
...
C,SETP.WORLD,DVD_MTPASA_CONSTRAINTSOLUTION,AEMO,PUBLIC,2018/06/07,00:35:03,0000000295553418,,0000000295553313
I,MTPASA,CONSTRAINTSOLUTION,1,RUN_DATETIME,RUN_NO,ENERGYBLOCK,DAY,LDCBLOCK,CONSTRAINTID,CAPACITYRHS,CAPACITYMARGINALVALUE,CAPACITYVIOLATIONDEGREE,LASTCHANGED,RUNTYPE
D,MTPASA,CONSTRAINTSOLUTION,1,"2018/05/01 12:00:00",20,"2018/05/06 00:00:00","2018/05/06 00:00:00",1,MT_NSW_HEADROOM,-330,2.85,0,"2018/05/01 12:31:15",RELIABILITY_LRC
D,MTPASA,CONSTRAINTSOLUTION,1,"2018/05/01 12:00:00",20,"2018/05/06 00:00:00","2018/05/06 00:00:00",1,MT_QLD_0,0,2.85,0,"2018/05/01 12:31:15",RELIABILITY_LRC
D,MTPASA,CONSTRAINTSOLUTION,1,"2018/05/01 12:00:00",20,"2018/05/06 00:00:00","2018/05/06 00:00:00",1,MT_Q^^NIL_TR,6842.02,0.64,0,"2018/05/01 12:31:15",RELIABILITY_LRC
D,MTPASA,CONSTRAINTSOLUTION,1,"2018/05/01 12:00:00",20,"2018/05/06 00:00:00","2018/05/06 00:00:00",1,MT_SA_0,0,0.27,0,"2018/05/01 12:31:15",RELIABILITY_LRC
D,MTPASA,CONSTRAINTSOLUTION,1,"2018/05/01 12:00:00",20,"2018/05/06 00:00:00","2018/05/07 00:00:00",1,MT_NSW_HEADROOM,-330,2.91,0,"2018/05/01 12:31:15",RELIABILITY_LRC
D,MTPASA,CONSTRAINTSOLUTION,1,"2018/05/01 12:00:00",20,"2018/05/06 00:00:00","2018/05/07 00:00:00",1,MT_Q^^NIL_TR,6842.02,0.63,0,"2018/05/01 12:31:15",RELIABILITY_LRC
D,MTPASA,CONSTRAINTSOLUTION,1,"2018/05/01 12:00:00",20,"2018/05/06 00:00:00","2018/05/07 00:00:00",1,MT_SA_0,0,0.24,0,"2018/05/01 12:31:15",RELIABILITY_LRC
D,MTPASA,CONSTRAINTSOLUTION,1,"2018/05/01 12:00:00",20,"2018/05/06 00:00:00","2018/05/07 00:00:00",1,N>N-NIL_LSDU,-3.55,5.61,0,"2018/05/01 12:31:15",RELIABILITY_LRC
D,MTPASA,CONSTRAINTSOLUTION,1,"2018/05/01 12:00:00",20,"2018/05/06 00:00:00","2018/05/08 00:00:00",1,MT_NSW_HEADROOM,-330,2.89,0,"2018/05/01 12:31:15",RELIABILITY_LRC
D,MTPASA,CONSTRAINTSOLUTION,1,"2018/05/01 12:00:00",20,"2018/05/06 00:00:00","2018/05/08 00:00:00",1,MT_Q^^NIL_TR,6842.02,0.72,0,"2018/05/01 12:31:15",RELIABILITY_LRC
D,MTPASA,CONSTRAINTSOLUTION,1,"2018/05/01 12:00:00",20,"2018/05/06 00:00:00","2018/05/08 00:00:00",1,MT_SA_0,0,0.27,0,"2018/05/01 12:31:15",RELIABILITY_LRC
...
C,"END OF REPORT",1003
Availability
Visibility: Public
This table is in the public monthly MMSDM archive.
I have collated the list of all those files into one place, in this CSV metadata file. (Columns year, month, url, compressed_size in bytes).
The earliest available data is month 1 of 2015. The most recent available data is month 5 of 2018.
Every month in between has a file. (No gaps.)
Data Size
Each year of data is approximately 451 KB when zipped, 5 MB as unzipped CSV.
Deduplication and PDR Loader Configuration
The primary keys are:
| Report Name | Report Subtype | Version | Undisclosed |
|---|---|---|---|
| MTPASA | CONSTRAINTSOLUTION | 1 | ⚠️ |
Warning
Some of these file mappings are not in the published PDR Loader configuration file, even though files for this table exist with those metadata values. Mappings marked with ⚠️ have been added by me after manually inspecting those files.
This means that the CSV files start with metadata columns:
Indexes
Links
This page as JSON (schema documented here, but may change)
Download a JSON Schema specification for this table.
Official AEMO schema documentation
Other Information
Package: HISTORICAL TABLES