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
|
# 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] -
|
|
||||||
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])
|
JuMP.value(model[:collection_dispose][n, t]) *
|
||||||
* n.location.product.disposal_cost[t]
|
n.location.product.disposal_cost[t]
|
||||||
)
|
) for t = 1:T
|
||||||
for t = 1:T
|
],
|
||||||
]
|
|
||||||
)
|
)
|
||||||
if marginal_costs
|
if marginal_costs
|
||||||
location_dict["Marginal cost (\$/tonne)"] = [
|
location_dict["Marginal cost (\$/tonne)"] = [
|
||||||
|
|||||||
Reference in New Issue
Block a user