summaryrefslogtreecommitdiffstats
path: root/example1.py
diff options
context:
space:
mode:
authorMitsuo Tokumori <[email protected]>2022-05-03 22:29:21 -0500
committerMitsuo Tokumori <[email protected]>2022-05-03 22:29:21 -0500
commit86240eac6b3889aa01c93e32978138572f87f81b (patch)
treece60b584eb3e2021ba77df56f5c0405f82eac4a4 /example1.py
parent77fb174ac6f3cf1b8e0c78a1e68bd9dd42cf2065 (diff)
downloadVRPTW-ACO-python-86240eac6b3889aa01c93e32978138572f87f81b.tar.gz
VRPTW-ACO-python-86240eac6b3889aa01c93e32978138572f87f81b.tar.bz2
VRPTW-ACO-python-86240eac6b3889aa01c93e32978138572f87f81b.zip
Add some translations and sample input data
Diffstat (limited to 'example1.py')
-rw-r--r--example1.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/example1.py b/example1.py
index c867f44..8b909bb 100644
--- a/example1.py
+++ b/example1.py
@@ -1,16 +1,18 @@
from vrptw_base import VrptwGraph
from multiple_ant_colony_system import MultipleAntColonySystem
+
def main():
- file_path = './solomon-100/c101.txt'
- #file_path = './odiparpack/pedidosperu78.txt'
+ #file_path = './solomon-100/c101.txt'
+ file_path = './odiparpack/pedidosperu195.txt'
ants_num = 10
- beta = 2 # 5
- q0 = 0.1 # 0.5 ?
+ beta = 2 # 5
+ q0 = 0.1 # 0.5 ?
show_figure = True
graph = VrptwGraph(file_path)
- macs = MultipleAntColonySystem(graph, ants_num=ants_num, beta=beta, q0=q0, whether_or_not_to_show_figure=show_figure)
+ 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()