;;;Railroad meet/pass problem. trains cannot occupy tracks at the same time.
(define (domain meet-pass)
(:requirements :strips)
(:predicates (clear ?x)
(connected ?x ?y)
(at ?x ?y))
(:action move-train
:parameters (?x ?y ?z)
:precondition (and (clear ?z)
(connected ?y ?z)
(at ?x ?y))
:effect (and (not (clear ?z))
(clear ?y)
(at ?x ?z)
(not (at ?x ?y)))))
(define (problem meet-pass1)
(:init (at train1 track1)
(clear track2)
(clear siding1)
(clear track3)
(clear track4)
(clear track5)
(connected track1 track2)
(connected track2 track1)
(connected track2 track3)
(connected track3 track2)
(connected siding1 track3)
(connected track3 siding1)
(connected track3 track4)
(connected track4 track3)
(connected track5 track4)
(connected track4 track5))
(:goal (AND (at train1 track5)))
(:domain meet-pass)
(:objects train1 train2 track1 track2 track3 track4 track5 siding1))
(define (problem meet-pass2)
(:init (at train1 track1)
(at train2 track2)
(clear siding1)
(clear track3)
(clear track4)
(clear track5)
(connected track1 track2)
(connected track2 track1)
(connected track2 track3)
(connected track3 track2)
(connected siding1 track3)
(connected track3 siding1)
(connected track3 track4)
(connected track4 track3)
(connected track5 track4)
(connected track4 track5))
(:length (:serial 6 ) (:parallel 5))
(:goal (and (at train1 track5)))
(:domain meet-pass)
(:objects train1 train2 track1 track2 track3 track4 track5 siding1))
(define (problem meet-pass3)
(:init (at train1 track1)
(at train2 track2)
(clear siding1)
(clear track3)
(at train3 track4)
(clear track5)
(connected track1 track2)
(connected track2 track1)
(connected track2 track3)
(connected track3 track2)
(connected siding1 track3)
(connected track3 siding1)
(connected track3 track4)
(connected track4 track3)
(connected track5 track4)
(connected track4 track5))
(:goal (and (at train1 track5)))
(:length (:serial 15 ) (:parallel 11))
(:domain meet-pass)
(:objects train1 train2 train3 track1 track2 track3 track4 track5 siding1))
(define (problem meet-pass4)
(:init (at train1 track1)
(at train2 track2)
(clear siding1)
(clear track3)
(at train3 track4)
(at train4 track5)
(connected track1 track2)
(connected track2 track1)
(connected track2 track3)
(connected track3 track2)
(connected siding1 track3)
(connected track3 siding1)
(connected track3 track4)
(connected track4 track3)
(connected track5 track4)
(connected track4 track5))
(:goal (and (at train1 track5)))
(:domain meet-pass)
(:objects train1 train2 train3 train4
track1 track2 track3 track4 track5 siding1))
(define (problem meet-pass5)
(:init (at train1 track1)
(at train2 track2)
(clear siding1)
(clear track3)
(at train3 track4)
(at train4 track5)
(connected track1 track2)
(connected track2 track1)
(connected track2 track3)
(connected track3 track2)
(connected siding1 track3)
(connected track3 siding1)
(connected track3 track4)
(connected track4 track3)
(connected track5 track4)
(connected track4 track5))
(:goal (and (at train1 track5)
(at train2 track4)
(at train3 track2)
(at train4 track1)))
(:domain meet-pass)
(:objects train1 train2 train3 train4
track1 track2 track3 track4 track5 siding1))