diff --git a/src/model/build.jl b/src/model/build.jl index 552416f..696f86c 100644 --- a/src/model/build.jl +++ b/src/model/build.jl @@ -152,7 +152,7 @@ function create_objective_function!(model::JuMP.Model) # Acquisition costs add_to_expression!( obj, - n.location.product.acquisition_cost[t] * n.location.amount[t] + n.location.product.acquisition_cost[t] * n.location.amount[t], ) # Disposal costs -- in this case, we recover the acquisition cost. diff --git a/src/model/getsol.jl b/src/model/getsol.jl index 40f9db5..8c9b37c 100644 --- a/src/model/getsol.jl +++ b/src/model/getsol.jl @@ -46,22 +46,15 @@ function get_solution(model::JuMP.Model; marginal_costs = true) "Amount (tonne)" => n.location.amount, "Dispose (tonne)" => [JuMP.value(model[:collection_dispose][n, t]) for t = 1:T], - "Acquisition cost (\$)" => - [ - ( - n.location.amount[t] - - JuMP.value(model[:collection_dispose][n, t]) - ) * n.location.product.acquisition_cost[t] - for t = 1:T - ], - "Disposal cost (\$)" => - [ - ( - JuMP.value(model[:collection_dispose][n, t]) - * n.location.product.disposal_cost[t] - ) - for t = 1:T - ] + "Acquisition cost (\$)" => [ + (n.location.amount[t] - JuMP.value(model[:collection_dispose][n, t])) * n.location.product.acquisition_cost[t] for t = 1:T + ], + "Disposal cost (\$)" => [ + ( + JuMP.value(model[:collection_dispose][n, t]) * + n.location.product.disposal_cost[t] + ) for t = 1:T + ], ) if marginal_costs location_dict["Marginal cost (\$/tonne)"] = [