заработал экспорт из path в domain.pddl

This commit is contained in:
Mark Voltov 2023-08-25 15:27:27 +03:00
parent b18a9421ab
commit a57ab8e9bd
8 changed files with 223 additions and 55 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,97 +1,86 @@
(define (domain Printer)
(define (domain fabrication)
(:requirements :strips :typing :fluents :durative-actions)
(:types
printer workspace - zone
endmill workspace - zone
part
arm
assembly
human
filament
)
(:predicates
(arm_available ?a - arm)
(endmill_is_ready endmill task observer)
(part_at ?p - part ?z - zone)
(printer_ready ?p - printer)
(printer_checked ?p - printer)
(printer_at_work ?p - printer)
(part_of ?part - part ?whole - assembly)
(endmill_ready ?p - printer)
(endmill_checked ?p - printer)
(endmill_at_work ?p - printer)
(assembly_order ?prev ?next - assembly)
(assembled ?whole - assembly ?z - zone)
(observer_free ?h - human)
(filament_at ?f - filament ?z - zone)
)
(:functions
)
(:durative-action print
:parameters ( ?p - part ?pr - printer )
:duration ( = ?duration 20)
(:action predpreparing
:parameters ()
:condition (and
(at start(printer_ready ?pr))
(not endmill_is_ready)
)
:effect (and
(at start (not (printer_ready ?pr)))
(at start (printer_at_work ?pr ))
(at end(part_at ?p ?pr))
(at end (not (printer_at_work ?pr )))
(endmill_is_ready)
)
)
(:durative-action remove
:parameters ( ?p - part ?pr - printer ?z - zone ?a - arm )
:duration ( = ?duration 1)
(:durative-action PartDesignExample_TC: Default Tool
:parameters ( )
:duration ( = ?duration 157)
:condition (and
(at start (part_at ?p ?pr))
(at start (arm_available ?a))
(endmill_is_ready)
)
:effect (and
(at start (not (arm_available ?a)))
(at end (part_at ?p ?z))
(at end (arm_available ?a))
(at end (printer_ready ?pr))
)
)
(:durative-action assemble
:parameters ( ?p - part ?prev ?next - assembly ?z - zone ?arm - arm ?w - workspace )
:duration ( = ?duration 5)
(:durative-action PartDesignExample_TC: Default Tool
:parameters ( )
:duration ( = ?duration 170)
: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))
(endmill_is_ready)
)
: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))
)
)
(:durative-action printer_check
:parameters ( ?p - printer ?h - human )
:duration ( = ?duration 1)
(:durative-action PartDesignExample_TC: Default Tool
:parameters ( )
:duration ( = ?duration 78)
:condition (and
(at start ( observer_free ?h ))
(endmill_is_ready)
)
:effect (and
(at start (not (observer_free ?h)))
(at end (observer_free ?h))
(at end (printer_checked ?p))
)
)
(:durative-action printer_filament_load
:parameters ( ?p - printer ?h - human ?f - filament ?z - zone )
:duration ( = ?duration 5)
(:durative-action PartDesignExample_TC: Default Tool
:parameters ( )
:duration ( = ?duration 157)
:condition (and
(at start (printer_checked ?p))
(at start (observer_free ?h))
(at start (filament_at ?f ?z))
(endmill_is_ready)
)
:effect (and
)
)
(:durative-action PartDesignExample_TC: Default Tool
:parameters ( )
:duration ( = ?duration 170)
:condition (and
(endmill_is_ready)
)
:effect (and
)
)
(:durative-action PartDesignExample_TC: Default Tool
:parameters ( )
:duration ( = ?duration 78)
:condition (and
(endmill_is_ready)
)
:effect (and
(at start (not(observer_free ?h)))
(at end (observer_free ?h))
(at end (printer_ready ?p))
(at end (not (filament_at ?f ?z)))
)
)
)

View file

@ -0,0 +1,97 @@
(define (domain Printer)
(:requirements :strips :typing :fluents :durative-actions)
(:types
printer workspace - zone
part
arm
assembly
human
filament
)
(:predicates
(arm_available ?a - arm)
(part_at ?p - part ?z - zone)
(printer_ready ?p - printer)
(printer_checked ?p - printer)
(printer_at_work ?p - printer)
(part_of ?part - part ?whole - assembly)
(assembly_order ?prev ?next - assembly)
(assembled ?whole - assembly ?z - zone)
(observer_free ?h - human)
(filament_at ?f - filament ?z - zone)
)
(:functions
)
(:durative-action print
:parameters ( ?p - part ?pr - printer )
:duration ( = ?duration 20)
:condition (and
(at start(printer_ready ?pr))
)
:effect (and
(at start (not (printer_ready ?pr)))
(at start (printer_at_work ?pr ))
(at end(part_at ?p ?pr))
(at end (not (printer_at_work ?pr )))
)
)
(:durative-action remove
:parameters ( ?p - part ?pr - printer ?z - zone ?a - arm )
:duration ( = ?duration 1)
:condition (and
(at start (part_at ?p ?pr))
(at start (arm_available ?a))
)
:effect (and
(at start (not (arm_available ?a)))
(at end (part_at ?p ?z))
(at end (arm_available ?a))
(at end (printer_ready ?pr))
)
)
(:durative-action assemble
:parameters ( ?p - part ?prev ?next - assembly ?arm - arm ?w - workspace )
: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))
)
)
(:durative-action printer_check
:parameters ( ?p - printer ?h - human )
:duration ( = ?duration 1)
:condition (and
(at start ( observer_free ?h ))
)
:effect (and
(at start (not (observer_free ?h)))
(at end (observer_free ?h))
(at end (printer_checked ?p))
)
)
(:durative-action printer_filament_load
:parameters ( ?p - printer ?h - human ?f - filament ?z - zone )
:duration ( = ?duration 5)
:condition (and
(at start (printer_checked ?p))
(at start (observer_free ?h))
(at start (filament_at ?f ?z))
)
:effect (and
(at start (not(observer_free ?h)))
(at end (observer_free ?h))
(at end (printer_ready ?p))
(at end (not (filament_at ?f ?z)))
)
)
)

Binary file not shown.

View file

@ -0,0 +1,82 @@
(define (domain fabrication)
(:requirements :strips :typing :fluents :durative-actions)
(:types
['endmill workspace - zone', 'part', 'arm', 'assembly', 'human', '']
)
(:predicates
(endmill_is_ready endmill task observer)
(part_at [?p - part ?z - zone])
(endmill_ready ?p - printer)
(endmill_checked ?p - printer)
(endmill_at_work ?p - printer)
(assembly_order ?prev ?next - assembly)
(assembled ?whole - assembly ?z - zone)
(observer_free ?h - human)
)
(:functions
)
(:action predpreparing
:parameters ()
:condition (and
(not endmill_is_ready)
)
:effect (and
(endmill_is_ready)
)
)
(:durative-action PartDesignExample_TC: Default Tool
:parameters ( )
:duration ( = ?duration 00:02:37)
:condition (and
(endmill_is_ready)
)
:effect (and
)
)
(:durative-action PartDesignExample_TC: Default Tool
:parameters ( )
:duration ( = ?duration 00:02:50)
:condition (and
(endmill_is_ready)
)
:effect (and
)
)
(:durative-action PartDesignExample_TC: Default Tool
:parameters ( )
:duration ( = ?duration 00:01:18)
:condition (and
(endmill_is_ready)
)
:effect (and
)
)
(:durative-action PartDesignExample_TC: Default Tool
:parameters ( )
:duration ( = ?duration 00:02:37)
:condition (and
(endmill_is_ready)
)
:effect (and
)
)
(:durative-action PartDesignExample_TC: Default Tool
:parameters ( )
:duration ( = ?duration 00:02:50)
:condition (and
(endmill_is_ready)
)
:effect (and
)
)
(:durative-action PartDesignExample_TC: Default Tool
:parameters ( )
:duration ( = ?duration 00:01:18)
:condition (and
(endmill_is_ready)
)
:effect (and
)
)
)