Skip to content

Commit

Permalink
Get rid of costs to virtual charging & discharging in storage_all.jl
Browse files Browse the repository at this point in the history
Since virtual operations are theoretical and often lead to absurd outcomes.
  • Loading branch information
sambuddhac authored Jan 8, 2024
1 parent fa5f5b8 commit 13fe60d
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/model/resources/storage/storage_all.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,6 @@ function storage_all!(EP::Model, inputs::Dict, setup::Dict)
@expression(EP, eTotalCVarIn, sum(eTotalCVarInT[t] for t in 1:T))
add_to_expression!(EP[:eObj], eTotalCVarIn)


if CapacityReserveMargin > 0
#Variable costs of "virtual charging" for technologies "y" during hour "t" in zone "z"
@expression(EP, eCVar_in_virtual[y in STOR_ALL,t=1:T], inputs["omega"][t]*dfGen[y,:Var_OM_Cost_per_MWh_In]*vCAPRES_charge[y,t])
@expression(EP, eTotalCVarInT_virtual[t=1:T], sum(eCVar_in_virtual[y,t] for y in STOR_ALL))
@expression(EP, eTotalCVarIn_virtual, sum(eTotalCVarInT_virtual[t] for t in 1:T))
EP[:eObj] += eTotalCVarIn_virtual

#Variable costs of "virtual discharging" for technologies "y" during hour "t" in zone "z"
@expression(EP, eCVar_out_virtual[y in STOR_ALL,t=1:T], inputs["omega"][t]*dfGen[y,:Var_OM_Cost_per_MWh]*vCAPRES_discharge[y,t])
@expression(EP, eTotalCVarOutT_virtual[t=1:T], sum(eCVar_out_virtual[y,t] for y in STOR_ALL))
@expression(EP, eTotalCVarOut_virtual, sum(eTotalCVarOutT_virtual[t] for t in 1:T))
EP[:eObj] += eTotalCVarOut_virtual
end

## Power Balance Expressions ##

# Term to represent net dispatch from storage in any period
Expand Down

0 comments on commit 13fe60d

Please sign in to comment.