Advertisement
ShakeYpm

Untitled

May 8th, 2017
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Agents can “call” a lift by pressing the button
  2. ;outside the lift door in a corridor, on calling a lift there will be a short delay then the lift
  3. ;will arrive and the doors will open.
  4. ;Think it should be set to moving or somehting
  5. (def call-lift
  6.   '{:txt [?agent calls ?lift to ?floor from ?floor2]
  7.     :pre ([isa ?agent agent]
  8.            [on ?agent ?floor]
  9.            [isa ?lift lift])
  10.     [moving ?lift false]
  11.     :del ([at ?lift ?floor2])
  12.     :add ([at ?lift ?floor])
  13.     })
  14.  
  15. ;After selecting a floor, the lift doors will close & it will start to
  16. ;move. After a short delay it will reach the chosen floor & the doors will open.
  17. (def select-floor
  18.   '{:txt [?agent selects ?floor in ?lift]
  19.     :pre ([isa ?agent agent]
  20.            [isa ?lift lift]
  21.            [at ?agent ?lift]
  22.            [not-at ?lift ?floor]
  23.            [moving ?lift false])
  24.     :del ([open ?lift true])
  25.     :add ([open ?lift false]
  26.            [moving ?lift true])
  27.     })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement