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