From cc18b26eb23a1dd4c072a6c47e9a6fd721aebc0f Mon Sep 17 00:00:00 2001
From: "niehues.mark@gmail.com" <niehues.mark@gmail.com>
Date: Thu, 7 May 2020 16:00:05 +0200
Subject: [PATCH] bug fix

---
 evrouting/charge/utils.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/evrouting/charge/utils.py b/evrouting/charge/utils.py
index a8060d5..22fa9d6 100644
--- a/evrouting/charge/utils.py
+++ b/evrouting/charge/utils.py
@@ -55,15 +55,15 @@ class LabelPriorityQueue(PriorityQueue):
         it cannot lead to a better solution.
         """
         try:
-            label: Label = self.peak_min()
+            min_label: Label = self.peak_min()
         except KeyError:
             return
 
-        soc: SoCFunction = self.f_soc_factory(label)
+        soc: SoCFunction = self.f_soc_factory(min_label)
 
         # Remove item if it gets dominated by any label in l_set
         if any(self.f_soc_factory(label).dominates(soc) for label in self.l_set):
-            self.remove_item(label)
+            self.remove_item(min_label)
 
     @staticmethod
     def keys(f_soc: SoCFunction) -> Dict:
-- 
GitLab