-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathargparser.py
More file actions
47 lines (38 loc) · 895 Bytes
/
argparser.py
File metadata and controls
47 lines (38 loc) · 895 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import argparse
parser = argparse.ArgumentParser(
description = "Solve TSP using Ant Colony Optimisation")
parser.add_argument (
"-f"
, "--fitness-limit"
, dest = "fitness_limit"
, default = -1
, help = "The number of total fitness evalautions"
, type = int
)
parser.add_argument (
"-p"
, "--population-size"
, dest = "population_size"
, default = -1
, help = "The size of ant population for ACO"
, type = int
)
parser.add_argument (
"-d"
, "--debug"
, dest = "debug"
, default = False
, help = "Debug flag"
, type = bool
)
parser.add_argument (
"--plot"
, dest = "plot"
, default = False
, help = "Create pheromone and tour images"
, type = bool
)
parser.add_argument (
"tsp_file"
, help = "Path to .tsp file."
)