add pddl files
This commit is contained in:
parent
45df10883c
commit
9611ae68af
2 changed files with 318 additions and 0 deletions
163
pddl/printer.pddl
Normal file
163
pddl/printer.pddl
Normal file
|
@ -0,0 +1,163 @@
|
|||
;Header and description
|
||||
|
||||
(define (domain printer)
|
||||
|
||||
;remove requirements that are not needed
|
||||
(:requirements :strips :fluents :durative-actions :timed-initial-literals :typing :conditional-effects :negative-preconditions :duration-inequalities :equality)
|
||||
|
||||
(:types
|
||||
printer table filament_storage - zone
|
||||
task - gcode
|
||||
observer - hooman
|
||||
filament - resource
|
||||
|
||||
|
||||
;todo: enumerate types and their hierarchy here, e.g. car truck bus - vehicle
|
||||
)
|
||||
|
||||
; un-comment following line if constants are needed
|
||||
;(:constants )
|
||||
|
||||
(:predicates
|
||||
(printer_available ?p - printer) ; принтер занят печатью
|
||||
(printer_ready ?p - printer) ; принтер готов
|
||||
(table_ready ?p - printer ?t - table) ; готовность рабочего стола данного принтера
|
||||
(plastic_ready ?p - printer ?fstrg - filament_storage ) ;готовность пластика к печати
|
||||
(defined_task ?p - printer ) ;задание загружено в принтер
|
||||
(observer_free ?h - hooman) ;человек свободен
|
||||
(task_in ?t - task ?p - printer) ; задача на принтере
|
||||
(task_failed ?p ?t) ; печать провалена
|
||||
(task_ready ?p ?t) ; печать выполнена
|
||||
; предикаты - принтер готов, пластик в наличии, пластика хватит на задание
|
||||
; установить задание, посчитать пластик на него
|
||||
; задание завершено
|
||||
; рабочий стол принтера освобожден
|
||||
|
||||
;todo: define predicates here
|
||||
)
|
||||
|
||||
|
||||
(:functions
|
||||
|
||||
|
||||
;todo: define numeric functions here
|
||||
)
|
||||
|
||||
;define actions here
|
||||
|
||||
|
||||
(:durative-action printer_check
|
||||
:parameters (?p - printer ?h - hooman)
|
||||
:duration (= ?duration 1)
|
||||
:condition (and
|
||||
(at start (not(printer_ready ?p )))
|
||||
(at start (observer_free ?h ))
|
||||
)
|
||||
|
||||
:effect (and
|
||||
(at start (and
|
||||
(not (observer_free ?h))
|
||||
))
|
||||
(at end (and
|
||||
(observer_free ?h)
|
||||
(printer_ready ?p)
|
||||
))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
(:durative-action printer_preparing
|
||||
:parameters (?p - printer ?h - hooman ?fstrg - filament_storage ?t - table)
|
||||
:duration (= ?duration 1)
|
||||
:condition (and
|
||||
(at start (and
|
||||
(printer_available ?p)
|
||||
(observer_free ?h)
|
||||
(or
|
||||
(not(plastic_ready ?p ?fstrg ))
|
||||
(not(table_ready ?p ?t))
|
||||
)
|
||||
|
||||
)
|
||||
))
|
||||
|
||||
|
||||
:effect (and
|
||||
(at start (and
|
||||
(not(observer_free ?h))
|
||||
(not(printer_available ?p))
|
||||
|
||||
))
|
||||
(at end (and
|
||||
(observer_free ?h)
|
||||
(printer_available ?p)
|
||||
(printer_ready ?p)
|
||||
))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
(:durative-action start_task
|
||||
:parameters (?p - printer ?h - hooman ?fstrg - filament_storage ?t - gcode)
|
||||
:duration (= ?duration 1)
|
||||
:condition (and
|
||||
(at start (and
|
||||
(observer_free ?h)
|
||||
(printer_ready ?p)
|
||||
(printer_available ?p)
|
||||
(plastic_ready ?p ?fstrg)
|
||||
))
|
||||
|
||||
)
|
||||
:effect (and
|
||||
(at start (and
|
||||
(not (observer_free ?h))
|
||||
|
||||
))
|
||||
(at end (and
|
||||
(not(printer_available ?p))
|
||||
(task_in ?t ?p)
|
||||
(not(table_ready ?p ?t))
|
||||
(observer_free ?h)
|
||||
))
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
(:durative-action end_printing
|
||||
:parameters (?p - printer ?h - hooman ?fstrg - filament_storage ?t - gcode)
|
||||
:duration (= ?duration print_eta ?t)
|
||||
:condition (and
|
||||
(at start (and
|
||||
(observer_free ?h)
|
||||
(or
|
||||
(task_ready ?p ?t)
|
||||
(task_failed ?p ?t)
|
||||
|
||||
)
|
||||
))
|
||||
|
||||
)
|
||||
:effect (and
|
||||
(at start (and
|
||||
(not(observer_free ?h))
|
||||
(not(printer_available ?p))
|
||||
|
||||
))
|
||||
(at end (and
|
||||
(observer_free ?h)
|
||||
(printer_available ?p)
|
||||
(printer_ready ?p)
|
||||
(table_ready ?p ?t)
|
||||
))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
155
pddl/winder.pddl
Normal file
155
pddl/winder.pddl
Normal file
|
@ -0,0 +1,155 @@
|
|||
;Header and description
|
||||
|
||||
(define (domain winder)
|
||||
|
||||
;remove requirements that are not needed
|
||||
(:requirements :strips :fluents :durative-actions :timed-initial-literals :typing :conditional-effects :negative-preconditions :duration-inequalities :equality)
|
||||
|
||||
(:types
|
||||
winder stnest wrnest - zone
|
||||
stator - part
|
||||
observer - hooman
|
||||
wire - resource
|
||||
|
||||
|
||||
;todo: enumerate types and their hierarchy here, e.g. car truck bus - vehicle
|
||||
)
|
||||
|
||||
; un-comment following line if constants are needed
|
||||
;(:constants )
|
||||
|
||||
(:predicates
|
||||
(winder_available ?w - winder) ; станок занят печатью
|
||||
(winder_ready ?w - winder) ; станок готов
|
||||
(stator_placed ?w - winder ?t - table) ; статор установлен
|
||||
(wire_ready ?w - winder ?wstrg - wire_storage ) ;готовность провода к печати
|
||||
(observer_free ?h - hooman) ;человек свободен
|
||||
(stator_ready ?p ?t) ; статор намотан
|
||||
|
||||
|
||||
;todo: define predicates here
|
||||
)
|
||||
|
||||
|
||||
(:functions
|
||||
|
||||
|
||||
;todo: define numeric functions here
|
||||
)
|
||||
|
||||
;define actions here
|
||||
|
||||
|
||||
(:durative-action winder_check
|
||||
:parameters (?w - winder ?h - hooman)
|
||||
:duration (= ?duration 1)
|
||||
:condition (and
|
||||
(at start (not(winder_ready ?w )))
|
||||
(at start (observer_free ?h ))
|
||||
)
|
||||
|
||||
:effect (and
|
||||
(at start (and
|
||||
(not (observer_free ?h))
|
||||
))
|
||||
(at end (and
|
||||
(observer_free ?h)
|
||||
(winder_ready ?w)
|
||||
))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
(:durative-action winder_preparing
|
||||
:parameters (?w - winder ?h - hooman ?wstrg - wire_storage ?st - stator)
|
||||
:duration (= ?duration 1)
|
||||
:condition (and
|
||||
(at start (and
|
||||
(winder_available ?w)
|
||||
(observer_free ?h)
|
||||
(or
|
||||
(not(wire_ready ?w ?wstrg ))
|
||||
(not(stator_placed ?w ?t))
|
||||
)
|
||||
|
||||
)
|
||||
))
|
||||
|
||||
|
||||
:effect (and
|
||||
(at start (and
|
||||
(not(observer_free ?h))
|
||||
(not(winder_available ?w))
|
||||
|
||||
))
|
||||
(at end (and
|
||||
(observer_free ?h)
|
||||
(winder_available ?w)
|
||||
(winder_ready ?w)
|
||||
))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
(:durative-action start_task
|
||||
:parameters (?w - winder ?h - hooman ?wstrg - filament_storage )
|
||||
:duration (= ?duration 1)
|
||||
:condition (and
|
||||
(at start (and
|
||||
(observer_free ?h)
|
||||
(winder_ready ?w)
|
||||
(winder_available ?w)
|
||||
(wire_ready ?w ?wstrg)
|
||||
))
|
||||
|
||||
)
|
||||
:effect (and
|
||||
(at start (and
|
||||
(not (observer_free ?h))
|
||||
|
||||
))
|
||||
(at end (and
|
||||
(not(winder_available ?w))
|
||||
(observer_free ?h)
|
||||
))
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
(:durative-action end_winding ; извлечение статора
|
||||
:parameters (?w - winder ?h - hooman )
|
||||
:duration (= ?duration print_eta ?t)
|
||||
:condition (and
|
||||
(at start (and
|
||||
(observer_free ?h)
|
||||
(or
|
||||
(task_ready ?w ?t)
|
||||
(task_failed ?w ?t)
|
||||
|
||||
)
|
||||
))
|
||||
|
||||
)
|
||||
:effect (and
|
||||
(at start (and
|
||||
(not(observer_free ?h))
|
||||
(not(winder_available ?w))
|
||||
|
||||
))
|
||||
(at end (and
|
||||
(observer_free ?h)
|
||||
(winder_available ?w)
|
||||
(winder_ready ?w)
|
||||
(stator_ready ?p ?st)
|
||||
))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue