Commit ce6da17b authored by msurl's avatar msurl
Browse files

added optional argument to choose type of constraints to use

parent 37315340
......@@ -19,24 +19,22 @@ def cli(args=None):
help='parameter k of the k hop dominating set',
# p.add_argument(
# '-i', '--iterations',
# help='maximum number of iterations',
# const = float("inf"),
# type = float
# )
'-g', '--graph',
help="input graph as .lp file")
help='use Miller-Tucker-Zemlin constraints to ensure connectivity (default is a lazy approach using vertex separators)')
args = p.parse_args(args)
# do something with the args
# print("CLI template - fix me up!")
G =
ds = k_hop_dom_set.RootedConnectecKHopDominatingSet(G, args.k)
if args.mtz:
ds = k_hop_dom_set.RootedConnectecKHopDominatingSet(G, args.k, constraints = k_hop_dom_set.ConnectivityConstraint.MILLER_TUCKER_ZEMLIN)
ds = k_hop_dom_set.RootedConnectecKHopDominatingSet(G, args.k)
# ds.solve_and_draw(iterations = args.iterations)
# No return value means no error.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment