Advertisement
ShakeYpm

Untitled

May 14th, 2017
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (def call-lift-ops
  2.   '{call-lift {:pre((agent ?agent)
  3.                      (lift ?lift)
  4.                      (floor ?floor)
  5.                      (floor ?floor2)
  6.                      (at ?floor ?lift)
  7.                      (at ?floor2 ?agent)
  8.                    )
  9.             :add ((waiting ?agent))
  10.             :del ((at ?floor ?lift))
  11.             :txt (call-lift from ?floor to ?floor2 by ?agent)
  12.             :cmd [call-lift ?lift]
  13.             }
  14.     })
  15.  
  16. (def call-lift-state
  17.   '#{(agent agent)
  18.      (lift lift)
  19.      (floor floor)
  20.      (floor floor2)
  21.      (at floor lift)
  22.      (at floor2 agent)
  23.      })
  24.  
  25. (ops-search call-lift-state '((waiting agent)) call-lift-ops)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement