forked from amyotjl/GraphToPDDL
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtoPlanDiff.py
More file actions
42 lines (35 loc) · 1.16 KB
/
toPlanDiff.py
File metadata and controls
42 lines (35 loc) · 1.16 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
from src.script import run_to_plan_diff
import argparse as ap
import logging
# python toPlanDiff.py Plans/testcase-simple.dot --base Plans/baseplan.txt --opt Plans/optplan.txt
if __name__ == "__main__":
parser = ap.ArgumentParser()
parser.add_argument(
"ag", type=str, help="Path to the AG file. It must be a DOT file."
)
parser.add_argument(
"--ro",
type=str,
default="",
help="Path to the revision operator file. It must be a JSON file."
)
parser.add_argument(
"--base",
type=str,
help="Path to the base plan file. It must be a file created by the OPTIC planner."
)
parser.add_argument(
"--opt",
type=str,
help="Path to the base plan file. It must be a file created by the OPTIC planner."
)
parser.add_argument(
"--log",
type=str,
default="INFO",
help="Logging level"
)
args = parser.parse_args()
log_level = getattr(logging, args.log.upper(), logging.INFO)
logging.basicConfig(level=log_level, format='%(levelname)s %(asctime)s: %(message)s')
run_to_plan_diff(args.ag, args.ro, args.base, args.opt)