Format source code

feature/CapEx
Alinson S. Xavier 3 years ago
parent 78128bd79b
commit 40506c13eb
Signed by: isoron
GPG Key ID: 0DA8E4B9E1109DCA

@ -152,7 +152,7 @@ function create_objective_function!(model::JuMP.Model)
# Acquisition costs # Acquisition costs
add_to_expression!( add_to_expression!(
obj, 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. # Disposal costs -- in this case, we recover the acquisition cost.

@ -46,22 +46,15 @@ function get_solution(model::JuMP.Model; marginal_costs = true)
"Amount (tonne)" => n.location.amount, "Amount (tonne)" => n.location.amount,
"Dispose (tonne)" => "Dispose (tonne)" =>
[JuMP.value(model[:collection_dispose][n, t]) for t = 1:T], [JuMP.value(model[:collection_dispose][n, t]) for t = 1:T],
"Acquisition cost (\$)" => "Acquisition cost (\$)" => [
[ (n.location.amount[t] - JuMP.value(model[:collection_dispose][n, t])) * n.location.product.acquisition_cost[t] for t = 1:T
( ],
n.location.amount[t] - "Disposal cost (\$)" => [
JuMP.value(model[:collection_dispose][n, t]) (
) * n.location.product.acquisition_cost[t] JuMP.value(model[:collection_dispose][n, t]) *
for t = 1:T n.location.product.disposal_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 if marginal_costs
location_dict["Marginal cost (\$/tonne)"] = [ location_dict["Marginal cost (\$/tonne)"] = [

Loading…
Cancel
Save