% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/evm.R
\name{ac}
\alias{ac}
\title{Actual Cost (AC).}
\usage{
ac(actual_costs, time_period, cumulative = TRUE)
}
\arguments{
\item{actual_costs}{Vector of actual costs incurred at each time period. Can be either
period costs (cost per period) or cumulative costs depending on the cumulative parameter.}

\item{time_period}{Current time period.}

\item{cumulative}{Logical. If TRUE (default), actual_costs are already cumulative and
the value at time_period is returned directly. If FALSE, actual_costs are period costs
and will be summed up to time_period.}
}
\value{
The function returns the Actual Cost (AC) of work completed to date.
}
\description{
Calculates the Actual Cost (AC) of work completed based on the actual costs incurred
at each time period.
}
\examples{
# Using cumulative costs (default)
cumulative_costs <- c(9000, 27000, 63000, 133000, 233000)
time_period <- 3
ac <- ac(cumulative_costs, time_period)
cat("Actual Cost (AC):", ac, "\n")

# Using period costs
period_costs <- c(9000, 18000, 36000, 70000, 100000)
ac <- ac(period_costs, time_period, cumulative = FALSE)
cat("Actual Cost (AC):", ac, "\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{pv}}, \code{\link{ev}}, \code{\link{sv}}, \code{\link{cv}},
\code{\link{spi}}, \code{\link{cpi}}, \code{\link{eac}}
}
