-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.py
71 lines (62 loc) · 2.67 KB
/
options.py
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# -*- coding: utf-8 -*-
import argparse
import sys
def parse_args():
argparser = argparse.ArgumentParser()
argparser.add_argument(
"domain", help="path to domain pddl file")
argparser.add_argument(
"task", help="path to task pddl file")
argparser.add_argument(
"--relaxed", dest="generate_relaxed_task", action="store_true",
help="output relaxed task (no delete effects)")
argparser.add_argument(
"--full-encoding",
dest="use_partial_encoding", action="store_false",
help="By default we represent facts that occur in multiple "
"mutex groups only in one variable. Using this parameter adds "
"these facts to multiple variables. This can make the meaning "
"of the variables clearer, but increases the number of facts.")
argparser.add_argument(
"--invariant-generation-max-candidates", default=100000, type=int,
help="max number of candidates for invariant generation "
"(default: %(default)d). Set to 0 to disable invariant "
"generation and obtain only binary variables. The limit is "
"needed for grounded input files that would otherwise produce "
"too many candidates.")
argparser.add_argument(
"--invariant-generation-max-time", default=300, type=int,
help="max time for invariant generation (default: %(default)ds)")
argparser.add_argument(
"--add-implied-preconditions", action="store_true",
help="infer additional preconditions. This setting can cause a "
"severe performance penalty due to weaker relevance analysis "
"(see issue7).")
argparser.add_argument(
"--keep-unreachable-facts",
dest="filter_unreachable_facts", action="store_false",
help="keep facts that can't be reached from the initial state")
argparser.add_argument(
"--dump-task", action="store_true",
help="dump human-readable SAS+ representation of the task")
argparser.add_argument(
"--group_choice", default='default', type=str,
help="default | exact | essential")
argparser.add_argument(
"--invariant",default='default', type=str,
help="default | mip")
argparser.add_argument(
"--mark_inessential", action="store_true",
help="mark inessential vars as such")
argparser.add_argument(
"--axiom", action="store_true",
help="exactly1 group to axioms")
return argparser.parse_args()
def copy_args_to_module(args):
module_dict = sys.modules[__name__].__dict__
for key, value in vars(args).items():
module_dict[key] = value
def setup():
args = parse_args()
copy_args_to_module(args)
setup()