(define (domain robossembler)
    (:requirements :strips :typing :adl :fluents :durative-actions)
    (:types
        workspace - zone
        part
        arm
        assembly
    )

    (:predicates
        (arm_available ?a - arm)
        (part_at ?p - part ?z - zone)
        (part_of ?part - part ?whole - assembly)
        (assembly_order ?prev ?next - assembly)
        (assembled ?whole - assembly ?z - zone)
    )

    (:functions)


    (:durative-action assemble
        :parameters (?p - part ?prev ?next - assembly ?w - workspace ?arm - arm)
        :duration (= ?duration 5)
        :condition (and
            (at start (assembled ?prev ?w))
            (at start (part_at ?p ?w))
            (at start (part_of ?p ?next))
            (at start (arm_available ?arm))
            (at start (assembly_order ?prev ?next))
        )
        :effect (and
            (at start (not (arm_available ?arm)))
            (at end (not (part_at ?p ?w)))
            (at end (arm_available ?arm))
            (at end (assembled ?next ?w))
        )
    )
)