(in-package :shop2-user)

(defun define-partitioned-umt-domain ()
  (let ((*define-silently* t)
        (shop2::*ignore-singleton-variables* t))
    (defdomain (partitioned-UM-Translog-2 :redefine-ok t)
       ( 
        (:method (assert-goals (?goal . ?goals) ?out)
           ()
           ((assert-goals ?goals ((goal ?goal) . ?out))))

        (:method (assert-goals nil ?out)
           ()
           ((!!assert ?out)))

        (:method (pre-check)
           ()
           (
                                        ;(check-truck)
                                        ;(check-tcenter)
                                        ;(check-train)
                                        ;(check-airplane)
                                        ;(check-road-route)
                                        ;(check-non-road-route)
            (check-transport-type)))

        (:method (check-truck)
           (:first (typevp ?truck truck)
                   (not (availablev ?truck)))
           ((!!delete-truck ?truck) (check-truck))
           nil
           nil)

        (:method (check-tcenter)
           (:first (tcenter ?location)
                   (not (availablel ?location)))
           ((!!delete-tcenter ?location) (check-tcenter))
           nil
           nil)

        (:method (check-train)
           (:first (typevp ?train train)
                   (not (availablev ?train)))
           ((!!delete-train ?train) (check-train))
           nil
           nil)

        (:method (check-airplane)
           (:first (typevp ?airplane airplane)
                   (not (availablev ?airplane)))
           ((!!delete-airplane ?airplane) (check-airplane))
           nil
           nil)

        (:method (check-road-route)
           (:first (connect-city ?road road-route ?c1 ?c2)
                   (not (availabler ?road)))
           ((!!delete-road-route ?road ?c1 ?c2) (check-road-route))
           nil
           nil)

        (:method (check-non-road-route)
           (:first (connect-loc ?road ?type ?l1 ?l2)
                   (not (availabler ?road)))
           ((!!delete-non-road-route ?road ?type ?l1 ?l2) (check-non-road-route))
           nil
           nil)

        (:method (check-transport-type)
           (:first (at-packagel ?p ?o)
                   (goal (delivered ?p ?d))
                   (not (checked ?p)))
           ((!!check ?p)
            (check-local ?p ?o ?d)
            (check-road ?p ?o ?d)
            (check-non-road ?p ?o ?d)
            (check-via-hub ?p ?o ?d)
            (check-tn ?p ?o ?d)
            (check-nt ?p ?o ?d)
            (check-nn ?p ?o ?d)
            (check-p ?p)
            (check-transport-type))
           nil
           nil)

        (:method (check-p ?p)
           (or (local ?p)
               (road ?p ?r)
               (non-road ?p ?r)
               (via-hub ?p)
               (nt ?p ?t1)
               (tn ?p ?t2)
               (nn ?p ?t3 ?t4))
           nil)

        (:method (check-local ?package ?origin ?destination)
           ((in-city ?origin ?ocity)
            (in-city ?destination ?ocity))
           ((!!add-package-local ?package))
           nil
           nil)

        (:method (check-road ?package ?origin ?destination)
           ((in-city ?origin ?ocity)
            (in-city ?destination ?dcity)
            (different ?ocity ?dcity)
            (connect-city ?route road-route ?ocity ?dcity)
            (availabler ?route))
           ((!!add-package-road ?package ?route))
           nil
           nil)

        (:method (check-via-hub ?package ?origin ?destination)
           ((tcenter ?origin)
            (tcenter ?destination)
            (typep ?package ?typep)
            (or (pv-compatible ?typep air)
                (not (typel ?origin airport)))
            (availablel ?origin)
            (availablel ?destination)
            (not (hub ?origin))
            (not (hub ?destination))
            (typel ?origin ?tt)
            (typel ?destination ?tt))
           ((!!add-package-via-hub ?package))
           nil
           nil)

        (:method (check-nt ?package ?origin ?destination)
           (:first (not (tcenter ?origin))
                   (tcenter ?destination)
                   (typep ?package ?typep)
                   (or (pv-compatible ?typep air)
                       (not (typel ?destination airport)))
                   (in-city ?origin ?ocity)
                   (tcenter ?tcenter)
                   (availablel ?destination)
                   (availablel ?tcenter)
                   (not (nt ?package ?tcenter))
                   (in-city ?tcenter ?ocity)
                   (typel ?tcenter ?tt)
                   (typel ?destination ?tt))
           ((!!add-package-nt ?package ?tcenter) (check-nt ?package ?origin ?destination))
           nil
           nil)

        
        (:method (check-tn ?package ?origin ?destination)  
           (:first (tcenter ?origin)
                   (typep ?package ?typep)
                   (or (pv-compatible ?typep air)
                       (not (typel ?origin airport)))
                   (not (tcenter ?destination))
                   (IN-CITY ?destination ?dcity)
                   (in-city ?tcenter ?dcity)
                   (tcenter ?tcenter)
                   (availablel ?origin)
                   (availablel ?tcenter)
                   (not (tn ?package ?tcenter))
                   (typel ?origin ?tt)
                   (typel ?tcenter ?tt))
           ((!!add-package-tn ?package ?tcenter) (check-tn ?package ?origin ?destination))
           nil
           nil)

        (:method (check-nn ?package  ?origin  ?destination)  
           (:first (not (tcenter ?origin))
                   (not (tcenter ?destination))
                   (in-city ?origin ?ocity)
                   (in-city ?destination ?dcity)
                   (in-city ?tcenter1 ?ocity)
                   (in-city ?tcenter2 ?dcity)
                   (tcenter ?tcenter1)
                   (typep ?package ?typep)
                   (or (pv-compatible ?typep air)
                       (not (typel ?origin airport)))
                   (typel ?tcenter1 ?tt)
                   (typel ?tcenter2 ?tt)
                   (tcenter ?tcenter2)
                   (availablel ?tcenter1)
                   (availablel ?tcenter2)
                   (not (nn ?package ?tcenter1 ?tcenter2)))
           ((!!add-package-nn ?package ?tcenter1 ?tcenter2) (check-nn ?package ?origin ?destination))
           nil
           nil)

        (:method (check-non-road ?package ?origin ?destination)
           ((tcenter ?origin)
            (tcenter ?destination)
            (availablel ?origin)
            (availablel ?destination)
            (connect-loc ?route ?type ?origin ?destination)
            (availabler ?route))
           ((!!add-package-non-road ?package ?route))
           nil
           nil)

        (:method (set-next ?v ?d)
           ((not (next ?v ?dd)))
           ((:immediate !!add-next ?v ?d))
           ((next ?v ?d))
           ((:immediate !!add-protection (next ?v ?d)))
           ((next ?v ?dd))
           (:ordered (:immediate !!del-next ?v ?dd)
               (:immediate !!add-next ?v ?d)))

        (:method (add-exp-weight ?v ?r ?weight)
           ((not (expected ?v ?r ?value)))
           ((:immediate !!exp-weight-set ?v ?r ?weight))
           ()
           ((:immediate !!exp-weight-inc ?v ?r ?weight))) 
        
        (:method (del-exp-weight ?v ?r ?weight)
           ((expected ?v ?r ?value)
            (call > ?value ?weight))
           ((:immediate !!exp-weight-dec ?v ?r ?weight))
           ((expected ?v ?r ?value)
            (call = ?value ?weight))
           ((:immediate !!exp-weight-clear ?v ?r)))


;;; top-level declare-method: used for top-level goal
        (:method (delivered ?package ?destination)
           ((at-packagel ?package ?destination))
           ((:immediate !deliver ?package ?destination))
           ((at-packagel ?package ?origin))
           ((:task transport ?package ?origin ?destination)))

        (:method (transport ?package ?origin ?destination)
           ()
           (:ordered (:immediate !collect-fees ?package)
               (:immediate carry ?package ?origin ?destination)
               (:immediate !deliver ?package ?destination)))

                                        ;  CARRY DECLARE-METHODS - TOP LEVEL.

        (:method (carry ?package ?origin ?destination)
           ()
           ((carry-direct ?package ?origin ?destination)))

  2 carry :
;;;?origin (tcenter, not hub) -> ?destination (tcenter, not hub)        
        (:method (carry ?package  ?origin ?destination)  
           ((via-hub ?package))
           ((carry-via-hub ?package ?origin ?destination)))

  3 carry :
;;;?origin (not tcenter) -> ?tcenter -> ?destination (tcenter)
        (:method (CARRY ?package ?origin ?destination)  
           ((nt ?package ?tcenter))
           (:ordered (carry-local-road ?package ?origin ?tcenter) 
               (carry-between-tcenters ?package ?tcenter ?destination)))

  4 carry :
;;; ?origin (tcenter) -> ?tcenter -> ?destination (not tcenter)
        (:method (CARRY ?package ?origin ?destination)  
           ((tn ?package ?tcenter))
           (:ordered (carry-between-tcenters ?package ?origin ?tcenter) 
               (carry-local-road ?package ?tcenter ?destination)))

;;; carry: 
        ;; ?origin (not tcenter) -> 
        ;;       ?tcenter1 -> ?tcenter2 -> ?destination (not tcenter)
        (:method (CARRY ?package  ?origin  ?destination)  
           ((nn ?package ?tcenter1 ?tcenter2))
           (:ordered (carry-local-road ?package ?origin ?tcenter1)
               (carry-between-tcenters ?package ?tcenter1 ?tcenter2)
               (carry-local-road ?package ?tcenter2 ?destination)))
        
                                        ;--------------------------
                                        ;  CARRY DECLARE-METHODS - BETWEEN TCENTERS. 
                                        ;--------------------------

;;; carry: ?tcenter1 -> ?tcenter2 where ?tcenter1 = ?tcenter2
        (:method (CARRY-BETWEEN-TCENTERS ?package ?tcenter1 ?tcenter2) 
           ()
           ((carry-non-road ?package ?tcenter1 ?tcenter2)))


carry : ?  ( not hub ) - > ? tcenter2 ( not hub )
        (:method (CARRY-BETWEEN-TCENTERS ?package ?tcenter1 ?tcenter2) 
           ((not (hub ?tcenter1))
            (not (hub ?tcenter2)))
           ((carry-via-hub ?package ?tcenter1 ?tcenter2)))

;;; carry: ?tcenter1 -> ?hub -> ?tcenter2.  
        (:method (CARRY-VIA-HUB ?package ?tcenter1 ?tcenter2)
           ((connect-loc ?r1 ?rtype ?tcenter1 ?hub)
            (connect-loc ?r2 ?rtype ?hub ?tcenter2)
            (availabler ?r1)
            (availabler ?r2)
            (availablel ?hub))
           ((carry-non-road ?package ?tcenter1 ?hub)
            (carry-non-road ?package ?hub ?tcenter2)))

        (:method (CARRY-DIRECT ?package ?origin ?destination)
           ((local ?package))
           ((carry-local-road ?package ?origin ?destination)))

        (:method (CARRY-DIRECT ?package ?origin ?destination)
           ((road ?package ?route))
           ((carry-road ?package ?origin ?destination)))

        (:method (CARRY-DIRECT ?package ?origin ?destination)
           ((non-road ?package ?route))
           ((carry-non-road ?package ?origin ?destination)))

        (:method (carry-local-road ?package ?origin ?destination)
           ((at-vehicle ?vehicle ?origin) (typevp ?vehicle truck))
           ((carry-local-road-e ?package ?vehicle ?origin ?destination)))

        (:method (carry-local-road ?package ?origin ?destination)
           ((at-vehicle ?vehicle ?loc)
            (different ?loc ?origin)
            (typevp ?vehicle ?truck)
            (in-city ?origin ?city)
            (in-city ?loc ?city))
           ((carry-local-road-e ?package ?vehicle ?origin ?destination)))
        
        (:method (carry-local-road ?package ?origin ?destination)
           ((at-vehicle ?vehicle ?loc)
            (typevp ?vehicle ?truck)
            (in-city ?origin ?city)
            (in-city ?loc ?dity)
            (different ?city ?dity))
           ((carry-local-road-e ?package ?vehicle ?origin ?destination)))
        
        (:method (carry-local-road-e ?package ?vehicle ?origin ?destination)
           ((typep ?package ?ptype)
            (typev ?vehicle ?vtype)
            (availablev ?vehicle)
            (or (and (same ?vtype flatbed)
                     (crane ?crane1)
                     (at-equipment ?crane1 ?origin)
                     (crane ?crane2)
                     (at-equipment ?crane2 ?destination)
                     (weight-cap-c ?crane1 ?wei-cap1)
                     (weight-cap-c ?crane2 ?wei-cap2)
                     (weight-p ?package ?weight)
                     (volume-cap-c ?crane1 ?vol-cap1)
                     (volume-cap-c ?crane2 ?vol-cap2)
                     (volume-p ?package ?volume)
                     (call <= ?weight ?wei-cap1)
                     (call <= ?weight ?wei-cap2)
                     (call <= ?volume ?vol-cap1)
                     (call <= ?volume ?vol-cap2))
                (and (same ?vtype air)
                     (plane-ramp ?ramp1)
                     (at-equipment ?ramp1 ?origin)
                     (plane-ramp ?ramp2)
                     (at-equipment ?ramp2 ?destination))
                (and (different ?vtype flatbed)
                     (different ?vtype air)))
            (in-city ?origin ?ocity)
            (at-vehicle ?vehicle ?o1)
            (in-city ?destination ?ocity)
            (local-height ?ocity ?local-height)
            (height-cap-l ?destination ?height-cap)
            (length-cap-l ?destination ?length-cap)
            (width-cap-l ?destination ?width-cap)
            (height-cap-l ?origin ?height-capo)
            (length-cap-l ?origin ?length-capo)
            (width-cap-l ?origin ?width-capo)
            (height-v ?vehicle ?height)
            (length-v ?vehicle ?length)
            (width-v ?vehicle ?width)
            (local-weight ?ocity ?local-weight)
            (weight-p ?package ?weight)
            (weight-v ?vehicle ?weight-v)
            (or (and (not (expected ?vehicle ?ocity ?value))
                     (call <= (call + ?weight-v ?weight) ?local-weight))
                (and (expected ?vehicle ?ocity ?value)
                     (call <= (call + (call + ?weight-v ?weight) ?value) ?local-weight)))
            (call >= ?height-cap ?height)
            (call >= ?length-cap ?length)
            (call >= ?width-cap ?width)
            (call >= ?height-capo ?height)
            (call >= ?length-capo ?length)
            (call >= ?width-capo ?width)
            (call >= ?local-height ?height)
            (gas-left ?vehicle ?gas)
            (distance ?origin ?destination ?d)
            (distance ?o1 ?origin ?d1)
            (gpm ?vehicle ?gpm)
            (call >= ?gas (call * ?gpm (call + ?d1 ?d)))
            (pv-compatible ?ptype ?vtype))
           (:ordered (set-next ?vehicle ?origin)
               (:immediate add-exp-weight ?vehicle ?ocity ?weight)
               (:immediate at-vehicle ?vehicle ?origin)
             (:immediate !!delete-protection (next ?vehicle ?origin))
             (:immediate set-next ?vehicle ?destination)
             (:immediate load ?package ?vehicle ?origin)
             (move-vehicle-local-road ?vehicle ?origin ?destination ?ocity)
             (:immediate !!delete-protection (next ?vehicle ?destination))
             (:immediate del-exp-weight ?vehicle ?ocity ?weight)
             (:immediate unload ?package ?vehicle ?destination)))


        (:method (carry-road ?package ?origin ?destination)
           ((at-vehicle ?vehicle ?origin) (typevp ?vehicle truck))
           ((carry-road-e ?package ?vehicle ?origin ?destination)))

        (:method (carry-road ?package ?origin ?destination)
           ((at-vehicle ?vehicle ?loc)
            (different ?loc ?origin)
            (typevp ?vehicle ?truck)
            (in-city ?origin ?city)
            (in-city ?loc ?city))
           ((carry-road-e ?package ?vehicle ?origin ?destination)))
        
        (:method (carry-road ?package ?origin ?destination)
           ((at-vehicle ?vehicle ?loc)
            (typevp ?vehicle ?truck)
            (in-city ?origin ?city)
            (in-city ?loc ?dity)
            (different ?city ?dity))
           ((carry-road-e ?package ?vehicle ?origin ?destination)))

        (:method (carry-road-e ?package ?vehicle ?origin ?destination)
           ((typep ?package ?ptype)
            (typev ?vehicle ?vtype)
            (availablev ?vehicle)
            (in-city ?origin ?ocity)
            (in-city ?destination ?dcity)
            (different ?ocity ?dcity)
            (connect-city ?route road-route ?ocity ?dcity)
            (availabler ?route)
            (or (and (same ?vtype flatbed)
                     (crane ?crane1)
                     (at-equipment ?crane1 ?origin)
                     (crane ?crane2)
                     (at-equipment ?crane2 ?destination)
                     (weight-cap-c ?crane1 ?wei-cap1)
                     (weight-cap-c ?crane2 ?wei-cap2)
                     (weight-p ?package ?weight)
                     (volume-cap-c ?crane1 ?vol-cap1)
                     (volume-cap-c ?crane2 ?vol-cap2)
                     (volume-p ?package ?volume)
                     (call <= ?weight ?wei-cap1)
                     (call <= ?weight ?wei-cap2)
                     (call <= ?volume ?vol-cap1)
                     (call <= ?volume ?vol-cap2))
                (and (same ?vtype air)
                     (plane-ramp ?ramp1)
                     (at-equipment ?ramp1 ?origin)
                     (plane-ramp ?ramp2)
                     (at-equipment ?ramp2 ?destination))
                (and (different ?vtype flatbed)
                     (different ?vtype air)))
            (height-cap-l ?destination ?height-cap)
            (length-cap-l ?destination ?length-cap)
            (width-cap-l ?destination ?width-cap)
            (height-cap-l ?origin ?height-capo)
            (length-cap-l ?origin ?length-capo)
            (width-cap-l ?origin ?width-capo)
            (height-v ?vehicle ?height)
            (length-v ?vehicle ?length)
            (width-v ?vehicle ?width)
            (call >= ?height-cap ?height)
            (call >= ?length-cap ?length)
            (call >= ?width-cap ?width)
            (call >= ?height-capo ?height)
            (call >= ?length-capo ?length)
            (call >= ?width-capo ?width)
            (gas-left ?vehicle ?gas)
            (distance ?origin ?destination ?d)
            (at-vehicle ?vehicle ?o1)
            (distance ?o1 ?origin ?d1)
            (gpm ?vehicle ?gpm)
            (call >= ?gas (call * ?gpm (call + ?d ?d1)))
            (pv-compatible ?ptype ?vtype)
            (height-cap-r ?route ?height-capr)
            (weight-cap-r ?route ?weight-capr)
            (weight-p ?package ?weight)
            (weight-v ?vehicle ?weight-v)
            (or (and (not (expected ?vehicle ?route ?value))
                     (call <= (call + ?weight-v ?weight) ?weight-capr))
                (and (expected ?vehicle ?route ?value)
                     (call <= (call + (call + ?weight-v ?weight) ?value) ?weight-capr)))
            (call >= ?height-capr ?height))
           (:ordered (set-next ?vehicle ?origin)
               (:immediate add-exp-weight ?vehicle ?route ?weight)
               (:immediate at-vehicle ?vehicle ?origin)
             (:immediate !!delete-protection (next ?vehicle ?origin))
             (:immediate set-next ?vehicle ?destination)
             (:immediate load ?package ?vehicle ?origin)
             (move-vehicle-road-route-crossCity ?vehicle ?origin ?destination ?ocity ?dcity ?route)
             (:immediate !!delete-protection (next ?vehicle ?destination))
             (:immediate del-exp-weight ?vehicle ?route ?weight)
             (:immediate unload ?package ?vehicle ?destination)))

        
        (:method (carry-non-road ?package ?origin ?destination)
           ((at-vehicle ?vehicle ?origin) (not (typevp ?vehicle truck)))
           ((carry-non-road-e ?package ?vehicle ?origin ?destination)))

        (:method (carry-non-road ?package ?origin ?destination)
           ((at-vehicle ?vehicle ?loc)
            (different ?loc ?origin)
            (not (typevp ?vehicle ?truck))
            (in-city ?origin ?city)
            (in-city ?loc ?city))
           ((carry-non-road-e ?package ?vehicle ?origin ?destination)))
        
        (:method (carry-non-road ?package ?origin ?destination)
           ((at-vehicle ?vehicle ?loc)
            (not (typevp ?vehicle ?truck))
            (in-city ?origin ?city)
            (in-city ?loc ?dity)
            (different ?city ?dity))
           ((carry-non-road-e ?package ?vehicle ?origin ?destination)))

        (:method (carry-non-road-e ?package ?vehicle ?origin ?destination)
           ((typep ?package ?ptype)
            (typev ?vehicle ?vtype)
            (typevp ?vehicle ?vptype)
            (different ?vptype truck)
            (availablev ?vehicle)
            (pv-compatible ?ptype ?vtype)
            (connect-loc ?route ?rtype ?origin ?destination)
            (rv-compatible ?rtype ?vptype)
            (availabler ?route)
            (or (and (same ?vtype flatbed)
                     (crane ?crane1)
                     (at-equipment ?crane1 ?origin)
                     (crane ?crane2)
                     (at-equipment ?crane2 ?destination)
                     (weight-cap-c ?crane1 ?wei-cap1)
                     (weight-cap-c ?crane2 ?wei-cap2)
                     (weight-p ?package ?weight)
                     (volume-cap-c ?crane1 ?vol-cap1)
                     (volume-cap-c ?crane2 ?vol-cap2)
                     (volume-p ?package ?volume)
                     (call <= ?weight ?wei-cap1)
                     (call <= ?weight ?wei-cap2)
                     (call <= ?volume ?vol-cap1)
                     (call <= ?volume ?vol-cap2))
                (and (same ?vtype air)
                     (plane-ramp ?ramp1)
                     (at-equipment ?ramp1 ?origin)
                     (plane-ramp ?ramp2)
                     (at-equipment ?ramp2 ?destination))
                (and (different ?vtype flatbed)
                     (different ?vtype air)))
            (tcenter ?origin)
            (tcenter ?destination)
            (availablel ?origin)
            (availablel ?destination)
            (height-cap-l ?destination ?height-cap)
            (length-cap-l ?destination ?length-cap)
            (width-cap-l ?destination ?width-cap)
            (height-cap-l ?origin ?height-capo)
            (length-cap-l ?origin ?length-capo)
            (width-cap-l ?origin ?width-capo)
            (height-v ?vehicle ?height)
            (length-v ?vehicle ?length)
            (width-v ?vehicle ?width)
            (call >= ?height-cap ?height)
            (call >= ?length-cap ?length)
            (call >= ?width-cap ?width)
            (call >= ?height-capo ?height)
            (call >= ?length-capo ?length)
            (call >= ?width-capo ?width)
            (gas-left ?vehicle ?gas)
            (distance ?origin ?destination ?d)
            (at-vehicle ?vehicle ?o1)
            (distance ?o1 ?origin ?d1)
            (gpm ?vehicle ?gpm)
            (call >= ?gas (call * ?gpm (call + ?d1 ?d)))
            (height-cap-r ?route ?height-capr)
            (weight-cap-r ?route ?weight-capr)
            (weight-p ?package ?weight)
            (weight-v ?vehicle ?weight-v)
            (or (and (not (expected ?vehicle ?route ?value))
                     (call <= (call + ?weight-v ?weight) ?weight-capr))
                (and (expected ?vehicle ?route ?value)
                     (call <= (call + (call + ?weight-v ?weight) ?value) ?weight-capr)))
            (call >= ?height-capr ?height))
           (:ordered (set-next ?vehicle ?origin)
               (:immediate add-exp-weight ?vehicle ?route ?weight)
               (:immediate at-vehicle ?vehicle ?origin)
             (:immediate !!delete-protection (next ?vehicle ?origin))
             (:immediate set-next ?vehicle ?destination)
             (:immediate load ?package ?vehicle ?origin)
             (move-vehicle-non-road ?vehicle ?origin ?destination ?route)
             (:immediate !!delete-protection (next ?vehicle ?destination))
             (:immediate del-exp-weight ?vehicle ?route ?weight)
             (:immediate unload ?package ?vehicle ?destination)))

        (:method (at-vehicle ?vehicle ?location)
           ((at-vehicle ?vehicle ?location))
           ((:immediate !!add-protection (at-vehicle ?vehicle ?location)))
           ((typevp ?vehicle truck)
            (at-vehicle ?vehicle ?origin)
            (in-city ?origin ?ocity)
            (in-city ?location ?ocity)
            (gas-left ?vehicle ?gas)
            (distance ?origin ?location ?d)
            (gpm ?vehicle ?gpm)
            (call >= ?gas (call * ?gpm ?d))
            (height-v ?vehicle ?height)
            (local-height ?ocity ?local-height)
            (call >= ?local-height ?height))
           ((move-vehicle-local-road ?vehicle ?origin ?location ?ocity))
           ((typevp ?vehicle truck)
            (at-vehicle ?vehicle ?origin)
            (in-city ?origin ?ocity)
            (in-city ?location ?dcity)
            (different ?ocity ?dcity)
            (connect-city ?r road-route ?ocity ?dcity)
            (availabler ?r)
            (gas-left ?vehicle ?gas)
            (distance ?origin ?location ?d)
            (gpm ?vehicle ?gpm)
            (call >= ?gas (call * ?gpm ?d))
            (height-cap-r ?r ?height-capr)
            (height-v ?vehicle ?height)
            (call >= ?height-capr ?height))
           ((move-vehicle-road-route-crossCity ?vehicle ?origin ?location ?ocity ?dcity ?r))
           ((typevp ?vehicle ?vtype)      
            (different ?vtype truck)
            (at-vehicle ?vehicle ?origin)
            (connect-loc ?r ?rtype ?origin ?location)
            (availabler ?r)
            (tcenter ?origin)
            (tcenter ?location)
            (gas-left ?vehicle ?gas)
            (distance ?origin ?location ?d)
            (gpm ?vehicle ?gpm)
            (call >= ?gas (call * ?gpm ?d))
            (availablel ?origin)
            (availablel ?location)
            (height-cap-r ?r ?height-capr)
            (height-v ?vehicle ?height)
            (call >= ?height-capr ?height)
            (rv-compatible ?rtype ?vtype))
           ((move-vehicle-non-road ?vehicle ?origin ?location ?r)))

                                        ;--------------------------------
   MOVE   - METHODS
                                        ;--------------------------------

        (:method (move-vehicle-local-road ?v ?ori ?des ?c)
           ((at-vehicle ?v ?des))
           ((:immediate !!add-protection (at-vehicle ?v ?des))))
        
                                        ; both tcenters
        (:method (move-vehicle-local-road ?v ?ori ?des ?c)
           ((at-vehicle ?v ?ori)
            (tcenter ?ori)
            (tcenter ?des))
           ((:immediate !move-vehicle-local-road-route1 ?v ?ori ?des ?c)))

                                        ; both not tcenters
        (:method (move-vehicle-local-road ?v ?ori ?des ?c)
           ((at-vehicle ?v ?ori)
            (not (tcenter ?ori))
            (not (tcenter ?des)))
           ((:immediate !move-vehicle-local-road-route1 ?v ?ori ?des ?c)))

                                        ; ori not tcenter, des tcenter
        (:method (move-vehicle-local-road ?v ?ori ?des ?c)
           ((at-vehicle ?v ?ori)
            (not (tcenter ?ori))
            (tcenter ?des))
           ((:immediate !move-vehicle-local-road-route2 ?v ?ori ?des ?c)))

                                        ; ori tcenter, des not 
        (:method (move-vehicle-local-road ?v ?ori ?des ?c)
           ((at-vehicle ?v ?ori)
            (different ?ori ?des)
            (tcenter ?ori)
            (not (tcenter ?des)))
           ((:immediate !move-vehicle-local-road-route3 ?v ?ori ?des ?c)))

        (:method (move-vehicle-road-route-crossCity ?v ?ori ?des ?c1 ?c2 ?r)
           ((at-vehicle ?v ?des))
           ((:immediate !!add-protection (at-vehicle ?v ?des)))
           ()
           ((:immediate !move-vehicle-road-route-crossCity ?v ?ori ?des ?c1 ?c2 ?r)))

        (:method (move-vehicle-non-road ?v ?ori ?des ?r)
           ((at-vehicle ?v ?des))
           ((:immediate !!add-protection (at-vehicle ?v ?des))))
        
        (:method (move-vehicle-non-road ?v ?ori ?des ?r)
           ((at-vehicle ?v ?ori)
            (not (hub ?ori))
            (not (hub ?des)))
           ((:immediate !move-vehicle-nonroad-route1 ?v ?ori ?des ?r)))

        (:method (move-vehicle-non-road ?v ?ori ?des ?r)
           ((at-vehicle ?v ?ori)
            (hub ?ori)
            (hub ?des))
           ((:immediate !move-vehicle-nonroad-route1 ?v ?ori ?des ?r)))

        (:method (move-vehicle-non-road ?v ?ori ?des ?r)
           ((at-vehicle ?v ?ori)
            (not (hub ?ori))
            (hub ?des))
           ((:immediate !move-vehicle-nonroad-route2 ?v ?ori ?des ?r)))

        (:method (move-vehicle-non-road ?v ?ori ?des ?r)
           ((at-vehicle ?v ?ori)
            (hub ?ori)
            (not (hub ?des)))
           ((:immediate !move-vehicle-nonroad-route3 ?v ?ori ?des ?r)))
        
        (:method (door-open-regular ?vehicle)
           ((door-open ?vehicle))
           ((:immediate !!do-nothing))
           ()
           ((:immediate !open-door-regular ?vehicle)))

        (:method (door-close-regular ?vehicle)
           ((not (door-open ?vehicle))
            (at-vehicle ?vehicle ?location))
           ((:immediate !!delete-protection(at-vehicle ?vehicle ?location)))
           ()
           ((:immediate !close-door-regular ?vehicle)))

        (:method (door-open-airplane ?vehicle)
           ((door-open ?vehicle))
           ((:immediate !!do-nothing))
           ()
           ((:immediate !open-door-airplane ?vehicle)))

        (:method (door-close-airplane ?vehicle)
           ((not (door-open ?vehicle)))
           ((:immediate !!do-nothing))
           ()
           ((:immediate !close-door-airplane ?vehicle)))

        (:method (load ?p ?v ?l)
           ((typev ?v regularv))
           (:ordered (door-open-regular ?v)
               (:immediate !load-regular ?p ?v ?l)
               (door-close-regular ?v)))

        (:method (unload ?p ?v ?l)
           ((typev ?v regularv))
           (:ordered (door-open-regular ?v)
               (:immediate !unload-regular ?p ?v ?l)
               (door-close-regular ?v)))

;;; ---------------------------
  declare - method for loading FLATBED truck or traincar
        (:method (load ?p ?v ?l)
           ((typev ?v flatbed)
            (crane ?c)
            (at-equipment ?c ?l)
            (weight-cap-c ?crane ?wei-cap)
            (weight-p ?p ?weight)
            (volume-cap-c ?crane ?vol-cap)
            (volume-p ?p ?volume)
            (call <= ?weight ?wei-cap)
            (call <= ?volume ?vol-cap))
           (:ordered (:immediate !pick-up-package-ground ?p ?c ?l)
               (:immediate !put-down-package-vehicle ?p ?c ?v ?l)))

  declare - method for unloading FLATBED truck or traincar
        (:method (unload ?p ?v ?l)
           ((typev ?v flatbed)
            (at-equipment ?c ?l)
            (crane ?c)
            (weight-cap-c ?crane ?wei-cap)
            (weight-p ?p ?weight)
            (volume-cap-c ?crane ?vol-cap)
            (volume-p ?p ?volume)
            (call <= ?weight ?wei-cap)
            (call <= ?volume ?vol-cap))
           (:ordered (:immediate !pick-up-package-vehicle ?p ?c ?v ?l)
               (:immediate !put-down-package-ground ?p ?c ?l)))

        (:method (chute-connected ?vehicle)
           ((chute-connected ?vehicle))
           ((:immediate !!do-nothing))
           ()
           ((:immediate !connect-chute ?vehicle)))

        (:method (chute-disconnected ?vehicle)
           ((not (chute-connected ?vehicle))
            (at-vehicle ?vehicle ?location))
           ((:immediate !!delete-protection(at-vehicle ?vehicle ?location)))
           ()
           ((:immediate !disconnect-chute ?vehicle)))
        
  declare - method for loading HOPPER truck or traincar
        (:method (load ?p ?v ?l)
           ((typev ?v hopper))
           (:ordered (chute-connected ?v)
               (:immediate !fill-hopper ?p ?v ?l)
               (chute-disconnected ?v)))

  declare - method for unloading HOPPER truck or traincar
        (:method (unload ?p ?v ?l)
           ((typev ?v hopper))
           (:ordered (chute-connected ?v)
               (:immediate !empty-hopper ?p ?v ?l)
               (chute-disconnected ?v)))

        (:method (hose-connected ?vehicle)
           ((hose-connected ?vehicle))
           ((:immediate !!do-nothing))
           ()
           ((:immediate !connect-hose ?vehicle)))

        (:method (hose-disconnected ?vehicle)
           ((not (hose-connected ?vehicle))
            (at-vehicle ?vehicle ?location))
           ((:immediate !!delete-protection(at-vehicle ?vehicle ?location)))
           ()
           ((:immediate !disconnect-hose ?vehicle)))

        (:method (valve-open ?vehicle)
           ((valve-open ?vehicle))
           ((:immediate !!do-nothing))
           ()
           ((:immediate !open-valve ?vehicle)))

        (:method (valve-close ?vehicle)
           ((not (valve-open ?vehicle)))
           ((:immediate !!do-nothing))
           ()
           ((:immediate !close-valve ?vehicle)))

;;; declare-method for loading TANKER truck or traincar
        (:method (load ?p ?v ?l)
           ((typev ?v tanker))
           (:ordered (hose-connected ?v)
               (:immediate valve-open ?v)
               (:immediate !fill-tank ?p ?v ?l)
             (valve-close ?v)
             (:immediate hose-disconnected ?v)))

;;; declare-method for unloading TANKER truck or traincar
        (:method (unload ?p ?v ?l)
           ((typev ?v tanker))
           (:ordered (hose-connected ?v)
               (:immediate valve-open ?v)
               (:immediate !empty-tank ?p ?v ?l)
             (valve-close ?v)
             (:immediate hose-disconnected ?v)))

        (:method (ramp-down ?vehicle)
           ((ramp-down ?vehicle))
           ((:immediate !!do-nothing))
           ()
           ((:immediate !lower-ramp ?vehicle)))

        (:method (ramp-up ?vehicle)
           ((not (ramp-down ?vehicle))
            (at-vehicle ?vehicle ?location))
           ((:immediate !!delete-protection(at-vehicle ?vehicle ?location)))
           ()
           ((:immediate !raise-ramp ?vehicle)))

;;; declare-method for loading AUTO truck or train with CARS
        (:method (load ?p ?v ?l)
           ((typev ?v auto)
            (typep ?p cars))
           (:ordered (ramp-down ?v)
               (:immediate !load-cars ?p ?v ?l)
               (ramp-up ?v)))

;;; declare-method for unloading AUTO truck or traincar with CARS
        (:method (unload ?p ?v ?l)
           ((typev ?v auto)
            (typep ?p cars))
           (:ordered (ramp-down ?v)
               (:immediate !unload-cars ?p ?v ?l)
               (ramp-up ?v)))
        
        (:method (door-open-airplane ?v)
           ((door-open ?v))
           ((:immediate !!do-nothing))
           ()
           ((!open-door-airplane ?v)))

        (:method (door-close-airplane ?v)
           ((not(door-open ?v)))
           ((:immediate !!do-nothing))
           ()
           ((!close-door-airplane ?v)))

        (:method (ramp-connected ?vehicle ?ramp ?location)
           ((ramp-connected ?vehicle ?r))
           ((:immediate !!do-nothing))
           ()
           ((:immediate !attach-conveyor-ramp ?vehicle ?ramp ?location)))

        (:method (ramp-disconnected ?vehicle ?ramp ?location)
           ((not (ramp-connected ?vehicle ?ramp))
            (at-vehicle ?vehicle ?location))
           ((:immediate !!delete-protection(at-vehicle ?vehicle ?location)))
           ()
           ((:immediate !detach-conveyor-ramp ?vehicle ?ramp ?location)))

;;; declare-method for loading AIRPLANE 
        (:method (load ?p ?v ?l)
           ((typev ?v air)
            (plane-ramp ?r)
            (at-equipment ?r ?l))
           (:ordered (ramp-connected ?v ?r ?l)
               (:immediate door-open-airplane ?v)
               (:immediate !load-airplane ?p ?v ?l)
             (door-close-airplane ?v)
             (:immediate ramp-disconnected ?v ?r ?l)))

;;; declare-method for unloading AIRPLANE 
        (:method (unload ?p ?v ?l)
           ((typev ?v air)
            (plane-ramp ?r plane-ramp)
            (at-equipment ?r ?l))
           (:ordered (ramp-connected ?v ?r ?l)
               (:immediate door-open-airplane ?v)
               (:immediate !unload-airplane ?p ?v ?l)
             (door-close-airplane ?v)
             (:immediate ramp-disconnected ?v ?r ?l)))

;;;------------------------------------------
        (:include umt-translog-axioms #.(merge-pathnames "axioms.lisp"
                                                         (or *compile-file-truename*
                                                             *load-truename*)))

        (:include umt-translog-operators #.(merge-pathnames "operators.lisp"
                                                            (or *compile-file-truename*
                                                                *load-truename*)))

        ))))

(check-truck)
(check-tcenter)
(check-train)
(check-airplane)
(check-road-route)
(check-non-road-route)
 top-level declare-method: used for top-level goal
  CARRY DECLARE-METHODS - TOP LEVEL.
?origin (tcenter, not hub) -> ?destination (tcenter, not hub)        
?origin (not tcenter) -> ?tcenter -> ?destination (tcenter)
 ?origin (tcenter) -> ?tcenter -> ?destination (not tcenter)
 carry: 
 ?origin (not tcenter) -> 
       ?tcenter1 -> ?tcenter2 -> ?destination (not tcenter)
--------------------------
  CARRY DECLARE-METHODS - BETWEEN TCENTERS. 
--------------------------
 carry: ?tcenter1 -> ?tcenter2 where ?tcenter1 = ?tcenter2
 carry: ?tcenter1 -> ?hub -> ?tcenter2.  
--------------------------------
--------------------------------
 both tcenters
 both not tcenters
 ori not tcenter, des tcenter
 ori tcenter, des not 
 ---------------------------
 declare-method for loading TANKER truck or traincar
 declare-method for unloading TANKER truck or traincar
 declare-method for loading AUTO truck or train with CARS
 declare-method for unloading AUTO truck or traincar with CARS
 declare-method for loading AIRPLANE 
 declare-method for unloading AIRPLANE 
------------------------------------------
(in-package :shop2-user)

(defun define-partitioned-umt-domain ()
  (let ((*define-silently* t)
        (shop2::*ignore-singleton-variables* t))
    (defdomain (partitioned-UM-Translog-2 :redefine-ok t)
       ( 
        (:method (assert-goals (?goal . ?goals) ?out)
           ()
           ((assert-goals ?goals ((goal ?goal) . ?out))))

        (:method (assert-goals nil ?out)
           ()
           ((!!assert ?out)))

        (:method (pre-check)
           ()
           (
            (check-transport-type)))

        (:method (check-truck)
           (:first (typevp ?truck truck)
                   (not (availablev ?truck)))
           ((!!delete-truck ?truck) (check-truck))
           nil
           nil)

        (:method (check-tcenter)
           (:first (tcenter ?location)
                   (not (availablel ?location)))
           ((!!delete-tcenter ?location) (check-tcenter))
           nil
           nil)

        (:method (check-train)
           (:first (typevp ?train train)
                   (not (availablev ?train)))
           ((!!delete-train ?train) (check-train))
           nil
           nil)

        (:method (check-airplane)
           (:first (typevp ?airplane airplane)
                   (not (availablev ?airplane)))
           ((!!delete-airplane ?airplane) (check-airplane))
           nil
           nil)

        (:method (check-road-route)
           (:first (connect-city ?road road-route ?c1 ?c2)
                   (not (availabler ?road)))
           ((!!delete-road-route ?road ?c1 ?c2) (check-road-route))
           nil
           nil)

        (:method (check-non-road-route)
           (:first (connect-loc ?road ?type ?l1 ?l2)
                   (not (availabler ?road)))
           ((!!delete-non-road-route ?road ?type ?l1 ?l2) (check-non-road-route))
           nil
           nil)

        (:method (check-transport-type)
           (:first (at-packagel ?p ?o)
                   (goal (delivered ?p ?d))
                   (not (checked ?p)))
           ((!!check ?p)
            (check-local ?p ?o ?d)
            (check-road ?p ?o ?d)
            (check-non-road ?p ?o ?d)
            (check-via-hub ?p ?o ?d)
            (check-tn ?p ?o ?d)
            (check-nt ?p ?o ?d)
            (check-nn ?p ?o ?d)
            (check-p ?p)
            (check-transport-type))
           nil
           nil)

        (:method (check-p ?p)
           (or (local ?p)
               (road ?p ?r)
               (non-road ?p ?r)
               (via-hub ?p)
               (nt ?p ?t1)
               (tn ?p ?t2)
               (nn ?p ?t3 ?t4))
           nil)

        (:method (check-local ?package ?origin ?destination)
           ((in-city ?origin ?ocity)
            (in-city ?destination ?ocity))
           ((!!add-package-local ?package))
           nil
           nil)

        (:method (check-road ?package ?origin ?destination)
           ((in-city ?origin ?ocity)
            (in-city ?destination ?dcity)
            (different ?ocity ?dcity)
            (connect-city ?route road-route ?ocity ?dcity)
            (availabler ?route))
           ((!!add-package-road ?package ?route))
           nil
           nil)

        (:method (check-via-hub ?package ?origin ?destination)
           ((tcenter ?origin)
            (tcenter ?destination)
            (typep ?package ?typep)
            (or (pv-compatible ?typep air)
                (not (typel ?origin airport)))
            (availablel ?origin)
            (availablel ?destination)
            (not (hub ?origin))
            (not (hub ?destination))
            (typel ?origin ?tt)
            (typel ?destination ?tt))
           ((!!add-package-via-hub ?package))
           nil
           nil)

        (:method (check-nt ?package ?origin ?destination)
           (:first (not (tcenter ?origin))
                   (tcenter ?destination)
                   (typep ?package ?typep)
                   (or (pv-compatible ?typep air)
                       (not (typel ?destination airport)))
                   (in-city ?origin ?ocity)
                   (tcenter ?tcenter)
                   (availablel ?destination)
                   (availablel ?tcenter)
                   (not (nt ?package ?tcenter))
                   (in-city ?tcenter ?ocity)
                   (typel ?tcenter ?tt)
                   (typel ?destination ?tt))
           ((!!add-package-nt ?package ?tcenter) (check-nt ?package ?origin ?destination))
           nil
           nil)

        
        (:method (check-tn ?package ?origin ?destination)  
           (:first (tcenter ?origin)
                   (typep ?package ?typep)
                   (or (pv-compatible ?typep air)
                       (not (typel ?origin airport)))
                   (not (tcenter ?destination))
                   (IN-CITY ?destination ?dcity)
                   (in-city ?tcenter ?dcity)
                   (tcenter ?tcenter)
                   (availablel ?origin)
                   (availablel ?tcenter)
                   (not (tn ?package ?tcenter))
                   (typel ?origin ?tt)
                   (typel ?tcenter ?tt))
           ((!!add-package-tn ?package ?tcenter) (check-tn ?package ?origin ?destination))
           nil
           nil)

        (:method (check-nn ?package  ?origin  ?destination)  
           (:first (not (tcenter ?origin))
                   (not (tcenter ?destination))
                   (in-city ?origin ?ocity)
                   (in-city ?destination ?dcity)
                   (in-city ?tcenter1 ?ocity)
                   (in-city ?tcenter2 ?dcity)
                   (tcenter ?tcenter1)
                   (typep ?package ?typep)
                   (or (pv-compatible ?typep air)
                       (not (typel ?origin airport)))
                   (typel ?tcenter1 ?tt)
                   (typel ?tcenter2 ?tt)
                   (tcenter ?tcenter2)
                   (availablel ?tcenter1)
                   (availablel ?tcenter2)
                   (not (nn ?package ?tcenter1 ?tcenter2)))
           ((!!add-package-nn ?package ?tcenter1 ?tcenter2) (check-nn ?package ?origin ?destination))
           nil
           nil)

        (:method (check-non-road ?package ?origin ?destination)
           ((tcenter ?origin)
            (tcenter ?destination)
            (availablel ?origin)
            (availablel ?destination)
            (connect-loc ?route ?type ?origin ?destination)
            (availabler ?route))
           ((!!add-package-non-road ?package ?route))
           nil
           nil)

        (:method (set-next ?v ?d)
           ((not (next ?v ?dd)))
           ((:immediate !!add-next ?v ?d))
           ((next ?v ?d))
           ((:immediate !!add-protection (next ?v ?d)))
           ((next ?v ?dd))
           (:ordered (:immediate !!del-next ?v ?dd)
               (:immediate !!add-next ?v ?d)))

        (:method (add-exp-weight ?v ?r ?weight)
           ((not (expected ?v ?r ?value)))
           ((:immediate !!exp-weight-set ?v ?r ?weight))
           ()
           ((:immediate !!exp-weight-inc ?v ?r ?weight))) 
        
        (:method (del-exp-weight ?v ?r ?weight)
           ((expected ?v ?r ?value)
            (call > ?value ?weight))
           ((:immediate !!exp-weight-dec ?v ?r ?weight))
           ((expected ?v ?r ?value)
            (call = ?value ?weight))
           ((:immediate !!exp-weight-clear ?v ?r)))


        (:method (delivered ?package ?destination)
           ((at-packagel ?package ?destination))
           ((:immediate !deliver ?package ?destination))
           ((at-packagel ?package ?origin))
           ((:task transport ?package ?origin ?destination)))

        (:method (transport ?package ?origin ?destination)
           ()
           (:ordered (:immediate !collect-fees ?package)
               (:immediate carry ?package ?origin ?destination)
               (:immediate !deliver ?package ?destination)))


        (:method (carry ?package ?origin ?destination)
           ()
           ((carry-direct ?package ?origin ?destination)))

  2 carry :
        (:method (carry ?package  ?origin ?destination)  
           ((via-hub ?package))
           ((carry-via-hub ?package ?origin ?destination)))

  3 carry :
        (:method (CARRY ?package ?origin ?destination)  
           ((nt ?package ?tcenter))
           (:ordered (carry-local-road ?package ?origin ?tcenter) 
               (carry-between-tcenters ?package ?tcenter ?destination)))

  4 carry :
        (:method (CARRY ?package ?origin ?destination)  
           ((tn ?package ?tcenter))
           (:ordered (carry-between-tcenters ?package ?origin ?tcenter) 
               (carry-local-road ?package ?tcenter ?destination)))

        (:method (CARRY ?package  ?origin  ?destination)  
           ((nn ?package ?tcenter1 ?tcenter2))
           (:ordered (carry-local-road ?package ?origin ?tcenter1)
               (carry-between-tcenters ?package ?tcenter1 ?tcenter2)
               (carry-local-road ?package ?tcenter2 ?destination)))
        

        (:method (CARRY-BETWEEN-TCENTERS ?package ?tcenter1 ?tcenter2) 
           ()
           ((carry-non-road ?package ?tcenter1 ?tcenter2)))


carry : ?  ( not hub ) - > ? tcenter2 ( not hub )
        (:method (CARRY-BETWEEN-TCENTERS ?package ?tcenter1 ?tcenter2) 
           ((not (hub ?tcenter1))
            (not (hub ?tcenter2)))
           ((carry-via-hub ?package ?tcenter1 ?tcenter2)))

        (:method (CARRY-VIA-HUB ?package ?tcenter1 ?tcenter2)
           ((connect-loc ?r1 ?rtype ?tcenter1 ?hub)
            (connect-loc ?r2 ?rtype ?hub ?tcenter2)
            (availabler ?r1)
            (availabler ?r2)
            (availablel ?hub))
           ((carry-non-road ?package ?tcenter1 ?hub)
            (carry-non-road ?package ?hub ?tcenter2)))

        (:method (CARRY-DIRECT ?package ?origin ?destination)
           ((local ?package))
           ((carry-local-road ?package ?origin ?destination)))

        (:method (CARRY-DIRECT ?package ?origin ?destination)
           ((road ?package ?route))
           ((carry-road ?package ?origin ?destination)))

        (:method (CARRY-DIRECT ?package ?origin ?destination)
           ((non-road ?package ?route))
           ((carry-non-road ?package ?origin ?destination)))

        (:method (carry-local-road ?package ?origin ?destination)
           ((at-vehicle ?vehicle ?origin) (typevp ?vehicle truck))
           ((carry-local-road-e ?package ?vehicle ?origin ?destination)))

        (:method (carry-local-road ?package ?origin ?destination)
           ((at-vehicle ?vehicle ?loc)
            (different ?loc ?origin)
            (typevp ?vehicle ?truck)
            (in-city ?origin ?city)
            (in-city ?loc ?city))
           ((carry-local-road-e ?package ?vehicle ?origin ?destination)))
        
        (:method (carry-local-road ?package ?origin ?destination)
           ((at-vehicle ?vehicle ?loc)
            (typevp ?vehicle ?truck)
            (in-city ?origin ?city)
            (in-city ?loc ?dity)
            (different ?city ?dity))
           ((carry-local-road-e ?package ?vehicle ?origin ?destination)))
        
        (:method (carry-local-road-e ?package ?vehicle ?origin ?destination)
           ((typep ?package ?ptype)
            (typev ?vehicle ?vtype)
            (availablev ?vehicle)
            (or (and (same ?vtype flatbed)
                     (crane ?crane1)
                     (at-equipment ?crane1 ?origin)
                     (crane ?crane2)
                     (at-equipment ?crane2 ?destination)
                     (weight-cap-c ?crane1 ?wei-cap1)
                     (weight-cap-c ?crane2 ?wei-cap2)
                     (weight-p ?package ?weight)
                     (volume-cap-c ?crane1 ?vol-cap1)
                     (volume-cap-c ?crane2 ?vol-cap2)
                     (volume-p ?package ?volume)
                     (call <= ?weight ?wei-cap1)
                     (call <= ?weight ?wei-cap2)
                     (call <= ?volume ?vol-cap1)
                     (call <= ?volume ?vol-cap2))
                (and (same ?vtype air)
                     (plane-ramp ?ramp1)
                     (at-equipment ?ramp1 ?origin)
                     (plane-ramp ?ramp2)
                     (at-equipment ?ramp2 ?destination))
                (and (different ?vtype flatbed)
                     (different ?vtype air)))
            (in-city ?origin ?ocity)
            (at-vehicle ?vehicle ?o1)
            (in-city ?destination ?ocity)
            (local-height ?ocity ?local-height)
            (height-cap-l ?destination ?height-cap)
            (length-cap-l ?destination ?length-cap)
            (width-cap-l ?destination ?width-cap)
            (height-cap-l ?origin ?height-capo)
            (length-cap-l ?origin ?length-capo)
            (width-cap-l ?origin ?width-capo)
            (height-v ?vehicle ?height)
            (length-v ?vehicle ?length)
            (width-v ?vehicle ?width)
            (local-weight ?ocity ?local-weight)
            (weight-p ?package ?weight)
            (weight-v ?vehicle ?weight-v)
            (or (and (not (expected ?vehicle ?ocity ?value))
                     (call <= (call + ?weight-v ?weight) ?local-weight))
                (and (expected ?vehicle ?ocity ?value)
                     (call <= (call + (call + ?weight-v ?weight) ?value) ?local-weight)))
            (call >= ?height-cap ?height)
            (call >= ?length-cap ?length)
            (call >= ?width-cap ?width)
            (call >= ?height-capo ?height)
            (call >= ?length-capo ?length)
            (call >= ?width-capo ?width)
            (call >= ?local-height ?height)
            (gas-left ?vehicle ?gas)
            (distance ?origin ?destination ?d)
            (distance ?o1 ?origin ?d1)
            (gpm ?vehicle ?gpm)
            (call >= ?gas (call * ?gpm (call + ?d1 ?d)))
            (pv-compatible ?ptype ?vtype))
           (:ordered (set-next ?vehicle ?origin)
               (:immediate add-exp-weight ?vehicle ?ocity ?weight)
               (:immediate at-vehicle ?vehicle ?origin)
             (:immediate !!delete-protection (next ?vehicle ?origin))
             (:immediate set-next ?vehicle ?destination)
             (:immediate load ?package ?vehicle ?origin)
             (move-vehicle-local-road ?vehicle ?origin ?destination ?ocity)
             (:immediate !!delete-protection (next ?vehicle ?destination))
             (:immediate del-exp-weight ?vehicle ?ocity ?weight)
             (:immediate unload ?package ?vehicle ?destination)))


        (:method (carry-road ?package ?origin ?destination)
           ((at-vehicle ?vehicle ?origin) (typevp ?vehicle truck))
           ((carry-road-e ?package ?vehicle ?origin ?destination)))

        (:method (carry-road ?package ?origin ?destination)
           ((at-vehicle ?vehicle ?loc)
            (different ?loc ?origin)
            (typevp ?vehicle ?truck)
            (in-city ?origin ?city)
            (in-city ?loc ?city))
           ((carry-road-e ?package ?vehicle ?origin ?destination)))
        
        (:method (carry-road ?package ?origin ?destination)
           ((at-vehicle ?vehicle ?loc)
            (typevp ?vehicle ?truck)
            (in-city ?origin ?city)
            (in-city ?loc ?dity)
            (different ?city ?dity))
           ((carry-road-e ?package ?vehicle ?origin ?destination)))

        (:method (carry-road-e ?package ?vehicle ?origin ?destination)
           ((typep ?package ?ptype)
            (typev ?vehicle ?vtype)
            (availablev ?vehicle)
            (in-city ?origin ?ocity)
            (in-city ?destination ?dcity)
            (different ?ocity ?dcity)
            (connect-city ?route road-route ?ocity ?dcity)
            (availabler ?route)
            (or (and (same ?vtype flatbed)
                     (crane ?crane1)
                     (at-equipment ?crane1 ?origin)
                     (crane ?crane2)
                     (at-equipment ?crane2 ?destination)
                     (weight-cap-c ?crane1 ?wei-cap1)
                     (weight-cap-c ?crane2 ?wei-cap2)
                     (weight-p ?package ?weight)
                     (volume-cap-c ?crane1 ?vol-cap1)
                     (volume-cap-c ?crane2 ?vol-cap2)
                     (volume-p ?package ?volume)
                     (call <= ?weight ?wei-cap1)
                     (call <= ?weight ?wei-cap2)
                     (call <= ?volume ?vol-cap1)
                     (call <= ?volume ?vol-cap2))
                (and (same ?vtype air)
                     (plane-ramp ?ramp1)
                     (at-equipment ?ramp1 ?origin)
                     (plane-ramp ?ramp2)
                     (at-equipment ?ramp2 ?destination))
                (and (different ?vtype flatbed)
                     (different ?vtype air)))
            (height-cap-l ?destination ?height-cap)
            (length-cap-l ?destination ?length-cap)
            (width-cap-l ?destination ?width-cap)
            (height-cap-l ?origin ?height-capo)
            (length-cap-l ?origin ?length-capo)
            (width-cap-l ?origin ?width-capo)
            (height-v ?vehicle ?height)
            (length-v ?vehicle ?length)
            (width-v ?vehicle ?width)
            (call >= ?height-cap ?height)
            (call >= ?length-cap ?length)
            (call >= ?width-cap ?width)
            (call >= ?height-capo ?height)
            (call >= ?length-capo ?length)
            (call >= ?width-capo ?width)
            (gas-left ?vehicle ?gas)
            (distance ?origin ?destination ?d)
            (at-vehicle ?vehicle ?o1)
            (distance ?o1 ?origin ?d1)
            (gpm ?vehicle ?gpm)
            (call >= ?gas (call * ?gpm (call + ?d ?d1)))
            (pv-compatible ?ptype ?vtype)
            (height-cap-r ?route ?height-capr)
            (weight-cap-r ?route ?weight-capr)
            (weight-p ?package ?weight)
            (weight-v ?vehicle ?weight-v)
            (or (and (not (expected ?vehicle ?route ?value))
                     (call <= (call + ?weight-v ?weight) ?weight-capr))
                (and (expected ?vehicle ?route ?value)
                     (call <= (call + (call + ?weight-v ?weight) ?value) ?weight-capr)))
            (call >= ?height-capr ?height))
           (:ordered (set-next ?vehicle ?origin)
               (:immediate add-exp-weight ?vehicle ?route ?weight)
               (:immediate at-vehicle ?vehicle ?origin)
             (:immediate !!delete-protection (next ?vehicle ?origin))
             (:immediate set-next ?vehicle ?destination)
             (:immediate load ?package ?vehicle ?origin)
             (move-vehicle-road-route-crossCity ?vehicle ?origin ?destination ?ocity ?dcity ?route)
             (:immediate !!delete-protection (next ?vehicle ?destination))
             (:immediate del-exp-weight ?vehicle ?route ?weight)
             (:immediate unload ?package ?vehicle ?destination)))

        
        (:method (carry-non-road ?package ?origin ?destination)
           ((at-vehicle ?vehicle ?origin) (not (typevp ?vehicle truck)))
           ((carry-non-road-e ?package ?vehicle ?origin ?destination)))

        (:method (carry-non-road ?package ?origin ?destination)
           ((at-vehicle ?vehicle ?loc)
            (different ?loc ?origin)
            (not (typevp ?vehicle ?truck))
            (in-city ?origin ?city)
            (in-city ?loc ?city))
           ((carry-non-road-e ?package ?vehicle ?origin ?destination)))
        
        (:method (carry-non-road ?package ?origin ?destination)
           ((at-vehicle ?vehicle ?loc)
            (not (typevp ?vehicle ?truck))
            (in-city ?origin ?city)
            (in-city ?loc ?dity)
            (different ?city ?dity))
           ((carry-non-road-e ?package ?vehicle ?origin ?destination)))

        (:method (carry-non-road-e ?package ?vehicle ?origin ?destination)
           ((typep ?package ?ptype)
            (typev ?vehicle ?vtype)
            (typevp ?vehicle ?vptype)
            (different ?vptype truck)
            (availablev ?vehicle)
            (pv-compatible ?ptype ?vtype)
            (connect-loc ?route ?rtype ?origin ?destination)
            (rv-compatible ?rtype ?vptype)
            (availabler ?route)
            (or (and (same ?vtype flatbed)
                     (crane ?crane1)
                     (at-equipment ?crane1 ?origin)
                     (crane ?crane2)
                     (at-equipment ?crane2 ?destination)
                     (weight-cap-c ?crane1 ?wei-cap1)
                     (weight-cap-c ?crane2 ?wei-cap2)
                     (weight-p ?package ?weight)
                     (volume-cap-c ?crane1 ?vol-cap1)
                     (volume-cap-c ?crane2 ?vol-cap2)
                     (volume-p ?package ?volume)
                     (call <= ?weight ?wei-cap1)
                     (call <= ?weight ?wei-cap2)
                     (call <= ?volume ?vol-cap1)
                     (call <= ?volume ?vol-cap2))
                (and (same ?vtype air)
                     (plane-ramp ?ramp1)
                     (at-equipment ?ramp1 ?origin)
                     (plane-ramp ?ramp2)
                     (at-equipment ?ramp2 ?destination))
                (and (different ?vtype flatbed)
                     (different ?vtype air)))
            (tcenter ?origin)
            (tcenter ?destination)
            (availablel ?origin)
            (availablel ?destination)
            (height-cap-l ?destination ?height-cap)
            (length-cap-l ?destination ?length-cap)
            (width-cap-l ?destination ?width-cap)
            (height-cap-l ?origin ?height-capo)
            (length-cap-l ?origin ?length-capo)
            (width-cap-l ?origin ?width-capo)
            (height-v ?vehicle ?height)
            (length-v ?vehicle ?length)
            (width-v ?vehicle ?width)
            (call >= ?height-cap ?height)
            (call >= ?length-cap ?length)
            (call >= ?width-cap ?width)
            (call >= ?height-capo ?height)
            (call >= ?length-capo ?length)
            (call >= ?width-capo ?width)
            (gas-left ?vehicle ?gas)
            (distance ?origin ?destination ?d)
            (at-vehicle ?vehicle ?o1)
            (distance ?o1 ?origin ?d1)
            (gpm ?vehicle ?gpm)
            (call >= ?gas (call * ?gpm (call + ?d1 ?d)))
            (height-cap-r ?route ?height-capr)
            (weight-cap-r ?route ?weight-capr)
            (weight-p ?package ?weight)
            (weight-v ?vehicle ?weight-v)
            (or (and (not (expected ?vehicle ?route ?value))
                     (call <= (call + ?weight-v ?weight) ?weight-capr))
                (and (expected ?vehicle ?route ?value)
                     (call <= (call + (call + ?weight-v ?weight) ?value) ?weight-capr)))
            (call >= ?height-capr ?height))
           (:ordered (set-next ?vehicle ?origin)
               (:immediate add-exp-weight ?vehicle ?route ?weight)
               (:immediate at-vehicle ?vehicle ?origin)
             (:immediate !!delete-protection (next ?vehicle ?origin))
             (:immediate set-next ?vehicle ?destination)
             (:immediate load ?package ?vehicle ?origin)
             (move-vehicle-non-road ?vehicle ?origin ?destination ?route)
             (:immediate !!delete-protection (next ?vehicle ?destination))
             (:immediate del-exp-weight ?vehicle ?route ?weight)
             (:immediate unload ?package ?vehicle ?destination)))

        (:method (at-vehicle ?vehicle ?location)
           ((at-vehicle ?vehicle ?location))
           ((:immediate !!add-protection (at-vehicle ?vehicle ?location)))
           ((typevp ?vehicle truck)
            (at-vehicle ?vehicle ?origin)
            (in-city ?origin ?ocity)
            (in-city ?location ?ocity)
            (gas-left ?vehicle ?gas)
            (distance ?origin ?location ?d)
            (gpm ?vehicle ?gpm)
            (call >= ?gas (call * ?gpm ?d))
            (height-v ?vehicle ?height)
            (local-height ?ocity ?local-height)
            (call >= ?local-height ?height))
           ((move-vehicle-local-road ?vehicle ?origin ?location ?ocity))
           ((typevp ?vehicle truck)
            (at-vehicle ?vehicle ?origin)
            (in-city ?origin ?ocity)
            (in-city ?location ?dcity)
            (different ?ocity ?dcity)
            (connect-city ?r road-route ?ocity ?dcity)
            (availabler ?r)
            (gas-left ?vehicle ?gas)
            (distance ?origin ?location ?d)
            (gpm ?vehicle ?gpm)
            (call >= ?gas (call * ?gpm ?d))
            (height-cap-r ?r ?height-capr)
            (height-v ?vehicle ?height)
            (call >= ?height-capr ?height))
           ((move-vehicle-road-route-crossCity ?vehicle ?origin ?location ?ocity ?dcity ?r))
           ((typevp ?vehicle ?vtype)      
            (different ?vtype truck)
            (at-vehicle ?vehicle ?origin)
            (connect-loc ?r ?rtype ?origin ?location)
            (availabler ?r)
            (tcenter ?origin)
            (tcenter ?location)
            (gas-left ?vehicle ?gas)
            (distance ?origin ?location ?d)
            (gpm ?vehicle ?gpm)
            (call >= ?gas (call * ?gpm ?d))
            (availablel ?origin)
            (availablel ?location)
            (height-cap-r ?r ?height-capr)
            (height-v ?vehicle ?height)
            (call >= ?height-capr ?height)
            (rv-compatible ?rtype ?vtype))
           ((move-vehicle-non-road ?vehicle ?origin ?location ?r)))

   MOVE   - METHODS

        (:method (move-vehicle-local-road ?v ?ori ?des ?c)
           ((at-vehicle ?v ?des))
           ((:immediate !!add-protection (at-vehicle ?v ?des))))
        
        (:method (move-vehicle-local-road ?v ?ori ?des ?c)
           ((at-vehicle ?v ?ori)
            (tcenter ?ori)
            (tcenter ?des))
           ((:immediate !move-vehicle-local-road-route1 ?v ?ori ?des ?c)))

        (:method (move-vehicle-local-road ?v ?ori ?des ?c)
           ((at-vehicle ?v ?ori)
            (not (tcenter ?ori))
            (not (tcenter ?des)))
           ((:immediate !move-vehicle-local-road-route1 ?v ?ori ?des ?c)))

        (:method (move-vehicle-local-road ?v ?ori ?des ?c)
           ((at-vehicle ?v ?ori)
            (not (tcenter ?ori))
            (tcenter ?des))
           ((:immediate !move-vehicle-local-road-route2 ?v ?ori ?des ?c)))

        (:method (move-vehicle-local-road ?v ?ori ?des ?c)
           ((at-vehicle ?v ?ori)
            (different ?ori ?des)
            (tcenter ?ori)
            (not (tcenter ?des)))
           ((:immediate !move-vehicle-local-road-route3 ?v ?ori ?des ?c)))

        (:method (move-vehicle-road-route-crossCity ?v ?ori ?des ?c1 ?c2 ?r)
           ((at-vehicle ?v ?des))
           ((:immediate !!add-protection (at-vehicle ?v ?des)))
           ()
           ((:immediate !move-vehicle-road-route-crossCity ?v ?ori ?des ?c1 ?c2 ?r)))

        (:method (move-vehicle-non-road ?v ?ori ?des ?r)
           ((at-vehicle ?v ?des))
           ((:immediate !!add-protection (at-vehicle ?v ?des))))
        
        (:method (move-vehicle-non-road ?v ?ori ?des ?r)
           ((at-vehicle ?v ?ori)
            (not (hub ?ori))
            (not (hub ?des)))
           ((:immediate !move-vehicle-nonroad-route1 ?v ?ori ?des ?r)))

        (:method (move-vehicle-non-road ?v ?ori ?des ?r)
           ((at-vehicle ?v ?ori)
            (hub ?ori)
            (hub ?des))
           ((:immediate !move-vehicle-nonroad-route1 ?v ?ori ?des ?r)))

        (:method (move-vehicle-non-road ?v ?ori ?des ?r)
           ((at-vehicle ?v ?ori)
            (not (hub ?ori))
            (hub ?des))
           ((:immediate !move-vehicle-nonroad-route2 ?v ?ori ?des ?r)))

        (:method (move-vehicle-non-road ?v ?ori ?des ?r)
           ((at-vehicle ?v ?ori)
            (hub ?ori)
            (not (hub ?des)))
           ((:immediate !move-vehicle-nonroad-route3 ?v ?ori ?des ?r)))
        
        (:method (door-open-regular ?vehicle)
           ((door-open ?vehicle))
           ((:immediate !!do-nothing))
           ()
           ((:immediate !open-door-regular ?vehicle)))

        (:method (door-close-regular ?vehicle)
           ((not (door-open ?vehicle))
            (at-vehicle ?vehicle ?location))
           ((:immediate !!delete-protection(at-vehicle ?vehicle ?location)))
           ()
           ((:immediate !close-door-regular ?vehicle)))

        (:method (door-open-airplane ?vehicle)
           ((door-open ?vehicle))
           ((:immediate !!do-nothing))
           ()
           ((:immediate !open-door-airplane ?vehicle)))

        (:method (door-close-airplane ?vehicle)
           ((not (door-open ?vehicle)))
           ((:immediate !!do-nothing))
           ()
           ((:immediate !close-door-airplane ?vehicle)))

        (:method (load ?p ?v ?l)
           ((typev ?v regularv))
           (:ordered (door-open-regular ?v)
               (:immediate !load-regular ?p ?v ?l)
               (door-close-regular ?v)))

        (:method (unload ?p ?v ?l)
           ((typev ?v regularv))
           (:ordered (door-open-regular ?v)
               (:immediate !unload-regular ?p ?v ?l)
               (door-close-regular ?v)))

  declare - method for loading FLATBED truck or traincar
        (:method (load ?p ?v ?l)
           ((typev ?v flatbed)
            (crane ?c)
            (at-equipment ?c ?l)
            (weight-cap-c ?crane ?wei-cap)
            (weight-p ?p ?weight)
            (volume-cap-c ?crane ?vol-cap)
            (volume-p ?p ?volume)
            (call <= ?weight ?wei-cap)
            (call <= ?volume ?vol-cap))
           (:ordered (:immediate !pick-up-package-ground ?p ?c ?l)
               (:immediate !put-down-package-vehicle ?p ?c ?v ?l)))

  declare - method for unloading FLATBED truck or traincar
        (:method (unload ?p ?v ?l)
           ((typev ?v flatbed)
            (at-equipment ?c ?l)
            (crane ?c)
            (weight-cap-c ?crane ?wei-cap)
            (weight-p ?p ?weight)
            (volume-cap-c ?crane ?vol-cap)
            (volume-p ?p ?volume)
            (call <= ?weight ?wei-cap)
            (call <= ?volume ?vol-cap))
           (:ordered (:immediate !pick-up-package-vehicle ?p ?c ?v ?l)
               (:immediate !put-down-package-ground ?p ?c ?l)))

        (:method (chute-connected ?vehicle)
           ((chute-connected ?vehicle))
           ((:immediate !!do-nothing))
           ()
           ((:immediate !connect-chute ?vehicle)))

        (:method (chute-disconnected ?vehicle)
           ((not (chute-connected ?vehicle))
            (at-vehicle ?vehicle ?location))
           ((:immediate !!delete-protection(at-vehicle ?vehicle ?location)))
           ()
           ((:immediate !disconnect-chute ?vehicle)))
        
  declare - method for loading HOPPER truck or traincar
        (:method (load ?p ?v ?l)
           ((typev ?v hopper))
           (:ordered (chute-connected ?v)
               (:immediate !fill-hopper ?p ?v ?l)
               (chute-disconnected ?v)))

  declare - method for unloading HOPPER truck or traincar
        (:method (unload ?p ?v ?l)
           ((typev ?v hopper))
           (:ordered (chute-connected ?v)
               (:immediate !empty-hopper ?p ?v ?l)
               (chute-disconnected ?v)))

        (:method (hose-connected ?vehicle)
           ((hose-connected ?vehicle))
           ((:immediate !!do-nothing))
           ()
           ((:immediate !connect-hose ?vehicle)))

        (:method (hose-disconnected ?vehicle)
           ((not (hose-connected ?vehicle))
            (at-vehicle ?vehicle ?location))
           ((:immediate !!delete-protection(at-vehicle ?vehicle ?location)))
           ()
           ((:immediate !disconnect-hose ?vehicle)))

        (:method (valve-open ?vehicle)
           ((valve-open ?vehicle))
           ((:immediate !!do-nothing))
           ()
           ((:immediate !open-valve ?vehicle)))

        (:method (valve-close ?vehicle)
           ((not (valve-open ?vehicle)))
           ((:immediate !!do-nothing))
           ()
           ((:immediate !close-valve ?vehicle)))

        (:method (load ?p ?v ?l)
           ((typev ?v tanker))
           (:ordered (hose-connected ?v)
               (:immediate valve-open ?v)
               (:immediate !fill-tank ?p ?v ?l)
             (valve-close ?v)
             (:immediate hose-disconnected ?v)))

        (:method (unload ?p ?v ?l)
           ((typev ?v tanker))
           (:ordered (hose-connected ?v)
               (:immediate valve-open ?v)
               (:immediate !empty-tank ?p ?v ?l)
             (valve-close ?v)
             (:immediate hose-disconnected ?v)))

        (:method (ramp-down ?vehicle)
           ((ramp-down ?vehicle))
           ((:immediate !!do-nothing))
           ()
           ((:immediate !lower-ramp ?vehicle)))

        (:method (ramp-up ?vehicle)
           ((not (ramp-down ?vehicle))
            (at-vehicle ?vehicle ?location))
           ((:immediate !!delete-protection(at-vehicle ?vehicle ?location)))
           ()
           ((:immediate !raise-ramp ?vehicle)))

        (:method (load ?p ?v ?l)
           ((typev ?v auto)
            (typep ?p cars))
           (:ordered (ramp-down ?v)
               (:immediate !load-cars ?p ?v ?l)
               (ramp-up ?v)))

        (:method (unload ?p ?v ?l)
           ((typev ?v auto)
            (typep ?p cars))
           (:ordered (ramp-down ?v)
               (:immediate !unload-cars ?p ?v ?l)
               (ramp-up ?v)))
        
        (:method (door-open-airplane ?v)
           ((door-open ?v))
           ((:immediate !!do-nothing))
           ()
           ((!open-door-airplane ?v)))

        (:method (door-close-airplane ?v)
           ((not(door-open ?v)))
           ((:immediate !!do-nothing))
           ()
           ((!close-door-airplane ?v)))

        (:method (ramp-connected ?vehicle ?ramp ?location)
           ((ramp-connected ?vehicle ?r))
           ((:immediate !!do-nothing))
           ()
           ((:immediate !attach-conveyor-ramp ?vehicle ?ramp ?location)))

        (:method (ramp-disconnected ?vehicle ?ramp ?location)
           ((not (ramp-connected ?vehicle ?ramp))
            (at-vehicle ?vehicle ?location))
           ((:immediate !!delete-protection(at-vehicle ?vehicle ?location)))
           ()
           ((:immediate !detach-conveyor-ramp ?vehicle ?ramp ?location)))

        (:method (load ?p ?v ?l)
           ((typev ?v air)
            (plane-ramp ?r)
            (at-equipment ?r ?l))
           (:ordered (ramp-connected ?v ?r ?l)
               (:immediate door-open-airplane ?v)
               (:immediate !load-airplane ?p ?v ?l)
             (door-close-airplane ?v)
             (:immediate ramp-disconnected ?v ?r ?l)))

        (:method (unload ?p ?v ?l)
           ((typev ?v air)
            (plane-ramp ?r plane-ramp)
            (at-equipment ?r ?l))
           (:ordered (ramp-connected ?v ?r ?l)
               (:immediate door-open-airplane ?v)
               (:immediate !unload-airplane ?p ?v ?l)
             (door-close-airplane ?v)
             (:immediate ramp-disconnected ?v ?r ?l)))

        (:include umt-translog-axioms #.(merge-pathnames "axioms.lisp"
                                                         (or *compile-file-truename*
                                                             *load-truename*)))

        (:include umt-translog-operators #.(merge-pathnames "operators.lisp"
                                                            (or *compile-file-truename*
                                                                *load-truename*)))

        ))))
