This repository was archived by the owner on Nov 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathargparser.py
More file actions
49 lines (43 loc) · 1.22 KB
/
argparser.py
File metadata and controls
49 lines (43 loc) · 1.22 KB
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
48
49
import argparse
parser = argparse.ArgumentParser(
description = "Parse TSP files and calculate paths using simple "
"algorithms.")
parser.add_argument (
"-n"
, "--nearest"
, action = "store_true"
, dest = "need_nearest_neighbor"
, default = False
, help = "calculate distance traveled by nearest neighbor heuristic"
)
parser.add_argument (
"-f"
, "--furthest"
, action = "store_true"
, dest = "need_furthest_neighbor"
, default = False
, help = "calculate distance traveled by furthest insertion heuristic"
)
parser.add_argument (
"-i"
, "--in-order"
, action = "store_true"
, dest = "need_in_order"
, default = False
, help = "calculate the distance traveled by the in-order-tour [1..n,1]"
)
parser.add_argument (
"-p"
, "--print-tours"
, action = "store_true"
, dest = "need_tours_printed"
, default = False
, help = "print explicit tours"
)
parser.add_argument (
"tsp_queue"
, nargs = "+"
, metavar = "PATH"
, help = "Path to directory or .tsp file. If PATH is a directory, run "
"on all .tsp files in the directory."
)