Finish multi-period output; update paths

This commit is contained in:
2020-05-05 19:24:33 -05:00
parent e37d411bf4
commit 8f59322e3f
6 changed files with 181 additions and 79 deletions

View File

@@ -6,7 +6,7 @@ using ReverseManufacturing
@testset "Graph" begin
@testset "build_graph" begin
basedir = dirname(@__FILE__)
instance = ReverseManufacturing.load("$basedir/../instances/samples/s1.json")
instance = ReverseManufacturing.load("$basedir/../instances/s1.json")
graph = ReverseManufacturing.build_graph(instance)
process_node_by_location_name = Dict(n.location.location_name => n
for n in graph.process_nodes)

View File

@@ -6,7 +6,7 @@ using ReverseManufacturing
@testset "Instance" begin
@testset "load" begin
basedir = dirname(@__FILE__)
instance = ReverseManufacturing.load("$basedir/../instances/samples/s1.json")
instance = ReverseManufacturing.load("$basedir/../instances/s1.json")
centers = instance.collection_centers
plants = instance.plants

View File

@@ -6,7 +6,7 @@ using ReverseManufacturing, Cbc, JuMP, Printf, JSON, MathOptInterface.FileFormat
@testset "Model" begin
@testset "build" begin
basedir = dirname(@__FILE__)
instance = ReverseManufacturing.load("$basedir/../instances/samples/s1.json")
instance = ReverseManufacturing.load("$basedir/../instances/s1.json")
graph = ReverseManufacturing.build_graph(instance)
model = ReverseManufacturing.build_model(instance, graph, Cbc.Optimizer)
@@ -43,8 +43,8 @@ using ReverseManufacturing, Cbc, JuMP, Printf, JSON, MathOptInterface.FileFormat
end
@testset "solve" begin
solution = ReverseManufacturing.solve("$(pwd())/../instances/samples/s1.json")
#JSON.print(stdout, solution, 4)
solution = ReverseManufacturing.solve("$(pwd())/../instances/s1.json")
JSON.print(stdout, solution, 4)
@test "costs" in keys(solution)
@test "fixed operating" in keys(solution["costs"])