Skip to content

Commit 0b13f85

Browse files
committed
Delay computation of cost using commodity_price out of t_objective_flows
Part of #1269
1 parent 730e44c commit 0b13f85

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/objective.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ function add_objective!(connection, model, variables, expressions, model_paramet
231231
* rp_weight.weight_sum
232232
* rp_res.resolution
233233
* (var.time_block_end - var.time_block_start + 1)
234-
* obj.total_variable_cost
234+
* (obj.commodity_price / obj.efficiency + obj.operational_cost)
235235
AS cost,
236236
FROM var_flow AS var
237237
LEFT JOIN t_objective_flows as obj
@@ -529,8 +529,6 @@ function _create_objective_auxiliary_table(connection, constants)
529529
asset_commission.efficiency,
530530
flow_milestone.operational_cost,
531531
-- computed
532-
(asset_milestone.commodity_price / asset_commission.efficiency) AS fuel_cost,
533-
(fuel_cost + flow_milestone.operational_cost) AS total_variable_cost,
534532
CASE
535533
-- the below closed-form equation does not accept 0 in the denominator when flow.discount_rate = 0
536534
WHEN flow.discount_rate = 0

0 commit comments

Comments
 (0)