From 23b60060abd4bdd14d691bc8fccb82b0c4cc56a0 Mon Sep 17 00:00:00 2001 From: PatrickOHara Date: Fri, 27 Nov 2020 12:54:33 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=20Lint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_profits_problem.py | 2 -- tspwplib/problem.py | 2 -- 2 files changed, 4 deletions(-) diff --git a/tests/test_profits_problem.py b/tests/test_profits_problem.py index b287524..ced1f98 100644 --- a/tests/test_profits_problem.py +++ b/tests/test_profits_problem.py @@ -26,8 +26,6 @@ def test_get_cost_limit(oplib_root, generation, instance_name, alpha): oplib_root, generation, instance_name, alpha=alpha ) problem = ProfitsProblem.load(filepath) - # total_cost = sum([problem.get_weight(source, target) for source, target in problem.get_edges()]) - expected_cost_limit = math.ceil( OptimalSolutionTSP[instance_name] * (alpha.value / 100.0) ) diff --git a/tspwplib/problem.py b/tspwplib/problem.py index 94d8f06..02b0ea6 100644 --- a/tspwplib/problem.py +++ b/tspwplib/problem.py @@ -13,7 +13,6 @@ class ProfitsProblem(tsplib95.models.StandardProblem): node_score = tsplib95.fields.DemandsField("NODE_SCORE_SECTION") # The optimal solution to the TSP tspsol = tsplib95.fields.IntegerField("TSPSOL") - # TODO add profit limit for PcTSP def get_cost_limit(self) -> int: """Get the cost limit for a TSP with Profits problem @@ -29,7 +28,6 @@ def get_node_score(self) -> Dict[int, int]: Returns: Mapping from node to node score (profit) """ - # TODO def get_tsp_optimal_value(self) -> int: """Get the value of the optimal solution to TSP