% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/evm.R
\name{tcpi}
\alias{tcpi}
\title{To-Complete Performance Index (TCPI).}
\usage{
tcpi(bac, ev, ac, target = "bac", eac = NULL)
}
\arguments{
\item{bac}{Budget at Completion (BAC) (total planned budget).}

\item{ev}{Earned Value.}

\item{ac}{Actual Cost.}

\item{target}{The target to calculate TCPI against. Either "bac" (default) to meet
original budget, or "eac" to meet revised estimate. If "eac", the eac parameter
must be provided.}

\item{eac}{Estimate at Completion. Required when target = "eac".}
}
\value{
The function returns the To-Complete Performance Index (TCPI).
}
\description{
Calculates the To-Complete Performance Index (TCPI), which indicates the cost
performance required on remaining work to meet a target (BAC or EAC).
TCPI > 1 means efficiency must improve; TCPI < 1 means efficiency can decrease.
}
\examples{
bac <- 100000
ev <- 35000
ac <- 63000

# TCPI to complete within original budget
tcpi_bac <- tcpi(bac, ev, ac)
cat("TCPI (to meet BAC):", round(tcpi_bac, 2), "\n")

# TCPI to complete within revised estimate
eac <- 120482
tcpi_eac <- tcpi(bac, ev, ac, target = "eac", eac = eac)
cat("TCPI (to meet EAC):", round(tcpi_eac, 2), "\n")

}
\references{
Damnjanovic, Ivan, and Kenneth Reinschmidt. Data analytics for engineering and
construction project risk management. No. 172534. Cham, Switzerland: Springer, 2020.
}
\seealso{
\code{\link{eac}}, \code{\link{etc}}, \code{\link{vac}}, \code{\link{cpi}}
}
