From 51100dcaa6cb19bb33154dafab3677e1621c12af Mon Sep 17 00:00:00 2001 From: itskalvik Date: Tue, 17 Dec 2024 19:59:52 -0600 Subject: [PATCH] Fix run_tsp --- sgptools/utils/tsp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sgptools/utils/tsp.py b/sgptools/utils/tsp.py index d0d9c45..c561a02 100644 --- a/sgptools/utils/tsp.py +++ b/sgptools/utils/tsp.py @@ -74,14 +74,14 @@ def run_tsp(nodes, # Get start and end node indices for ortools if start_nodes is None: - start_idx = [0]*num_vehicles + start_idx = np.zeros(num_vehicles, dtype=int) num_start_nodes = 0 else: start_idx = np.arange(num_vehicles)+int(trim_paths) num_start_nodes = len(start_nodes) if end_nodes is None: - end_idx = [0]*num_vehicles + end_idx = np.zeros(num_vehicles, dtype=int) else: end_idx = np.arange(num_vehicles)+num_start_nodes+int(trim_paths)