Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scanalyzer #24

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 42 additions & 2 deletions scanalyzer/README.txt
Original file line number Diff line number Diff line change
@@ -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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--output OUTPUT output file name. If not provided, it writes to the stdout.
--output OUTPUT output file name. If not provided, it writes to stdout.


---

IPC08 instances:

prob_no = 1
for half_segment_ids in [ [""], ["a", "b"] ]:
Expand All @@ -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
Expand Down
33 changes: 17 additions & 16 deletions scanalyzer/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
parser.add_argument("--output", default=None, help="output file name. If not provided, it writes to the stdout.")
parser.add_argument("--output", default=None, help="output file name. If missing, write to stdout.")


return parser.parse_args()

Expand All @@ -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__":
Expand Down
Binary file added scanalyzer/scanalyzer.pdf
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the binary file and add a link to the PDF to the README instead: https://doi.org/10.1609/icaps.v20i1.13431 .

Binary file not shown.