File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -485,7 +485,7 @@ function build_reopt!(m::JuMP.AbstractModel, p::REoptInputs)
485485 )
486486 if (p. s. storage. attr[b]. installed_cost_constant != 0 ) || (p. s. storage. attr[b]. replace_cost_constant != 0 )
487487 add_to_expression! (TotalStorageCapCosts, p. third_party_factor * sum (p. s. storage. attr[b]. net_present_cost_cost_constant * m[:binIncludeStorageCostConstant ][b] ))
488- m[:ElectricStorageCapCost ] += sum ( p. s. storage. attr[b]. installed_cost_constant * m[:binIncludeStorageCostConstant ][b])
488+ m[:ElectricStorageCapCost ] += p. s. storage. attr[b]. installed_cost_constant * m[:binIncludeStorageCostConstant ][b]
489489 end
490490 m[:ElectricStorageOMCost ] += p. third_party_factor * p. pwf_om * p. s. storage. attr[b]. om_cost_fraction_of_installed_cost * m[:ElectricStorageCapCost ]
491491
Original file line number Diff line number Diff line change @@ -213,9 +213,9 @@ function build_mpc!(m::JuMP.AbstractModel, p::MPCInputs)
213213
214214 if ! isempty (p. techs. electrolyzer)
215215 add_electrolyzer_constraints (m, p)
216- m[:TotalPerUnitProdOMCosts ] += @expression (m,
217- sum (p. s. electrolyzer. om_cost_per_kwh * p. hours_per_time_step *
216+ @expression (m, ElectrolyzerOMCost, sum (p. s. electrolyzer. om_cost_per_kwh * p. hours_per_time_step *
218217 m[:dvRatedProduction ][t, ts] for t in p. techs. electrolyzer, ts in p. time_steps))
218+ add_to_expression! (m[:TotalPerUnitProdOMCosts ], m[ElectrolyzerOMCost])
219219 else
220220 @constraint (m, [t in p. techs. elec, ts in p. time_steps],
221221 m[:dvProductionToElectrolyzer ][t, ts] == 0 )
You can’t perform that action at this time.
0 commit comments