From 0e6ebb04fc63498bac25adef14826e305ee1f634 Mon Sep 17 00:00:00 2001 From: JonZhao <1044264932@qq.com> Date: Mon, 27 May 2019 20:24:59 +0800 Subject: =?UTF-8?q?=E4=BD=BF=E7=94=A8event=E6=9D=A5=E4=BD=9C=E4=B8=BA?= =?UTF-8?q?=E7=BA=BF=E7=A8=8B=E7=BB=88=E6=AD=A2=E4=BF=A1=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vrptw_base.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'vrptw_base.py') diff --git a/vrptw_base.py b/vrptw_base.py index 5837e10..4c2e7e1 100644 --- a/vrptw_base.py +++ b/vrptw_base.py @@ -178,17 +178,10 @@ class VrptwGraph: return nearest_ind -class VrptwMessage: - def __init__(self, info_type, path, distance): - super() - if info_type != 'stop' and info_type != 'path_info': - raise RuntimeError('info_type should be: stop or path_info') - self.info_type = info_type - self.path = copy.deepcopy(path) +class PathMessage: + def __init__(self, path, distance): + self.path = path self.distance = distance def get_path_info(self): return self.path, self.distance - - def is_to_stop(self): - return self.info_type == 'stop' -- cgit v1.2.3