% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/loss_factors.R
\name{aemo_mlf}
\alias{aemo_mlf}
\title{Marginal Loss Factors (MLF) by DUID and financial year}
\source{
AEMO MMSDM archive, TRANSMISSIONLOSSFACTOR table.
AEMO Copyright Permissions Notice.
}
\usage{
aemo_mlf(year = NULL, duid = NULL)
}
\arguments{
\item{year}{Financial year(s) as \code{"YYYY-YY"} strings (e.g.
\code{"2024-25"}). \code{NULL} returns all available years. Multiple
years accepted.}

\item{duid}{Optional character vector of DUIDs to filter on.
\code{NULL} returns all DUIDs. See \code{\link[=aemo_units]{aemo_units()}} for the full
DUID registry.}
}
\value{
An \code{aemo_tbl} with columns \code{financial_year}, \code{duid},
\code{connectionpointid}, \code{regionid}, \code{mlf}. From a live MMSDM
download additional columns (\code{participantid},
\code{lastchanged}) may also be present.
}
\description{
Returns the Marginal Loss Factor applicable to each DUID for
the requested financial year(s). MLFs measure the incremental
network loss at a connection point relative to the Regional
Reference Node (RRN); a DUID with MLF = 0.97 receives 97\% of
the regional RRP per MWh generated.
}
\details{
MLFs are published annually by AEMO under NER 3.6.2 and are
used in settlement calculations and in PPA revenue
reconstruction. The function first attempts to download the
\code{TRANSMISSIONLOSSFACTOR} table from the most recent MMSDM monthly
archive; if that fails it returns a bundled static table
covering FY 2020-21 to FY 2025-26 for ~20 well-known DUIDs.
}
\examples{
\donttest{
op <- options(aemo.cache_dir = tempdir())
try({
  mlf <- aemo_mlf(year = "2024-25")
  head(mlf)
})
options(op)
}
}
\seealso{
\code{\link[=aemo_units]{aemo_units()}} for the DUID registry,
\code{\link[=aemo_price]{aemo_price()}} for regional RRPs.

Other reference: 
\code{\link{aemo_dlf}()},
\code{\link{aemo_interconnectors}()},
\code{\link{aemo_participants}()},
\code{\link{aemo_price_caps}()},
\code{\link{aemo_regions}()},
\code{\link{aemo_settlement}()},
\code{\link{aemo_snapshot}()},
\code{\link{aemo_units}()}
}
\concept{reference}
