Cost curves for energy

Question

What costs curves should be used for different energy products?

Cost curves for energy(-)
ObsRowActorFuelUseReferenceUnitResultDescription
11Kuopion energiaCoal and peatDemandCurrent€,ton0, -0.06
22Kuopio marketCoal and peatSupplyCurrent€,ton0, 0.5

Parameter ci are estimated from data: it is the current supply or demand given the current price (used as the point where p = 0).

 out <- formula.Op_en5478(dependencies.Op_en5478) cat("Computed changes in energy production and consumption in a new situation.\n") print(out)

Rationale

For detailed rationale, see Energy balance. $\Sigma f_i(p) = \Sigma (a_i p^2 + b_i p + c_i) = 0$ $p = \frac{-\Sigma b_i \pm \sqrt{(\Sigma b_i)^2 - 4 \Sigma a_i \Sigma c_i}} {2 \Sigma a_i}$

Cost curves are parameterised in the way that the current price p = 0 and therefore the current supply or demand is ci.

When a demand or supply changes, a new price p must be calculated based on fi, and then the supplies and demands of other actors can be calculated, resulting in a new balance.

----#: . There is an alternative way to describe the functions:

• Zero price is considered as 0 €/product unit. The true market price must be known. This function's parameters are more difficult to estimate. --Jouni 06:16, 28 January 2012 (EET) (type: truth; paradigms: science: comment)

----#: . There is also alternative possibilities for functional forms (p is the price of the product):

• Exponential: P0 + P1 * exp(P2*p - P3) --Jouni 17:04, 28 January 2012 (EET) (type: truth; paradigms: science: comment)

Formula

 formula.Op_en5478 <- function(x) { data <- tidy(op_baseGetData("opasnet_base", x$curves), direction = "wide") curves <- strsplit(as.character(data$Parameters), split = ",") coefficients <- data.frame(array(NA, dim = c(length(curves), 10))) for(j in 1:length(curves)) { coefficients[j, 1:length(curves[[j]])] <- curves[[j]] } coefficients[nrow(coefficients) + 1, 1] <- x\$deviation for(k in 1:ncol(coefficients)) { coefficients[, k] <- ifelse(is.na(coefficients[, k]), 0, as.numeric(coefficients[, k])) } x.new <- polyroot(as.vector(colSums(coefficients))) x.new <- ifelse(abs(Im(x.new)) < 1e-6, Re(x.new), 1e+30) # Take only the real roots. x.new <- x.new[abs(x.new) == min(abs(x.new))] # Pick the root that is closest to zero (=BAU). y.new <- 0 for(k in 1:ncol(coefficients)) { y.new <- y.new + coefficients[, k] * x.new^(k-1) } temp <- data[1, ] temp[1, ] <- "Deviation" data <- rbind(data, temp) data <- cbind(data, data.frame(Result = y.new)) return(data) } dependencies.Op_en5478 <- list( curves = c("Op_en5478", "Cost curves for energy"), bau = c("Op_en5469", "Energy balance in Kuopio"), deviation = -5 )