Sharing of my labs carried out during the TDDC17 course at Linköping University.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

domain.pddl 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. (define (domain transport-strips)
  2. (:requirements :typing :action-costs)
  3. (:types location fuellevel locatable - object
  4. package truck - locatable
  5. )
  6. (:predicates
  7. (connected ?l1 ?l2 - location)
  8. (at ?o - locatable ?l - location)
  9. (in ?p - package ?t - truck)
  10. (fuel ?t - truck ?level - fuellevel)
  11. (fuelcost ?level - fuellevel ?l1 ?l2 - location)
  12. (sum ?a ?b ?c - fuellevel)
  13. )
  14. (:functions
  15. (total-cost) - number)
  16. (:action LOAD
  17. :parameters
  18. (?p - package
  19. ?t - truck
  20. ?l - location)
  21. :precondition
  22. (and (at ?t ?l) (at ?p ?l))
  23. :effect
  24. (and (not (at ?p ?l)) (in ?p ?t) (increase (total-cost) 1))
  25. )
  26. (:action UNLOAD
  27. :parameters
  28. (?p - package
  29. ?t - truck
  30. ?l - location)
  31. :precondition
  32. (and (at ?t ?l) (in ?p ?t))
  33. :effect
  34. (and (at ?p ?l) (not (in ?p ?t)) (increase (total-cost) 1))
  35. )
  36. (:action DRIVE
  37. :parameters
  38. (?t - truck
  39. ?l1 - location
  40. ?l2 - location
  41. ?fuelpost - fuellevel
  42. ?fueldelta - fuellevel
  43. ?fuelpre - fuellevel)
  44. :precondition
  45. (and
  46. (connected ?l1 ?l2)
  47. (fuelcost ?fueldelta ?l1 ?l2)
  48. (fuel ?t ?fuelpre)
  49. (sum ?fuelpost ?fueldelta ?fuelpre)
  50. (at ?t ?l1)
  51. )
  52. :effect
  53. (and (not (at ?t ?l1))
  54. (at ?t ?l2)
  55. (not (fuel ?t ?fuelpre))
  56. (fuel ?t ?fuelpost)
  57. (increase (total-cost) 1))
  58. )
  59. )