Advertisement
froleyks

domain.pddl

Mar 14th, 2019
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. ;; Transport sequential
  2. ;;
  3.  
  4. (define (domain transport)
  5. (:requirements :typing :action-costs)
  6. (:types
  7. location target locatable - object
  8. vehicle package - locatable
  9. capacity-number - object
  10. )
  11.  
  12. (:predicates
  13. (road ?l1 ?l2 - location)
  14. (at ?x - locatable ?v - location)
  15. (in ?x - package ?v - vehicle)
  16. (capacity ?v - vehicle ?s1 - capacity-number)
  17. (capacity-predecessor ?s1 ?s2 - capacity-number)
  18. )
  19.  
  20. (:functions
  21. (road-length ?l1 ?l2 - location) - number
  22. (total-cost) - number
  23. )
  24.  
  25. (:action drive
  26. :parameters (?v - vehicle ?l1 ?l2 - location)
  27. :precondition (and
  28. (at ?v ?l1)
  29. (road ?l1 ?l2)
  30. )
  31. :effect (and
  32. (not (at ?v ?l1))
  33. (at ?v ?l2)
  34. (increase (total-cost) (road-length ?l1 ?l2))
  35. )
  36. )
  37.  
  38. (:action pick-up
  39. :parameters (?v - vehicle ?l - location ?p - package ?s1 ?s2 - capacity-number)
  40. :precondition (and
  41. (at ?v ?l)
  42. (at ?p ?l)
  43. (capacity-predecessor ?s1 ?s2)
  44. (capacity ?v ?s2)
  45. )
  46. :effect (and
  47. (not (at ?p ?l))
  48. (in ?p ?v)
  49. (capacity ?v ?s1)
  50. (not (capacity ?v ?s2))
  51. (increase (total-cost) 1)
  52. )
  53. )
  54.  
  55. (:action drop
  56. :parameters (?v - vehicle ?l - location ?p - package ?s1 ?s2 - capacity-number)
  57. :precondition (and
  58. (at ?v ?l)
  59. (in ?p ?v)
  60. (capacity-predecessor ?s1 ?s2)
  61. (capacity ?v ?s1)
  62. )
  63. :effect (and
  64. (not (in ?p ?v))
  65. (at ?p ?l)
  66. (capacity ?v ?s2)
  67. (not (capacity ?v ?s1))
  68. (increase (total-cost) 1)
  69. )
  70. )
  71.  
  72. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement