summaryrefslogtreecommitdiffstats
path: root/vprtw_aco_figure.py
diff options
context:
space:
mode:
authorJonZhao <[email protected]>2019-05-30 14:18:54 +0800
committerJonZhao <[email protected]>2019-05-30 14:18:54 +0800
commit0f421cb77e9f9c75415f61c32df9c36be65a86db (patch)
tree38367fa04315663d457851e689a8de2a010fd499 /vprtw_aco_figure.py
parent2eacd762b1605f4b6d449b8725d980c96de4d826 (diff)
downloadVRPTW-ACO-python-0f421cb77e9f9c75415f61c32df9c36be65a86db.tar.gz
VRPTW-ACO-python-0f421cb77e9f9c75415f61c32df9c36be65a86db.tar.bz2
VRPTW-ACO-python-0f421cb77e9f9c75415f61c32df9c36be65a86db.zip
1. show vehicle num in figure title
2. print how much time have used
Diffstat (limited to 'vprtw_aco_figure.py')
-rw-r--r--vprtw_aco_figure.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/vprtw_aco_figure.py b/vprtw_aco_figure.py
index 9860f8e..79fab72 100644
--- a/vprtw_aco_figure.py
+++ b/vprtw_aco_figure.py
@@ -59,10 +59,9 @@ class VrptwAcoFigure:
for line in remove_obj:
self.figure_ax.lines.remove(line)
remove_obj.clear()
- plt.pause(1)
# 重新绘制line
- self.figure_ax.set_title('current path travel distance: %f' % distance)
+ self.figure_ax.set_title('travel distance: %0.2f, number of vehicles: %d ' % (distance, used_vehicle_num))
self._draw_line(path)
plt.pause(1)