diff --git a/scanalyzer/README.txt b/scanalyzer/README.txt index 9996913a..9a2086b2 100644 --- a/scanalyzer/README.txt +++ b/scanalyzer/README.txt @@ -1,4 +1,44 @@ -IPC instances: + +See the paper (scanalyzer.pdf) in this directory. + +Helmert, Malte, and Hauke Lasinger. +"The Scanalyzer domain: Greenhouse logistics as a planning problem." +ICAPS2010 + +Abstract: + +Scanalyzer planning domain, a domain for +classical planning which models the problem of automatic +greenhouse logistic management. + +At its mathematical core, the Scanalyzer domain is a permutation problem with +striking similarities to common search benchmarks such as Rubik’s Cube or +TopSpin. At the same time, it is also a real application domain, and efficient +algorithms for the problem are of considerable practical interest. +The Scanalyzer domain was used as a benchmark for sequential planners at the +last International Planning Competition. The competition results show that +domain-independent automated planners can find solutions of comparable quality +to those generated by specialized algorithms developed by domain experts, while +being considerably more flexible. + +--- + +usage: generator.py [-h] [--use-half-segments] [--seed SEED] [--output OUTPUT] size insize outsize + +positional arguments: + size the number of the conveyer belt segments + insize How many conveyers are connected to the inlet of the imaging chamber. + outsize How many conveyers are connected to the outlet of the imaging chamber. + +optional arguments: + -h, --help show this help message and exit + --use-half-segments If present, each segment is split in half and moves independently. + --seed SEED random seed + --output OUTPUT output file name. If not provided, it writes to the stdout. + +--- + +IPC08 instances: prob_no = 1 for half_segment_ids in [ [""], ["a", "b"] ]: @@ -10,7 +50,7 @@ for half_segment_ids in [ [""], ["a", "b"] ]: Selection in IPC: -(half_segment_ids, problem_type, size) +(half_segment_ids, problem_type, size) 11: [''], (1, 1), 3 12: [''], (3, 1), 3 14: [''], (3, 3), 3 diff --git a/scanalyzer/generator.py b/scanalyzer/generator.py index 1b453113..b03df659 100755 --- a/scanalyzer/generator.py +++ b/scanalyzer/generator.py @@ -133,11 +133,20 @@ def create_pddl(half_segment_ids, problem_type, size, prob_no): def parse(): parser = argparse.ArgumentParser() - parser.add_argument("size", type=int, help="") - parser.add_argument("segment_type", type=str, help="") - parser.add_argument("inout", type=str, help="") - parser.add_argument("--seed", type=int, default=1) - parser.add_argument("--output", default=None) + parser.add_argument("size", + type=int, + help="the number of the conveyer belt segments") + parser.add_argument("insize", + type=int, + help="How many conveyers are connected to the inlet of the imaging chamber. ") + parser.add_argument("outsize", + type=int, + help="How many conveyers are connected to the outlet of the imaging chamber. ") + parser.add_argument("--use-half-segments", + action="store_true", + help="If present, each segment is split in half and moves independently.") + parser.add_argument("--seed", type=int, default=1, help="random seed") + parser.add_argument("--output", default=None, help="output file name. If not provided, it writes to the stdout.") return parser.parse_args() @@ -149,23 +158,15 @@ def main(): if args.output: sys.stdout = open(args.output, "w") - prob_id = f"{args.size}-{args.segment_type}-{args.inout}" + prob_id = f"{args.size}-{args.use_half_segments}-{args.insize}-{args.outsize}" size = args.size - if args.segment_type == "ab": + if args.use_half_segments: half_segment_ids = ["a", "b"] else: half_segment_ids = [""] - if args.inout == "in": - (insize, outsize) = (size, 1) - elif args.inout == "both": - (insize, outsize) = (size, size) - else: - assert args.inout == "none" - (insize, outsize) = (1, 1) - - create_pddl(half_segment_ids, (insize, outsize), size, prob_id) + create_pddl(half_segment_ids, (args.insize, args.outsize), size, prob_id) if __name__ == "__main__": diff --git a/scanalyzer/scanalyzer.pdf b/scanalyzer/scanalyzer.pdf new file mode 100644 index 00000000..c0579a77 Binary files /dev/null and b/scanalyzer/scanalyzer.pdf differ