mirror of
https://github.com/ANL-CEEESA/RELOG.git
synced 2025-12-05 23:38:52 -06:00
Merge branch 'master' into feature/collection-disposal
This commit is contained in:
@@ -21,7 +21,7 @@ using RELOG
|
||||
@test node.outgoing_arcs[1].source.location.name == "C1"
|
||||
@test node.outgoing_arcs[1].dest.location.plant_name == "F1"
|
||||
@test node.outgoing_arcs[1].dest.location.location_name == "L1"
|
||||
@test node.outgoing_arcs[1].values["distance"] == 1095.62
|
||||
@test node.outgoing_arcs[1].values["distance"] == 1695.364
|
||||
|
||||
node = process_node_by_location_name["L1"]
|
||||
@test node.location.plant_name == "F1"
|
||||
|
||||
25
test/graph/dist_test.jl
Normal file
25
test/graph/dist_test.jl
Normal file
@@ -0,0 +1,25 @@
|
||||
# RELOG: Reverse Logistics Optimization
|
||||
# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved.
|
||||
# Released under the modified BSD license. See COPYING.md for more details.
|
||||
|
||||
using RELOG
|
||||
|
||||
@testset "KnnDrivingDistance" begin
|
||||
# Euclidean distance between Chicago and Indianapolis
|
||||
@test RELOG._calculate_distance(
|
||||
41.866,
|
||||
-87.656,
|
||||
39.764,
|
||||
-86.148,
|
||||
RELOG.EuclideanDistance(),
|
||||
) == 265.818
|
||||
|
||||
# Approximate driving distance between Chicago and Indianapolis
|
||||
@test RELOG._calculate_distance(
|
||||
41.866,
|
||||
-87.656,
|
||||
39.764,
|
||||
-86.148,
|
||||
RELOG.KnnDrivingDistance(),
|
||||
) == 316.43
|
||||
end
|
||||
@@ -11,6 +11,7 @@ using Test
|
||||
end
|
||||
@testset "Graph" begin
|
||||
include("graph/build_test.jl")
|
||||
include("graph/dist_test.jl")
|
||||
end
|
||||
@testset "Model" begin
|
||||
include("model/build_test.jl")
|
||||
|
||||
Reference in New Issue
Block a user