You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RELOG/test/instance_test.jl

19 lines
691 B

# Copyright (C) 2020 Argonne National Laboratory
# Written by Alinson Santos Xavier <axavier@anl.gov>
using ReverseManufacturing
@testset "Instance" begin
instance = ReverseManufacturing.load("samples/s1")
plants, products = instance.plants, instance.products
@test length(products) == 4
@test sort(collect(keys(plants))) == ["F1", "F2", "F3", "F4"]
@test plants["F1"]["input product"] == products["P1"]
@test sort(collect(keys(products))) == ["P1", "P2", "P3", "P4"]
@test products["P1"]["input plants"] == [plants["F1"]]
@test products["P1"]["transportation cost"] == 1.5
@test products["P1"]["initial amounts"]["C1"]["latitude"] == 7.0
end