заработал экспорт из path в domain.pddl
This commit is contained in:
parent
b18a9421ab
commit
a57ab8e9bd
8 changed files with 223 additions and 55 deletions
BIN
cg/freecad/Frames/pddl/MillingMachine.FCStd
Normal file
BIN
cg/freecad/Frames/pddl/MillingMachine.FCStd
Normal file
Binary file not shown.
BIN
cg/freecad/Frames/pddl/PartDesignExample.FCStd
Normal file
BIN
cg/freecad/Frames/pddl/PartDesignExample.FCStd
Normal file
Binary file not shown.
Binary file not shown.
|
@ -1,97 +1,86 @@
|
||||||
(define (domain Printer)
|
(define (domain fabrication)
|
||||||
|
|
||||||
(:requirements :strips :typing :fluents :durative-actions)
|
(:requirements :strips :typing :fluents :durative-actions)
|
||||||
(:types
|
(:types
|
||||||
printer workspace - zone
|
endmill workspace - zone
|
||||||
part
|
part
|
||||||
arm
|
arm
|
||||||
assembly
|
assembly
|
||||||
human
|
human
|
||||||
filament
|
|
||||||
)
|
)
|
||||||
(:predicates
|
(:predicates
|
||||||
(arm_available ?a - arm)
|
(endmill_is_ready endmill task observer)
|
||||||
(part_at ?p - part ?z - zone)
|
(part_at ?p - part ?z - zone)
|
||||||
(printer_ready ?p - printer)
|
(endmill_ready ?p - printer)
|
||||||
(printer_checked ?p - printer)
|
(endmill_checked ?p - printer)
|
||||||
(printer_at_work ?p - printer)
|
(endmill_at_work ?p - printer)
|
||||||
(part_of ?part - part ?whole - assembly)
|
|
||||||
(assembly_order ?prev ?next - assembly)
|
(assembly_order ?prev ?next - assembly)
|
||||||
(assembled ?whole - assembly ?z - zone)
|
(assembled ?whole - assembly ?z - zone)
|
||||||
(observer_free ?h - human)
|
(observer_free ?h - human)
|
||||||
(filament_at ?f - filament ?z - zone)
|
|
||||||
)
|
)
|
||||||
(:functions
|
(:functions
|
||||||
)
|
)
|
||||||
(:durative-action print
|
(:action predpreparing
|
||||||
:parameters ( ?p - part ?pr - printer )
|
:parameters ()
|
||||||
:duration ( = ?duration 20)
|
|
||||||
:condition (and
|
:condition (and
|
||||||
(at start(printer_ready ?pr))
|
(not endmill_is_ready)
|
||||||
)
|
)
|
||||||
:effect (and
|
:effect (and
|
||||||
(at start (not (printer_ready ?pr)))
|
(endmill_is_ready)
|
||||||
(at start (printer_at_work ?pr ))
|
|
||||||
(at end(part_at ?p ?pr))
|
|
||||||
(at end (not (printer_at_work ?pr )))
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(:durative-action remove
|
(:durative-action PartDesignExample_TC: Default Tool
|
||||||
:parameters ( ?p - part ?pr - printer ?z - zone ?a - arm )
|
:parameters ( )
|
||||||
:duration ( = ?duration 1)
|
:duration ( = ?duration 157)
|
||||||
:condition (and
|
:condition (and
|
||||||
(at start (part_at ?p ?pr))
|
(endmill_is_ready)
|
||||||
(at start (arm_available ?a))
|
|
||||||
)
|
)
|
||||||
:effect (and
|
: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
|
(:durative-action PartDesignExample_TC: Default Tool
|
||||||
:parameters ( ?p - part ?prev ?next - assembly ?z - zone ?arm - arm ?w - workspace )
|
:parameters ( )
|
||||||
:duration ( = ?duration 5)
|
:duration ( = ?duration 170)
|
||||||
:condition (and
|
:condition (and
|
||||||
(at start (assembled ?prev ?w))
|
(endmill_is_ready)
|
||||||
(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
|
: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
|
(:durative-action PartDesignExample_TC: Default Tool
|
||||||
:parameters ( ?p - printer ?h - human )
|
:parameters ( )
|
||||||
:duration ( = ?duration 1)
|
:duration ( = ?duration 78)
|
||||||
:condition (and
|
:condition (and
|
||||||
(at start ( observer_free ?h ))
|
(endmill_is_ready)
|
||||||
)
|
)
|
||||||
:effect (and
|
:effect (and
|
||||||
(at start (not (observer_free ?h)))
|
|
||||||
(at end (observer_free ?h))
|
|
||||||
(at end (printer_checked ?p))
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(:durative-action printer_filament_load
|
(:durative-action PartDesignExample_TC: Default Tool
|
||||||
:parameters ( ?p - printer ?h - human ?f - filament ?z - zone )
|
:parameters ( )
|
||||||
:duration ( = ?duration 5)
|
:duration ( = ?duration 157)
|
||||||
:condition (and
|
:condition (and
|
||||||
(at start (printer_checked ?p))
|
(endmill_is_ready)
|
||||||
(at start (observer_free ?h))
|
)
|
||||||
(at start (filament_at ?f ?z))
|
: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
|
: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)))
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
97
cg/freecad/Frames/pddl/etalon_domain.pddl
Normal file
97
cg/freecad/Frames/pddl/etalon_domain.pddl
Normal 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)))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
BIN
cg/freecad/Frames/pddl/test_asm.FCStd
Normal file
BIN
cg/freecad/Frames/pddl/test_asm.FCStd
Normal file
Binary file not shown.
82
cg/freecad/Frames/pddldomain.pddl
Normal file
82
cg/freecad/Frames/pddldomain.pddl
Normal 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
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
Loading…
Add table
Add a link
Reference in a new issue