mirror of
https://github.com/ANL-CEEESA/RELOG.git
synced 2025-12-06 07:48:50 -06:00
Allow product disposal at collection centers
This commit is contained in:
@@ -18,7 +18,7 @@ using RELOG, Cbc, JuMP, Printf, JSON, MathOptInterface.FileFormats
|
||||
)
|
||||
|
||||
@test length(model[:flow]) == 76
|
||||
@test length(model[:dispose]) == 16
|
||||
@test length(model[:plant_dispose]) == 16
|
||||
@test length(model[:open_plant]) == 12
|
||||
@test length(model[:capacity]) == 12
|
||||
@test length(model[:expansion]) == 12
|
||||
@@ -32,7 +32,7 @@ using RELOG, Cbc, JuMP, Printf, JSON, MathOptInterface.FileFormats
|
||||
@test lower_bound(v) == 0.0
|
||||
@test upper_bound(v) == 750.0
|
||||
|
||||
v = model[:dispose][shipping_node_by_loc_and_prod_names["L1", "P2"], 1]
|
||||
v = model[:plant_dispose][shipping_node_by_loc_and_prod_names["L1", "P2"], 1]
|
||||
@test lower_bound(v) == 0.0
|
||||
@test upper_bound(v) == 1.0
|
||||
end
|
||||
|
||||
@@ -26,6 +26,15 @@ basedir = dirname(@__FILE__)
|
||||
@test "F2" in keys(solution["Plants"])
|
||||
@test "F3" in keys(solution["Plants"])
|
||||
@test "F4" in keys(solution["Plants"])
|
||||
|
||||
@test "Products" in keys(solution)
|
||||
@test "P1" in keys(solution["Products"])
|
||||
@test "C1" in keys(solution["Products"]["P1"])
|
||||
@test "Dispose (tonne)" in keys(solution["Products"]["P1"]["C1"])
|
||||
|
||||
total_disposal =
|
||||
sum([loc["Dispose (tonne)"] for loc in values(solution["Products"]["P1"])])
|
||||
@test total_disposal == [1.0, 1.0]
|
||||
end
|
||||
|
||||
@testset "solve (heuristic)" begin
|
||||
|
||||
Reference in New Issue
Block a user