summaryrefslogtreecommitdiffstats
path: root/example2.py
diff options
context:
space:
mode:
authorJonZhao <[email protected]>2019-05-29 14:30:38 +0800
committerJonZhao <[email protected]>2019-05-29 14:30:38 +0800
commit1dcc89d6f9481368be538ae7339c1793fb546398 (patch)
tree5e43146089540d87bab69b5ba1e87422ec1ab002 /example2.py
parent8d459d62b4deed1212f613cad1967b36ca385d5a (diff)
downloadVRPTW-ACO-python-1dcc89d6f9481368be538ae7339c1793fb546398.tar.gz
VRPTW-ACO-python-1dcc89d6f9481368be538ae7339c1793fb546398.tar.bz2
VRPTW-ACO-python-1dcc89d6f9481368be538ae7339c1793fb546398.zip
更新figure class:在重新绘制line的过程中,只移除之前绘制了的line;更新了配色方案
Diffstat (limited to 'example2.py')
-rw-r--r--example2.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/example2.py b/example2.py
index 16e12b2..8afb652 100644
--- a/example2.py
+++ b/example2.py
@@ -4,7 +4,14 @@ from basic_aco import BasicACO
if __name__ == '__main__':
file_path = './solomon-100/c101.txt'
+ ants_num = 10
+ max_iter = 200
+ beta = 2
+ q0 = 0.1
+ show_figure = True
+
graph = VrptwGraph(file_path)
+ basic_aco = BasicACO(graph, ants_num=ants_num, max_iter=max_iter, beta=beta, q0=q0,
+ whether_or_not_to_show_figure=show_figure)
- vrptw = BasicACO(graph)
- vrptw.run_basic_aco() \ No newline at end of file
+ basic_aco.run_basic_aco()