summaryrefslogtreecommitdiffstats
path: root/example1.py
diff options
context:
space:
mode:
authorMitsuo Tokumori <[email protected]>2022-04-24 18:48:51 -0500
committerMitsuo Tokumori <[email protected]>2022-04-24 18:48:51 -0500
commit453a2ae1d15f3fcb197f17974c8541216c4baded (patch)
tree862f81e0f872a0ccedeae9ba4bfa150da844b949 /example1.py
parent332f13fefb21cf47361562db42bac73ef608ec0d (diff)
downloadVRPTW-ACO-python-453a2ae1d15f3fcb197f17974c8541216c4baded.tar.gz
VRPTW-ACO-python-453a2ae1d15f3fcb197f17974c8541216c4baded.tar.bz2
VRPTW-ACO-python-453a2ae1d15f3fcb197f17974c8541216c4baded.zip
Add comments to vrptw_base
Also add sols/ directory. MACS generated travel_paths.
Diffstat (limited to 'example1.py')
-rw-r--r--example1.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/example1.py b/example1.py
index dd1a3ec..165e7ff 100644
--- a/example1.py
+++ b/example1.py
@@ -1,9 +1,8 @@
from vrptw_base import VrptwGraph
from multiple_ant_colony_system import MultipleAntColonySystem
-
-if __name__ == '__main__':
- file_path = './solomon-100/c101.txt'
+def main():
+ file_path = './solomon-100/c208.txt'
ants_num = 10
beta = 2
q0 = 0.1
@@ -12,3 +11,7 @@ if __name__ == '__main__':
graph = VrptwGraph(file_path)
macs = MultipleAntColonySystem(graph, ants_num=ants_num, beta=beta, q0=q0, whether_or_not_to_show_figure=show_figure)
macs.run_multiple_ant_colony_system()
+
+
+if __name__ == '__main__':
+ main()