Ero sivun ”Ydinvoimalan kustannus-hyötyanalyysi” versioiden välillä

Opasnet Suomista
Siirry navigaatioon Siirry hakuun
(→‎Data: data from the model)
(→‎Laskenta: päivitetty malli; ei käytä t2b-dataa vielä)
Rivi 154: Rivi 154:
library(OpasnetUtils)
library(OpasnetUtils)
library(ggplot2)
library(ggplot2)
#rm(Dthermal_noisegrid, k.new, ElPrice, average_monthly_price, marginal_costs_for_the_new_capacity, nominal_costs)


##### RESULTS SHEET
##### RESULTS SHEET


#### Locations in the Excel sheet
#### Locations in the Excel sheet
# average_monthly_price  (€/MWh)
# average_monthly_price  (/MWh)
# discount_rate  
# discount_rate  
# noisedens calculations.2015!E5:DA5
# noisedens calculations.2015!E5:DA5
Rivi 173: Rivi 174:
# price.oil results!C5:J5 and scenarios!C25:J25
# price.oil results!C5:J5 and scenarios!C25:J25
# new_capacity_of_interest  (MW)
# new_capacity_of_interest  (MW)
# new_capacity_marginal_cost (€/MWh)
# new_capacity_marginal_cost (/MWh)
# noisedens calculations.2015!E5:DA5
# noisedens calculations.2015!E5:DA5
# noisegridbase calculation.2015!E3:DA3
# noisegridbase calculation.2015!E3:DA3
Rivi 214: Rivi 215:
}
}


cumfun <- (Ovariable("temp", data = data.frame(Year = year, Result = year)) <= Ovariable("temp2", data = data.frame(Year2 = year, Result = year))) * 1
cumfun <- function(x, cols) { # integrates an ovariable over a numerical index.
  ind <- as.numeric(as.character(unique(x@output[[cols[1]]])))
  intmatrix <- (Ovariable(output = data.frame(temp = ind, Result = ind), marginal = c(TRUE, FALSE)) <=  
                Ovariable(output = data.frame(temp2 = ind, Result = ind), marginal = c(TRUE, FALSE))) * 1
  colnames(intmatrix@output)[colnames(intmatrix@output) == "temp"] <- cols[1]
  out <- oapply(x * intmatrix, cols = cols, FUN = sum) # You can sum over several indices but integrate only over the first in cols.
  colnames(out@output)[colnames(out@output) == "temp2"] <- cols[1]
#  out <- unkeep(out, cols = c("tempResult", "tempSource", "temp2Result", "temp2Source"))
  return(out)
}


##### USER INPUTS
##### USER INPUTS
Rivi 249: Rivi 259:
))
))


#new_capacity_other@data <- new_capacity_other@data[new_capacity_other@data$New_capacity == "1 %/a growth" , ]
#price.oil@data <- price.oil@data[price.oil@data$Oil_price == "Oil price 20 % higher" , ]
#change_in_demand@data <- change_in_demand@data[change_in_demand@data$Demand_change == "Demand 1 %/a growth" , ]
#scenariot <- Ovariable(data = data.frame(
#  New_capacity = "1 %/a growth",
#  Oil_price = "Oil price 20 % higher",
#  Demand_change = "Demand 1 %/a growth",
#  Result = 1
#))


##### CONSTANTS
##### CONSTANTS
Rivi 270: Rivi 269:
))
))


new_capacity_marginal_cost <- 12 #(/MWh) constant
new_capacity_marginal_cost <- 12 #(/MWh) constant


new_capacity_of_interest <- Ovariable("new_capacity", data = data.frame(
new_capacity_of_interest <- Ovariable("new_capacity", data = data.frame(
Rivi 338: Rivi 337:
noisedens <- 1/2 * (ERF((noisegridbase + noise_step / 2)/sqrt(2)) - ERF((noisegridbase - noise_step / 2)/sqrt(2)))
noisedens <- 1/2 * (ERF((noisegridbase + noise_step / 2)/sqrt(2)) - ERF((noisegridbase - noise_step / 2)/sqrt(2)))


average_monthly_price <- oapply(ElPrice * noisedens, cols = "Grid", FUN = sum) #  (€/MWh)
average_monthly_price <- oapply(ElPrice * noisedens, cols = "Grid", FUN = sum) #  (/MWh)


marginal_costs_for_the_new_capacity <- new_capacity_marginal_cost * k.new / 10^6 * 4 * 13 # There are 13 28-day months
marginal_costs_for_the_new_capacity <- new_capacity_marginal_cost * k.new / 10^6 * 4 * 13 # There are 13 28-day months
Rivi 349: Rivi 348:


###nominal analysis (euros millions) 2015-19
###nominal analysis (euros millions) 2015-19
nominal_costs <- -1 * fixed_costs_of_new_capacity - marginal_costs_for_the_new_capacity * 5 # (per 5 a)
nominal_costs <- -1 * fixed_costs_of_new_capacity - marginal_costs_for_the_new_capacity * 5 # (M€ per 5 a)
nominal_revenues <- revenue_for_the_new_capacity * 5 # (per 5 a)
nominal_revenues <- revenue_for_the_new_capacity * 5 # (M€ per 5 a)
nominal_net_revenues <- nominal_revenues + nominal_costs
nominal_net_revenues <- nominal_revenues + nominal_costs
cumulative_net_revenues <- oapply(nominal_net_revenues * cumfun, cols = "Year", FUN = sum) ###integrated over time
cumulative_net_revenues <- cumfun(nominal_net_revenues, cols = "Year") ###integrated over time
###present value analysis (euros millions) 2015-19
###present value analysis (euros millions) 2015-19
Rivi 358: Rivi 357:
present_revenues <- nominal_revenues * discount_factor
present_revenues <- nominal_revenues * discount_factor
present_net_revenues <- nominal_net_revenues * discount_factor
present_net_revenues <- nominal_net_revenues * discount_factor
present_cumulative_net_revenues <- oapply(present_net_revenues * cumfun, cols = "Year", FUN = sum) ###integrated over time.
present_cumulative_net_revenues <- cumfun(present_net_revenues, cols = "Year") ###integrated over time.


ggplot(present_cumulative_net_revenues@output, aes(x = Year2, weight = Result, fill = Oil_price)) + geom_bar(position = "dodge") + facet_grid(New_capacity ~ Demand_change)
ggplot(present_cumulative_net_revenues@output, aes(x = Year, weight = Result, fill = Oil_price)) + geom_bar(position = "dodge") + facet_grid(New_capacity ~ Demand_change)


</rcode>
</rcode>

Versio 29. syyskuuta 2014 kello 04.44




Kysymys

Miten lasketaan suunniteltavan ydinvoimalan kannattavuus käyttöiän aikana?

Vastaus

Perustelut

Riippuvuudet

Data

All data comes from the original Excel file.

Yearly data(€,MW)
ObsVariableUncertaintyYearResultDescription
1Oil_priceOil price 20 % higher96
2Oil_priceOil price same80
3Oil_priceOil price 20 % lower64
4New_capacity2 %/a growth20151860.730594
5New_capacity2 %/a growth20205481.175799
6New_capacity2 %/a growth20259222.751142
7New_capacity2 %/a growth203010084.121
8New_capacity2 %/a growth20358859.360731
9New_capacity2 %/a growth20408859.360731
10New_capacity2 %/a growth20458859.360731
11New_capacity2 %/a growth20508859.360731
12New_capacityTEM scenario (1.7%/a growth)20151860.730594
13New_capacityTEM scenario (1.7%/a growth)20204931.506849
14New_capacityTEM scenario (1.7%/a growth)20258105.022831
15New_capacityTEM scenario (1.7%/a growth)20308835.616438
16New_capacityTEM scenario (1.7%/a growth)20357796.803653
17New_capacityTEM scenario (1.7%/a growth)20407796.803653
18New_capacityTEM scenario (1.7%/a growth)20457796.803653
19New_capacityTEM scenario (1.7%/a growth)20507796.803653
20New_capacity1 %/a growth20151860.730594
21New_capacity1 %/a growth20203549.657534
22New_capacity1 %/a growth20255295.091324
23New_capacity1 %/a growth20305696.917808
24New_capacity1 %/a growth20355125.570776
25New_capacity1 %/a growth20405125.570776
26New_capacity1 %/a growth20455125.570776
27New_capacity1 %/a growth20505125.570776
28Demand_changeDemand 1 %/a growth20150
29Demand_changeDemand 1 %/a growth20204200.913242
30Demand_changeDemand 1 %/a growth20256563.926941
31Demand_changeDemand 1 %/a growth20308716.894977
32Demand_changeDemand 1 %/a growth20359950.913242
33Demand_changeDemand 1 %/a growth20409950.913242
34Demand_changeDemand 1 %/a growth20459950.913242
35Demand_changeDemand 1 %/a growth20509950.913242
36Demand_changeDemand 0.5 %/a growth TEM scenario20150
37Demand_changeDemand 0.5 %/a growth TEM scenario20201826.484018
38Demand_changeDemand 0.5 %/a growth TEM scenario20252853.881279
39Demand_changeDemand 0.5 %/a growth TEM scenario20303789.954338
40Demand_changeDemand 0.5 %/a growth TEM scenario20354326.484018
41Demand_changeDemand 0.5 %/a growth TEM scenario20404326.484018
42Demand_changeDemand 0.5 %/a growth TEM scenario20454326.484018
43Demand_changeDemand 0.5 %/a growth TEM scenario20504326.484018
44Demand_changeDemand 0 %/a growth20150
45Demand_changeDemand 0 %/a growth20200
46Demand_changeDemand 0 %/a growth20250
47Demand_changeDemand 0 %/a growth20300
48Demand_changeDemand 0 %/a growth20350
49Demand_changeDemand 0 %/a growth20400
50Demand_changeDemand 0 %/a growth20450
51Demand_changeDemand 0 %/a growth20500
52Fixed_costs_of_new_capacity20156144
53Fixed_costs_of_new_capacity20200
54Fixed_costs_of_new_capacity20250
55Fixed_costs_of_new_capacity20300
56Fixed_costs_of_new_capacity20350
57Fixed_costs_of_new_capacity20400
58Fixed_costs_of_new_capacity20450
59Fixed_costs_of_new_capacity20500
60New_capacity_of_interest20150
61New_capacity_of_interest2020440
62New_capacity_of_interest20251100
63New_capacity_of_interest20301100
64New_capacity_of_interest20351100
65New_capacity_of_interest20401100
66New_capacity_of_interest20451100
67New_capacity_of_interest20501100
Monthly variables(MWh/week)
ObsVariableMonthResultDescription
1DthermalWeeks 1 to 44328000
2DthermalWeeks 5 to 84304750
3DthermalWeeks 9 to 124246750
4DthermalWeeks 13 to 163881000
5DthermalWeeks 17 to 203226250
6DthermalWeeks 21 to 242822750
7DthermalWeeks 25 to 282661500
8DthermalWeeks 29 to 322585250
9DthermalWeeks 33 to 362904500
10DthermalWeeks 37 to 403255750
11DthermalWeeks 41 to 443757250
12DthermalWeeks 45 to 484120000
13DthermalWeeks 49 to 524220750
14Dthermal_sdWeeks 1 to 4448471.90225
15Dthermal_sdWeeks 5 to 8372222.83725
16Dthermal_sdWeeks 9 to 12431200.65775
17Dthermal_sdWeeks 13 to 16530007.6645
18Dthermal_sdWeeks 17 to 20539874.6175
19Dthermal_sdWeeks 21 to 24514974.322
20Dthermal_sdWeeks 25 to 28515219.12525
21Dthermal_sdWeeks 29 to 32543795.49475
22Dthermal_sdWeeks 33 to 36446860.6225
23Dthermal_sdWeeks 37 to 40316494.73225
24Dthermal_sdWeeks 41 to 44420111.4905
25Dthermal_sdWeeks 45 to 48487450.071
26Dthermal_sdWeeks 49 to 52490019.918
27dummiesWeeks 1 to 4490300
28dummiesWeeks 5 to 8589230
29dummiesWeeks 9 to 12571340
30dummiesWeeks 13 to 16198190
31dummiesWeeks 17 to 20-317120
32dummiesWeeks 21 to 24-684420
33dummiesWeeks 25 to 28-849080
34dummiesWeeks 29 to 32-851290
35dummiesWeeks 33 to 36-664640
36dummiesWeeks 37 to 40-371490
37dummiesWeeks 41 to 440
38dummiesWeeks 45 to 48218750
39dummiesWeeks 49 to 52288840
Other parameters(-)
ObsParameterUnitValueDescription
1discount_rate1 /a0.04
2new_capacity_marginal_cost12
3beta.0589000
4beta.oil-23987
5beta.eua0
6beta.p1185400
7price.eua0
8price.feed0
9price.ceiling2000
10noise_step0.1
11grid_points#101

Laskenta

Nuclear investment calculator. Copyright James Corbishley and Matti Liski 2014 Original calculator in Excel [1].

+ Näytä koodi

Katso myös

Avainsanat

Viitteet


Aiheeseen liittyviä tiedostoja

<mfanonymousfilelist></mfanonymousfilelist>