% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/constraints.R
\name{aemo_spd_constraints}
\alias{aemo_spd_constraints}
\title{SPD constraint tables (regions, interconnectors, connection points)}
\source{
AEMO NEMweb MMSDM archive, SPDREGIONCONSTRAINT /
SPDINTERCONNECTORCONSTRAINT / SPDCONNECTIONPOINTCONSTRAINT.
}
\usage{
aemo_spd_constraints(
  table = c("region", "interconnector", "connection_point"),
  constraint_id = NULL
)
}
\arguments{
\item{table}{One of \code{"region"} (default), \code{"interconnector"},
or \code{"connection_point"}.}

\item{constraint_id}{Optional character vector of
\code{GENCONID}/\code{CONSTRAINTID} values.}
}
\value{
An \code{aemo_tbl} with columns from the requested SPD
table. \code{GENCONID} and \code{FACTOR} (the coefficient) are
always present; other columns vary by table.
}
\description{
Returns the SPD (Security and Projected Dispatch) constraint
coefficient tables from MMSDM. Where \code{GENCONDATA} gives the
high-level equation definition, the SPD tables give the
per-term \emph{coefficients} used in the NEMDE dispatch
optimisation:
}
\details{
\itemize{
\item \code{"region"}: \code{SPDREGIONCONSTRAINT} (regional-demand and
regional-generation terms).
\item \code{"interconnector"}: \code{SPDINTERCONNECTORCONSTRAINT}
(interconnector-flow terms).
\item \code{"connection_point"}: \code{SPDCONNECTIONPOINTCONSTRAINT}
(per-DUID connection-point terms).
}

These tables are required for NEM dispatch replication (the
\code{nempy} Python package, Gorman, Bruce & MacGill 2022,
\emph{JOSS} 7(70) 3596, \url{doi:10.21105/joss.03596}, uses all three
when reproducing NEMDE solves).
}
\examples{
\donttest{
op <- options(aemo.cache_dir = tempdir())
try({
  s <- aemo_spd_constraints(table = "interconnector")
  head(s)
})
options(op)
}
}
\seealso{
\code{\link[=aemo_gencon]{aemo_gencon()}} for the equation-level metadata,
\code{\link[=aemo_constraints]{aemo_constraints()}} for the 5-min binding-constraint
feed with shadow prices.

Other dispatch: 
\code{\link{aemo_bids}()},
\code{\link{aemo_constraints}()},
\code{\link{aemo_dispatch_units}()},
\code{\link{aemo_fcas_enablement}()},
\code{\link{aemo_gencon}()},
\code{\link{aemo_interconnector}()},
\code{\link{aemo_market_notices}()},
\code{\link{aemo_outages}()},
\code{\link{aemo_rooftop_pv}()}
}
\concept{dispatch}
