% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/constraints.R
\name{aemo_constraints}
\alias{aemo_constraints}
\title{Binding transmission and system constraints}
\source{
AEMO NEMweb DISPATCHIS_Reports, DISPATCHCONSTRAINT
table.
}
\usage{
aemo_constraints(
  start,
  end,
  constraint_id = NULL,
  intervention = FALSE,
  min_marginal_value = 0.01
)
}
\arguments{
\item{start, end}{Window (inclusive), character or POSIXct.}

\item{constraint_id}{Optional character vector of constraint
IDs (e.g. \code{"N>>N-NIL_1"}, \code{"V::S_NIL_TBSE"}). \code{NULL}
returns all binding constraints in the window.}

\item{intervention}{Logical. Default \code{FALSE}.}

\item{min_marginal_value}{Numeric. Only return constraints
with marginal value at or above this threshold (AUD/MWh).
\code{0} returns every row; the default of \code{0.01} filters out
near-zero shadow prices that are typically noise.}
}
\value{
An \code{aemo_tbl} with columns \code{settlementdate},
\code{constraintid}, \code{rhs}, \code{marginalvalue}, \code{violationdegree},
\code{lhs}, plus the intervention flag.
}
\description{
Returns the \code{DISPATCHCONSTRAINT} table from NEMweb: one row
per binding (or near-binding) constraint per 5-minute dispatch
interval. Each row records the constraint ID, the left-hand
side (LHS) and right-hand side (RHS) values, the marginal
value (shadow price on the constraint in AUD/MWh), and the
violation degree if any.
}
\details{
This is the table that answers the question "why was the RRP
so high at 17:35?": the sum of marginal values across
binding constraints at the Regional Reference Node equals the
regional price component attributable to network limits.

Constraint equations and RHS terms (\code{GENCONDATA},
\code{GENCONSETINVOKE}) are published through MMSDM on a separate
cadence and are not exposed directly by this function; use
\code{\link[=aemo_nemweb_download]{aemo_nemweb_download()}} on an MMSDM URL for those.
}
\examples{
\donttest{
op <- options(aemo.cache_dir = tempdir())
try({
  now <- Sys.time()
  c <- aemo_constraints(start = now - 3600, end = now)
  head(c)
})
options(op)
}
}
\seealso{
Other dispatch: 
\code{\link{aemo_bids}()},
\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}()},
\code{\link{aemo_spd_constraints}()}
}
\concept{dispatch}
