mirror of
https://github.com/ANL-CEEESA/RELOG.git
synced 2025-12-06 07:48:50 -06:00
Format source code
This commit is contained in:
@@ -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
|
||||
],
|
||||
"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)"] = [
|
||||
|
||||
Reference in New Issue
Block a user