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
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.

@ -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
"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 (\$)" =>
[
"Disposal cost (\$)" => [
(
JuMP.value(model[:collection_dispose][n, t])
* n.location.product.disposal_cost[t]
)
for t = 1:T
]
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)"] = [

Loading…
Cancel
Save