Skip to content

Commit

Permalink
Optionally apply curtailment cost to storage losses (#848)
Browse files Browse the repository at this point in the history
  • Loading branch information
nmgeek authored Nov 30, 2021
1 parent 3ccf7c7 commit 5e1a05d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions gridpath/project/operations/operational_types/stor.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ def add_model_components(m, d, scenario_directory, subproblem, stage):
| |
| The fraction of storage losses that count against the energy target. |
+-------------------------------------------------------------------------+
| | :code:`stor_losses_factor_curtailment` |
| | *Within*: :code:`PercentFraction` |
| | *Default*: :code:`1` |
| |
| The fraction of storage losses that count against curtailment. |
+-------------------------------------------------------------------------+
| | :code:`stor_charging_capacity_multiplier` |
| | *Defined over*: :code:`STOR` |
| | *Within*: :code:`NonNegativeReals` |
Expand Down Expand Up @@ -273,6 +279,8 @@ def add_model_components(m, d, scenario_directory, subproblem, stage):

m.stor_losses_factor_in_energy_target = Param(default=1)

m.stor_losses_factor_curtailment = Param(default=1)

m.stor_charging_capacity_multiplier = Param(
m.STOR, within=NonNegativeReals, default=1.0
)
Expand Down Expand Up @@ -794,3 +802,20 @@ def validate_inputs(scenario_id, subscenarios, subproblem, stage, conn):

# Validate operational chars table inputs
validate_opchars(scenario_id, subscenarios, subproblem, stage, conn, "stor")


def curtailment_cost_rule(mod, g, tmp):
"""
Apply curtailment cost to round trip storage loss: to balance
against curtailment of variable projects.
"""
return (
(
mod.Stor_Discharge_MW[g, tmp]
* (1.0 - mod.stor_discharging_efficiency[g])
/ mod.stor_discharging_efficiency[g]
+ mod.Stor_Charge_MW[g, tmp] * (1.0 - mod.stor_charging_efficiency[g])
)
* mod.curtailment_cost_per_pwh[g]
* mod.stor_losses_factor_curtailment
)
2 changes: 1 addition & 1 deletion tests/test_data/inputs/projects.tab
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gas_CCGT_z2 Zone2 gen_spec exogenous 2 gen_commit_cap day Zone2 Zone2 Zone2 Zone
Coal_z2 Zone2 gen_spec exogenous 1 gen_commit_cap day . Zone2 . Zone2 0.4 1 0 Coal 6 . . 1 . . . . . . . . . . . . . . . . . . Carbon_Cap_Zone2 Carbon_Tax_Zone2 . . 0.05 0.05 . . . . PRM_Zone2 fully_deliverable 0.8 0 . . . . . . . 6
Gas_CT_z2 Zone2 gen_spec exogenous 2 gen_commit_cap day . . . . 0.4 0 1 Gas 6 . . 3 . . . . . . . . . . . . . . . . . . Carbon_Cap_Zone2 Carbon_Tax_Zone2 . . . . . . . . PRM_Zone2 fully_deliverable 0.8 0 . . . . . . . .
Wind_z2 Zone2 gen_spec exogenous 0 gen_var day . . . . . . . . . . . . . RPS_Zone_2 . . . . . . . . . . . . . . . . . . . . . . . . . . PRM_Zone2 energy_only_allowed 0.8 1 0.123 . . . . . . .
Battery Zone1 stor_new_lin exogenous 0 stor year Zone1 Zone1 Zone1 Zone1 . . . . . 0.8 0.8 . . . 1 99 . . . . . . . . . . . . . . . . 1 1 0.05 0.05 Zone1 0 . 1 PRM_Zone1 fully_deliverable_energy_limited 0.8 0 . Zone1 1 . 4 Local_Capacity_Zone1 0.6 .
Battery Zone1 stor_new_lin exogenous 0 stor year Zone1 Zone1 Zone1 Zone1 . . . . . 0.8 0.8 . 10 . 1 99 . . . . . . . . . . . . . . . . 1 1 0.05 0.05 Zone1 0 . 1 PRM_Zone1 fully_deliverable_energy_limited 0.8 0 . Zone1 1 . 4 Local_Capacity_Zone1 0.6 .
Battery_Binary Zone1 stor_new_bin exogenous 0 stor year Zone1 Zone1 Zone1 Zone1 . . . . . 0.8 0.8 . . . 1 . . . . . . . . . . . . . . . . . 1 1 0.05 0.05 Zone1 0 . 1 PRM_Zone1 fully_deliverable_energy_limited 0.8 0 . Zone1 1 . 4 Local_Capacity_Zone1 0.6 .
Battery_Specified Zone1 stor_spec exogenous 0 stor day Zone1 Zone1 Zone1 Zone1 . . . . . 0.8 0.8 . . . . . 0.5 0.5 0.5 0.5 . . . . . . . . . . . . . . 0.05 0.05 Zone1 0 0.5 . PRM_Zone1 fully_deliverable_energy_limited 0.8 0 . Zone1 . 0.5 4 Local_Capacity_Zone2 0.5 .
Hydro Zone1 gen_spec exogenous 0 gen_hydro day Zone1 Zone1 Zone1 Zone1 . . . . . . . . . . . . . . . . . . 0.5 0.5 . . . . . . . . 0.2 0.2 0.05 0.05 Zone1 0 . 0.2 PRM_Zone1 fully_deliverable 0.8 0 . Zone1 0.2 . . Local_Capacity_Zone1 0.5 .
Expand Down

0 comments on commit 5e1a05d

Please sign in to comment.