| Conditions | 9 |
| Total Lines | 533 |
| Code Lines | 375 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | """The module containing all parameters for the scenario table |
||
| 188 | def electricity(scenario): |
||
| 189 | """Returns paramaters of the electricity sector for the selected scenario. |
||
| 190 | |||
| 191 | Parameters |
||
| 192 | ---------- |
||
| 193 | scenario : str |
||
| 194 | Name of the scenario. |
||
| 195 | |||
| 196 | Returns |
||
| 197 | ------- |
||
| 198 | parameters : dict |
||
| 199 | List of parameters of electricity sector |
||
| 200 | |||
| 201 | """ |
||
| 202 | |||
| 203 | if scenario == "eGon2035": |
||
| 204 | costs = read_csv(2035) |
||
| 205 | |||
| 206 | parameters = {"grid_topology": "Status Quo"} |
||
| 207 | # Insert effciencies in p.u. |
||
| 208 | parameters["efficiency"] = { |
||
| 209 | "oil": read_costs(costs, "oil", "efficiency"), |
||
| 210 | "battery": { |
||
| 211 | "store": read_costs(costs, "battery inverter", "efficiency") |
||
| 212 | ** 0.5, |
||
| 213 | "dispatch": read_costs(costs, "battery inverter", "efficiency") |
||
| 214 | ** 0.5, |
||
| 215 | "standing_loss": 0, |
||
| 216 | "max_hours": 6, |
||
| 217 | "cyclic_state_of_charge": True, |
||
| 218 | }, |
||
| 219 | "pumped_hydro": { |
||
| 220 | "store": read_costs(costs, "PHS", "efficiency") ** 0.5, |
||
| 221 | "dispatch": read_costs(costs, "PHS", "efficiency") ** 0.5, |
||
| 222 | "standing_loss": 0, |
||
| 223 | "max_hours": 6, |
||
| 224 | "cyclic_state_of_charge": True, |
||
| 225 | }, |
||
| 226 | } |
||
| 227 | # Warning: Electrical parameters are set in osmTGmod, editing these values will not change the data! |
||
| 228 | parameters["electrical_parameters"] = { |
||
| 229 | "ac_line_110kV": { |
||
| 230 | "s_nom": 260, # [MVA] |
||
| 231 | "R": 0.109, # [Ohm/km] |
||
| 232 | "L": 1.2, # [mH/km] |
||
| 233 | }, |
||
| 234 | "ac_cable_110kV": { |
||
| 235 | "s_nom": 280, # [MVA] |
||
| 236 | "R": 0.0177, # [Ohm/km] |
||
| 237 | "L": 0.3, # [mH/km] |
||
| 238 | }, |
||
| 239 | "ac_line_220kV": { |
||
| 240 | "s_nom": 520, # [MVA] |
||
| 241 | "R": 0.109, # [Ohm/km] |
||
| 242 | "L": 1.0, # [mH/km] |
||
| 243 | }, |
||
| 244 | "ac_cable_220kV": { |
||
| 245 | "s_nom": 550, # [MVA] |
||
| 246 | "R": 0.0176, # [Ohm/km] |
||
| 247 | "L": 0.3, # [mH/km] |
||
| 248 | }, |
||
| 249 | "ac_line_380kV": { |
||
| 250 | "s_nom": 1790, # [MVA] |
||
| 251 | "R": 0.028, # [Ohm/km] |
||
| 252 | "L": 0.8, # [mH/km] |
||
| 253 | }, |
||
| 254 | "ac_cable_380kV": { |
||
| 255 | "s_nom": 925, # [MVA] |
||
| 256 | "R": 0.0175, # [Ohm/km] |
||
| 257 | "L": 0.3, # [mH/km] |
||
| 258 | }, |
||
| 259 | } |
||
| 260 | |||
| 261 | # Insert overnight investment costs |
||
| 262 | # Source for eHV grid costs: Netzentwicklungsplan Strom 2035, Version 2021, 2. Entwurf |
||
| 263 | # Source for HV lines and cables: Dena Verteilnetzstudie 2021, p. 146 |
||
| 264 | parameters["overnight_cost"] = { |
||
| 265 | "ac_ehv_overhead_line": 2.5e6 |
||
| 266 | / ( |
||
| 267 | 2 |
||
| 268 | * parameters["electrical_parameters"]["ac_line_380kV"]["s_nom"] |
||
| 269 | ), # [EUR/km/MW] |
||
| 270 | "ac_ehv_cable": 11.5e6 |
||
| 271 | / ( |
||
| 272 | 2 |
||
| 273 | * parameters["electrical_parameters"]["ac_cable_380kV"][ |
||
| 274 | "s_nom" |
||
| 275 | ] |
||
| 276 | ), # [EUR/km/MW] |
||
| 277 | "ac_hv_overhead_line": 0.06e6 |
||
| 278 | / parameters["electrical_parameters"]["ac_line_110kV"][ |
||
| 279 | "s_nom" |
||
| 280 | ], # [EUR/km/MW] |
||
| 281 | "ac_hv_cable": 0.8e6 |
||
| 282 | / parameters["electrical_parameters"]["ac_cable_110kV"][ |
||
| 283 | "s_nom" |
||
| 284 | ], # [EUR/km/MW] |
||
| 285 | "dc_overhead_line": 0.5e3, # [EUR/km/MW] |
||
| 286 | "dc_cable": 3.25e3, # [EUR/km/MW] |
||
| 287 | "dc_inverter": 0.3e6, # [EUR/MW] |
||
| 288 | "transformer_380_110": 17.33e3, # [EUR/MVA] |
||
| 289 | "transformer_380_220": 13.33e3, # [EUR/MVA] |
||
| 290 | "transformer_220_110": 17.5e3, # [EUR/MVA] |
||
| 291 | "battery inverter": read_costs( |
||
| 292 | costs, "battery inverter", "investment" |
||
| 293 | ), |
||
| 294 | "battery storage": read_costs( |
||
| 295 | costs, "battery storage", "investment" |
||
| 296 | ), |
||
| 297 | } |
||
| 298 | |||
| 299 | parameters["lifetime"] = { |
||
| 300 | "ac_ehv_overhead_line": read_costs( |
||
| 301 | costs, "HVAC overhead", "lifetime" |
||
| 302 | ), |
||
| 303 | "ac_ehv_cable": read_costs(costs, "HVAC overhead", "lifetime"), |
||
| 304 | "ac_hv_overhead_line": read_costs( |
||
| 305 | costs, "HVAC overhead", "lifetime" |
||
| 306 | ), |
||
| 307 | "ac_hv_cable": read_costs(costs, "HVAC overhead", "lifetime"), |
||
| 308 | "dc_overhead_line": read_costs(costs, "HVDC overhead", "lifetime"), |
||
| 309 | "dc_cable": read_costs(costs, "HVDC overhead", "lifetime"), |
||
| 310 | "dc_inverter": read_costs(costs, "HVDC inverter pair", "lifetime"), |
||
| 311 | "transformer_380_110": read_costs( |
||
| 312 | costs, "HVAC overhead", "lifetime" |
||
| 313 | ), |
||
| 314 | "transformer_380_220": read_costs( |
||
| 315 | costs, "HVAC overhead", "lifetime" |
||
| 316 | ), |
||
| 317 | "transformer_220_110": read_costs( |
||
| 318 | costs, "HVAC overhead", "lifetime" |
||
| 319 | ), |
||
| 320 | "battery inverter": read_costs( |
||
| 321 | costs, "battery inverter", "lifetime" |
||
| 322 | ), |
||
| 323 | "battery storage": read_costs( |
||
| 324 | costs, "battery storage", "lifetime" |
||
| 325 | ), |
||
| 326 | } |
||
| 327 | # Insert annualized capital costs |
||
| 328 | # lines in EUR/km/MW/a |
||
| 329 | # transfermer, inverter, battery in EUR/MW/a |
||
| 330 | parameters["capital_cost"] = {} |
||
| 331 | |||
| 332 | for comp in parameters["overnight_cost"].keys(): |
||
| 333 | parameters["capital_cost"][comp] = annualize_capital_costs( |
||
| 334 | parameters["overnight_cost"][comp], |
||
| 335 | parameters["lifetime"][comp], |
||
| 336 | global_settings("eGon2035")["interest_rate"], |
||
| 337 | ) |
||
| 338 | |||
| 339 | parameters["capital_cost"]["battery"] = ( |
||
| 340 | parameters["capital_cost"]["battery inverter"] |
||
| 341 | + parameters["efficiency"]["battery"]["max_hours"] |
||
| 342 | * parameters["capital_cost"]["battery storage"] |
||
| 343 | ) |
||
| 344 | |||
| 345 | # Insert marginal_costs in EUR/MWh |
||
| 346 | # marginal cost can include fuel, C02 and operation and maintenance costs |
||
| 347 | parameters["marginal_cost"] = { |
||
| 348 | "oil": global_settings(scenario)["fuel_costs"]["oil"] |
||
| 349 | / read_costs(costs, "oil", "efficiency") |
||
| 350 | + read_costs(costs, "oil", "VOM") |
||
| 351 | + global_settings(scenario)["co2_costs"] |
||
| 352 | * global_settings(scenario)["co2_emissions"]["oil"] |
||
| 353 | / read_costs(costs, "oil", "efficiency"), |
||
| 354 | "other_non_renewable": global_settings(scenario)["fuel_costs"][ |
||
| 355 | "gas" |
||
| 356 | ] / read_costs(costs, "OCGT", "efficiency") |
||
| 357 | + global_settings(scenario)["co2_costs"] |
||
| 358 | * global_settings(scenario)["co2_emissions"][ |
||
| 359 | "other_non_renewable" |
||
| 360 | ] / read_costs(costs, "OCGT", "efficiency"), |
||
| 361 | "lignite": global_settings(scenario)["fuel_costs"]["lignite"] |
||
| 362 | / read_costs(costs, "lignite", "efficiency") |
||
| 363 | + read_costs(costs, "lignite", "VOM") |
||
| 364 | + global_settings(scenario)["co2_costs"] |
||
| 365 | * global_settings(scenario)["co2_emissions"]["lignite"] |
||
| 366 | / read_costs(costs, "lignite", "efficiency"), |
||
| 367 | "coal": global_settings(scenario)["fuel_costs"]["coal"] |
||
| 368 | / read_costs(costs, "coal", "efficiency") |
||
| 369 | + read_costs(costs, "coal", "VOM") |
||
| 370 | + global_settings(scenario)["co2_costs"] |
||
| 371 | * global_settings(scenario)["co2_emissions"]["coal"] |
||
| 372 | / read_costs(costs, "coal", "efficiency"), |
||
| 373 | "nuclear": global_settings(scenario)["fuel_costs"]["nuclear"] |
||
| 374 | / read_costs(costs, "nuclear", "efficiency") |
||
| 375 | + read_costs(costs, "nuclear", "VOM"), |
||
| 376 | "biomass": global_settings(scenario)["fuel_costs"]["biomass"] |
||
| 377 | / read_costs(costs, "biomass", "efficiency") |
||
| 378 | + read_costs(costs, "biomass CHP", "VOM"), |
||
| 379 | "wind_offshore": read_costs(costs, "offwind", "VOM"), |
||
| 380 | "wind_onshore": read_costs(costs, "onwind", "VOM"), |
||
| 381 | "solar": read_costs(costs, "solar", "VOM"), |
||
| 382 | } |
||
| 383 | |||
| 384 | elif scenario == "eGon100RE": |
||
| 385 | costs = read_csv(2050) |
||
| 386 | |||
| 387 | parameters = {"grid_topology": "Status Quo"} |
||
| 388 | |||
| 389 | # Insert effciencies in p.u. |
||
| 390 | parameters["efficiency"] = { |
||
| 391 | "battery": { |
||
| 392 | "store": read_costs(costs, "battery inverter", "efficiency") |
||
| 393 | ** 0.5, |
||
| 394 | "dispatch": read_costs(costs, "battery inverter", "efficiency") |
||
| 395 | ** 0.5, |
||
| 396 | "standing_loss": 0, |
||
| 397 | "max_hours": 6, |
||
| 398 | "cyclic_state_of_charge": True, |
||
| 399 | }, |
||
| 400 | "pumped_hydro": { |
||
| 401 | "store": read_costs(costs, "PHS", "efficiency") ** 0.5, |
||
| 402 | "dispatch": read_costs(costs, "PHS", "efficiency") ** 0.5, |
||
| 403 | "standing_loss": 0, |
||
| 404 | "max_hours": 6, |
||
| 405 | "cyclic_state_of_charge": True, |
||
| 406 | }, |
||
| 407 | } |
||
| 408 | # Warning: Electrical parameters are set in osmTGmod, editing these values will not change the data! |
||
| 409 | parameters["electrical_parameters"] = { |
||
| 410 | "ac_line_110kV": { |
||
| 411 | "s_nom": 260, # [MVA] |
||
| 412 | "R": 0.109, # [Ohm/km] |
||
| 413 | "L": 1.2, # [mH/km] |
||
| 414 | }, |
||
| 415 | "ac_cable_110kV": { |
||
| 416 | "s_nom": 280, # [MVA] |
||
| 417 | "R": 0.0177, # [Ohm/km] |
||
| 418 | "L": 0.3, # [mH/km] |
||
| 419 | }, |
||
| 420 | "ac_line_220kV": { |
||
| 421 | "s_nom": 520, # [MVA] |
||
| 422 | "R": 0.109, # [Ohm/km] |
||
| 423 | "L": 1.0, # [mH/km] |
||
| 424 | }, |
||
| 425 | "ac_cable_220kV": { |
||
| 426 | "s_nom": 550, # [MVA] |
||
| 427 | "R": 0.0176, # [Ohm/km] |
||
| 428 | "L": 0.3, # [mH/km] |
||
| 429 | }, |
||
| 430 | "ac_line_380kV": { |
||
| 431 | "s_nom": 1790, # [MVA] |
||
| 432 | "R": 0.028, # [Ohm/km] |
||
| 433 | "L": 0.8, # [mH/km] |
||
| 434 | }, |
||
| 435 | "ac_cable_380kV": { |
||
| 436 | "s_nom": 925, # [MVA] |
||
| 437 | "R": 0.0175, # [Ohm/km] |
||
| 438 | "L": 0.3, # [mH/km] |
||
| 439 | }, |
||
| 440 | } |
||
| 441 | |||
| 442 | # Insert overnight investment costs |
||
| 443 | # Source for transformer costs: Netzentwicklungsplan Strom 2035, Version 2021, 2. Entwurf |
||
| 444 | # Source for HV lines and cables: Dena Verteilnetzstudie 2021, p. 146 |
||
| 445 | parameters["overnight_cost"] = { |
||
| 446 | "ac_ehv_overhead_line": read_costs( |
||
| 447 | costs, "HVAC overhead", "investment" |
||
| 448 | ), # [EUR/km/MW] |
||
| 449 | "ac_hv_overhead_line": 0.06e6 |
||
| 450 | / parameters["electrical_parameters"]["ac_line_110kV"][ |
||
| 451 | "s_nom" |
||
| 452 | ], # [EUR/km/MW] |
||
| 453 | "ac_hv_cable": 0.8e6 |
||
| 454 | / parameters["electrical_parameters"]["ac_cable_110kV"][ |
||
| 455 | "s_nom" |
||
| 456 | ], # [EUR/km/MW] |
||
| 457 | "dc_overhead_line": read_costs( |
||
| 458 | costs, "HVDC overhead", "investment" |
||
| 459 | ), |
||
| 460 | "dc_cable": read_costs(costs, "HVDC overhead", "investment"), |
||
| 461 | "dc_inverter": read_costs( |
||
| 462 | costs, "HVDC inverter pair", "investment" |
||
| 463 | ), |
||
| 464 | "transformer_380_110": 17.33e3, # [EUR/MVA] |
||
| 465 | "transformer_380_220": 13.33e3, # [EUR/MVA] |
||
| 466 | "transformer_220_110": 17.5e3, # [EUR/MVA] |
||
| 467 | "battery inverter": read_costs( |
||
| 468 | costs, "battery inverter", "investment" |
||
| 469 | ), |
||
| 470 | "battery storage": read_costs( |
||
| 471 | costs, "battery storage", "investment" |
||
| 472 | ), |
||
| 473 | } |
||
| 474 | |||
| 475 | parameters["lifetime"] = { |
||
| 476 | "ac_ehv_overhead_line": read_costs( |
||
| 477 | costs, "HVAC overhead", "lifetime" |
||
| 478 | ), |
||
| 479 | "ac_ehv_cable": read_costs(costs, "HVAC overhead", "lifetime"), |
||
| 480 | "ac_hv_overhead_line": read_costs( |
||
| 481 | costs, "HVAC overhead", "lifetime" |
||
| 482 | ), |
||
| 483 | "ac_hv_cable": read_costs(costs, "HVAC overhead", "lifetime"), |
||
| 484 | "dc_overhead_line": read_costs(costs, "HVDC overhead", "lifetime"), |
||
| 485 | "dc_cable": read_costs(costs, "HVDC overhead", "lifetime"), |
||
| 486 | "dc_inverter": read_costs(costs, "HVDC inverter pair", "lifetime"), |
||
| 487 | "transformer_380_110": read_costs( |
||
| 488 | costs, "HVAC overhead", "lifetime" |
||
| 489 | ), |
||
| 490 | "transformer_380_220": read_costs( |
||
| 491 | costs, "HVAC overhead", "lifetime" |
||
| 492 | ), |
||
| 493 | "transformer_220_110": read_costs( |
||
| 494 | costs, "HVAC overhead", "lifetime" |
||
| 495 | ), |
||
| 496 | "battery inverter": read_costs( |
||
| 497 | costs, "battery inverter", "lifetime" |
||
| 498 | ), |
||
| 499 | "battery storage": read_costs( |
||
| 500 | costs, "battery storage", "lifetime" |
||
| 501 | ), |
||
| 502 | } |
||
| 503 | # Insert annualized capital costs |
||
| 504 | # lines in EUR/km/MW/a |
||
| 505 | # transfermer, inverter, battery in EUR/MW/a |
||
| 506 | parameters["capital_cost"] = {} |
||
| 507 | |||
| 508 | for comp in parameters["overnight_cost"].keys(): |
||
| 509 | parameters["capital_cost"][comp] = annualize_capital_costs( |
||
| 510 | parameters["overnight_cost"][comp], |
||
| 511 | parameters["lifetime"][comp], |
||
| 512 | global_settings("eGon2035")["interest_rate"], |
||
| 513 | ) |
||
| 514 | |||
| 515 | parameters["capital_cost"]["battery"] = ( |
||
| 516 | parameters["capital_cost"]["battery inverter"] |
||
| 517 | + parameters["efficiency"]["battery"]["max_hours"] |
||
| 518 | * parameters["capital_cost"]["battery storage"] |
||
| 519 | ) |
||
| 520 | |||
| 521 | # Insert marginal_costs in EUR/MWh |
||
| 522 | # marginal cost can include fuel, C02 and operation and maintenance costs |
||
| 523 | parameters["marginal_cost"] = { |
||
| 524 | "wind_offshore": read_costs(costs, "offwind", "VOM"), |
||
| 525 | "wind_onshore": read_costs(costs, "onwind", "VOM"), |
||
| 526 | "solar": read_costs(costs, "solar", "VOM"), |
||
| 527 | } |
||
| 528 | |||
| 529 | elif scenario == "eGon2021": |
||
| 530 | parameters = {} |
||
| 531 | |||
| 532 | elif (scenario == "status2019") or (scenario == "status2023"): |
||
| 533 | costs = read_csv(2020) |
||
| 534 | |||
| 535 | parameters = {"grid_topology": "Status Quo"} |
||
| 536 | # Insert effciencies in p.u. |
||
| 537 | parameters["efficiency"] = { |
||
| 538 | "oil": read_costs(costs, "oil", "efficiency"), |
||
| 539 | "battery": { |
||
| 540 | "store": read_costs(costs, "battery inverter", "efficiency") |
||
| 541 | ** 0.5, |
||
| 542 | "dispatch": read_costs(costs, "battery inverter", "efficiency") |
||
| 543 | ** 0.5, |
||
| 544 | "standing_loss": 0, |
||
| 545 | "max_hours": 6, |
||
| 546 | "cyclic_state_of_charge": True, |
||
| 547 | }, |
||
| 548 | "pumped_hydro": { |
||
| 549 | "store": read_costs(costs, "PHS", "efficiency") ** 0.5, |
||
| 550 | "dispatch": read_costs(costs, "PHS", "efficiency") ** 0.5, |
||
| 551 | "standing_loss": 0, |
||
| 552 | "max_hours": 6, |
||
| 553 | "cyclic_state_of_charge": True, |
||
| 554 | }, |
||
| 555 | } |
||
| 556 | # Warning: Electrical parameters are set in osmTGmod, editing these values will not change the data! |
||
| 557 | parameters["electrical_parameters"] = { |
||
| 558 | "ac_line_110kV": { |
||
| 559 | "s_nom": 260, # [MVA] |
||
| 560 | "R": 0.109, # [Ohm/km] |
||
| 561 | "L": 1.2, # [mH/km] |
||
| 562 | }, |
||
| 563 | "ac_cable_110kV": { |
||
| 564 | "s_nom": 280, # [MVA] |
||
| 565 | "R": 0.0177, # [Ohm/km] |
||
| 566 | "L": 0.3, # [mH/km] |
||
| 567 | }, |
||
| 568 | "ac_line_220kV": { |
||
| 569 | "s_nom": 520, # [MVA] |
||
| 570 | "R": 0.109, # [Ohm/km] |
||
| 571 | "L": 1.0, # [mH/km] |
||
| 572 | }, |
||
| 573 | "ac_cable_220kV": { |
||
| 574 | "s_nom": 550, # [MVA] |
||
| 575 | "R": 0.0176, # [Ohm/km] |
||
| 576 | "L": 0.3, # [mH/km] |
||
| 577 | }, |
||
| 578 | "ac_line_380kV": { |
||
| 579 | "s_nom": 1790, # [MVA] |
||
| 580 | "R": 0.028, # [Ohm/km] |
||
| 581 | "L": 0.8, # [mH/km] |
||
| 582 | }, |
||
| 583 | "ac_cable_380kV": { |
||
| 584 | "s_nom": 925, # [MVA] |
||
| 585 | "R": 0.0175, # [Ohm/km] |
||
| 586 | "L": 0.3, # [mH/km] |
||
| 587 | }, |
||
| 588 | } |
||
| 589 | |||
| 590 | # Insert overnight investment costs |
||
| 591 | # Source for eHV grid costs: Netzentwicklungsplan Strom 2035, Version 2021, 2. Entwurf |
||
| 592 | # Source for HV lines and cables: Dena Verteilnetzstudie 2021, p. 146 |
||
| 593 | parameters["overnight_cost"] = { |
||
| 594 | "ac_ehv_overhead_line": 2.5e6 |
||
| 595 | / ( |
||
| 596 | 2 |
||
| 597 | * parameters["electrical_parameters"]["ac_line_380kV"]["s_nom"] |
||
| 598 | ), # [EUR/km/MW] |
||
| 599 | "ac_ehv_cable": 11.5e6 |
||
| 600 | / ( |
||
| 601 | 2 |
||
| 602 | * parameters["electrical_parameters"]["ac_cable_380kV"][ |
||
| 603 | "s_nom" |
||
| 604 | ] |
||
| 605 | ), # [EUR/km/MW] |
||
| 606 | "ac_hv_overhead_line": 0.06e6 |
||
| 607 | / parameters["electrical_parameters"]["ac_line_110kV"][ |
||
| 608 | "s_nom" |
||
| 609 | ], # [EUR/km/MW] |
||
| 610 | "ac_hv_cable": 0.8e6 |
||
| 611 | / parameters["electrical_parameters"]["ac_cable_110kV"][ |
||
| 612 | "s_nom" |
||
| 613 | ], # [EUR/km/MW] |
||
| 614 | "dc_overhead_line": 0.5e3, # [EUR/km/MW] |
||
| 615 | "dc_cable": 3.25e3, # [EUR/km/MW] |
||
| 616 | "dc_inverter": 0.3e6, # [EUR/MW] |
||
| 617 | "transformer_380_110": 17.33e3, # [EUR/MVA] |
||
| 618 | "transformer_380_220": 13.33e3, # [EUR/MVA] |
||
| 619 | "transformer_220_110": 17.5e3, # [EUR/MVA] |
||
| 620 | "battery inverter": read_costs( |
||
| 621 | costs, "battery inverter", "investment" |
||
| 622 | ), |
||
| 623 | "battery storage": read_costs( |
||
| 624 | costs, "battery storage", "investment" |
||
| 625 | ), |
||
| 626 | } |
||
| 627 | |||
| 628 | parameters["lifetime"] = { |
||
| 629 | "ac_ehv_overhead_line": read_costs( |
||
| 630 | costs, "HVAC overhead", "lifetime" |
||
| 631 | ), |
||
| 632 | "ac_ehv_cable": read_costs(costs, "HVAC overhead", "lifetime"), |
||
| 633 | "ac_hv_overhead_line": read_costs( |
||
| 634 | costs, "HVAC overhead", "lifetime" |
||
| 635 | ), |
||
| 636 | "ac_hv_cable": read_costs(costs, "HVAC overhead", "lifetime"), |
||
| 637 | "dc_overhead_line": read_costs(costs, "HVDC overhead", "lifetime"), |
||
| 638 | "dc_cable": read_costs(costs, "HVDC overhead", "lifetime"), |
||
| 639 | "dc_inverter": read_costs(costs, "HVDC inverter pair", "lifetime"), |
||
| 640 | "transformer_380_110": read_costs( |
||
| 641 | costs, "HVAC overhead", "lifetime" |
||
| 642 | ), |
||
| 643 | "transformer_380_220": read_costs( |
||
| 644 | costs, "HVAC overhead", "lifetime" |
||
| 645 | ), |
||
| 646 | "transformer_220_110": read_costs( |
||
| 647 | costs, "HVAC overhead", "lifetime" |
||
| 648 | ), |
||
| 649 | "battery inverter": read_costs( |
||
| 650 | costs, "battery inverter", "lifetime" |
||
| 651 | ), |
||
| 652 | "battery storage": read_costs( |
||
| 653 | costs, "battery storage", "lifetime" |
||
| 654 | ), |
||
| 655 | } |
||
| 656 | # Insert annualized capital costs |
||
| 657 | # lines in EUR/km/MW/a |
||
| 658 | # transfermer, inverter, battery in EUR/MW/a |
||
| 659 | parameters["capital_cost"] = {} |
||
| 660 | |||
| 661 | for comp in parameters["overnight_cost"].keys(): |
||
| 662 | parameters["capital_cost"][comp] = annualize_capital_costs( |
||
| 663 | parameters["overnight_cost"][comp], |
||
| 664 | parameters["lifetime"][comp], |
||
| 665 | global_settings("status2019")["interest_rate"], |
||
| 666 | ) |
||
| 667 | |||
| 668 | parameters["capital_cost"]["battery"] = ( |
||
| 669 | parameters["capital_cost"]["battery inverter"] |
||
| 670 | + parameters["efficiency"]["battery"]["max_hours"] |
||
| 671 | * parameters["capital_cost"]["battery storage"] |
||
| 672 | ) |
||
| 673 | |||
| 674 | parameters["marginal_cost"] = { |
||
| 675 | "oil": global_settings(scenario)["fuel_costs"]["oil"] |
||
| 676 | / read_costs(costs, "oil", "efficiency") |
||
| 677 | + read_costs(costs, "oil", "VOM") |
||
| 678 | + global_settings(scenario)["co2_costs"] |
||
| 679 | * global_settings(scenario)["co2_emissions"]["oil"] |
||
| 680 | / read_costs(costs, "oil", "efficiency"), |
||
| 681 | "other_non_renewable": global_settings(scenario)["fuel_costs"][ |
||
| 682 | "gas" |
||
| 683 | ] / read_costs(costs, "OCGT", "efficiency") |
||
| 684 | + global_settings(scenario)["co2_costs"] |
||
| 685 | * global_settings(scenario)["co2_emissions"][ |
||
| 686 | "other_non_renewable" |
||
| 687 | ] / read_costs(costs, "OCGT", "efficiency"), |
||
| 688 | "lignite": global_settings(scenario)["fuel_costs"]["lignite"] |
||
| 689 | / read_costs(costs, "lignite", "efficiency") |
||
| 690 | + read_costs(costs, "lignite", "VOM") |
||
| 691 | + global_settings(scenario)["co2_costs"] |
||
| 692 | * global_settings(scenario)["co2_emissions"]["lignite"] |
||
| 693 | / read_costs(costs, "lignite", "efficiency"), |
||
| 694 | "coal": global_settings(scenario)["fuel_costs"]["coal"] |
||
| 695 | / read_costs(costs, "coal", "efficiency") |
||
| 696 | + read_costs(costs, "coal", "VOM") |
||
| 697 | + global_settings(scenario)["co2_costs"] |
||
| 698 | * global_settings(scenario)["co2_emissions"]["coal"] |
||
| 699 | / read_costs(costs, "coal", "efficiency"), |
||
| 700 | "OCGT": global_settings(scenario)["fuel_costs"]["gas"] |
||
| 701 | / read_costs(costs, "OCGT", "efficiency") |
||
| 702 | + read_costs(costs, "OCGT", "VOM") |
||
| 703 | + global_settings(scenario)["co2_costs"] |
||
| 704 | * global_settings(scenario)["co2_emissions"]["gas"] |
||
| 705 | / read_costs(costs, "OCGT", "efficiency"), |
||
| 706 | "nuclear": global_settings(scenario)["fuel_costs"]["nuclear"] |
||
| 707 | / read_costs(costs, "nuclear", "efficiency") |
||
| 708 | + read_costs(costs, "nuclear", "VOM"), |
||
| 709 | "biomass": global_settings(scenario)["fuel_costs"]["biomass"] |
||
| 710 | / read_costs(costs, "biomass CHP", "efficiency") |
||
| 711 | + read_costs(costs, "biomass CHP", "VOM"), |
||
| 712 | "wind_offshore": read_costs(costs, "offwind", "VOM"), |
||
| 713 | "wind_onshore": read_costs(costs, "onwind", "VOM"), |
||
| 714 | "solar": read_costs(costs, "solar", "VOM"), |
||
| 715 | } |
||
| 716 | |||
| 717 | else: |
||
| 718 | print(f"Scenario name {scenario} is not valid.") |
||
| 719 | |||
| 720 | return parameters |
||
| 721 | |||
| 1245 |