Cost curves for energy: Difference between revisions

From Opasnet
Jump to navigation Jump to search
(→‎Rationale: what is zero price?)
 
(10 intermediate revisions by the same user not shown)
Line 8: Line 8:
== Answer ==
== Answer ==


<t2b index="Actor,Activity,Fuel,Use,Observation" locations="Units,Function,P0,P1,P2,P3,P4,Description" unit="-">
<t2b index="Row,Actor,Fuel,Use,Reference,Unit,Observation" locations="Result,Description" unit="-">
Kuopio market|Energy conversion|Coal and peat|Demand|€,ton|Polynomial|1000|-0.5|0|0|0|
1|Kuopion energia|Coal and peat|Demand|Current|€,ton|0, -0.06|
2|Kuopio market|Coal and peat|Supply|Current|€,ton|0, 0.5|
</t2b>
</t2b>


Functions (x is the price of the product):
Parameter c<sub>i</sub> are estimated from data: it is the current supply or demand given the current price (used as the point where p = 0).
* Polynomial: P3*x^3 + P2*x^2 + P1*x + P0 + P4/x
 
* Exponential: P0 + P1 * exp(P2*x - P3)
<rcode
name="answer"
label="Run code"
include="
page:Object-oriented_programming_in_Opasnet|name:answer|
page:OpasnetBaseUtils|name:generic|
page:Cost_curves_for_energy|name:formula
"
>
 
out <- formula.Op_en5478(dependencies.Op_en5478)
cat("Computed changes in energy production and consumption in a new situation.\n")
print(out)
 
</rcode>


== Rationale ==
== Rationale ==


{{comment|# |There are two possible ways to describe the functions:
For detailed rationale, see [[Energy balance]].
* Zero price is considered the current price. Then, P0 can be obtained from statistics, because the current supply and demand is P0. Only changes of price are of interest in the function. The actual market price is not needed for small changes of price.
 
<math>\Sigma f_i(p) = \Sigma (a_i p^2 + b_i p + c_i) = 0</math>
 
<math>p = \frac{-\Sigma b_i \pm \sqrt{(\Sigma b_i)^2 - 4 \Sigma a_i \Sigma c_i}} {2 \Sigma a_i}</math>
 
Cost curves are parameterised in the way that the current price p = 0 and therefore the current supply or demand is c<sub>i</sub>.
 
When a demand or supply changes, a new price p must be calculated based on f<sub>i</sub>, and then the supplies and demands of other actors can be calculated, resulting in a new balance.
 
{{comment|# |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.|--[[User:Jouni|Jouni]] 06:16, 28 January 2012 (EET)}}
* Zero price is considered as 0 €/product unit. The true market price must be known. This function's parameters are more difficult to estimate.|--[[User:Jouni|Jouni]] 06:16, 28 January 2012 (EET)}}
:{{defend|# |I recommend the first approach in the beginning.|--[[User:Jouni|Jouni]] 06:16, 28 January 2012 (EET)}}


{{comment|# |There is also alternative possibilities for functional forms (p is the price of the product):
* Exponential: P0 + P1 * exp(P2*p - P3)
|--[[User:Jouni|Jouni]] 17:04, 28 January 2012 (EET)}}
=== Dependencies ===
=== Dependencies ===


=== Formula ===
=== Formula ===
<rcode
name="formula"
label="Initiate functions"
include="
page:Object-oriented_programming_in_Opasnet|name:answer|
page:OpasnetBaseUtils|name:generic
"
>
formula.Op_en5478 <- function(x) {
data <- tidy(op_baseGetData("opasnet_base", x$curves[1]), 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
)
</rcode>


==See also==
==See also==

Latest revision as of 14:44, 5 May 2012



Question

What costs curves should be used for different energy products?

Answer

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).

+ Show code

Rationale

For detailed rationale, see Energy balance.

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \Sigma f_i(p) = \Sigma (a_i p^2 + b_i p + c_i) = 0}

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle 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)

Dependencies

Formula

+ Show code

See also

Urgenche research project 2011 - 2014: city-level climate change mitigation
Urgenche pages

Urgenche main page · Category:Urgenche · Urgenche project page (password-protected)

Relevant data
Building stock data in Urgenche‎ · Building regulations in Finland · Concentration-response to PM2.5 · Emission factors for burning processes · ERF of indoor dampness on respiratory health effects · ERF of several environmental pollutions · General criteria for land use · Indoor environment quality (IEQ) factors · Intake fractions of PM · Land use in Urgenche · Land use and boundary in Urgenche · Energy use of buildings

Relevant methods
Building model · Energy balance · Health impact assessment · Opasnet map · Help:Drawing graphs · OpasnetUtils‎ · Recommended R functions‎ · Using summary tables‎

City Kuopio
Climate change policies and health in Kuopio (assessment) · Climate change policies in Kuopio (plausible city-level climate policies) · Health impacts of energy consumption in Kuopio · Building stock in Kuopio · Cost curves for energy (prioritization of options) · Energy balance in Kuopio (energy data) · Energy consumption and GHG emissions in Kuopio by sector · Energy consumption classes (categorisation) · Energy consumption of heating of buildings in Kuopio · Energy transformations (energy production and use processes) · Fuels used by Haapaniemi energy plant · Greenhouse gas emissions in Kuopio · Haapaniemi energy plant in Kuopio · Land use in Kuopio · Building data availability in Kuopio · Password-protected pages: File:Heat use in Kuopio.csv · Kuopio housing

City Basel
Buildings in Basel (password-protected)

Energy balances
Energy balance in Basel · Energy balance in Kuopio · Energy balance in Stuttgart · Energy balance in Suzhou


Keywords

References


Related files

<mfanonymousfilelist></mfanonymousfilelist>