Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Agents can “call” a lift by pressing the button
- ;outside the lift door in a corridor, on calling a lift there will be a short delay then the lift
- ;will arrive and the doors will open.
- ;Think it should be set to moving or somehting
- (def call-lift
- '{:txt [?agent calls ?lift to ?floor from ?floor2]
- :pre ([isa ?agent agent]
- [on ?agent ?floor]
- [isa ?lift lift])
- [moving ?lift false]
- :del ([at ?lift ?floor2])
- :add ([at ?lift ?floor])
- })
- ;After selecting a floor, the lift doors will close & it will start to
- ;move. After a short delay it will reach the chosen floor & the doors will open.
- (def select-floor
- '{:txt [?agent selects ?floor in ?lift]
- :pre ([isa ?agent agent]
- [isa ?lift lift]
- [at ?agent ?lift]
- [not-at ?lift ?floor]
- [moving ?lift false])
- :del ([open ?lift true])
- :add ([open ?lift false]
- [moving ?lift true])
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement