Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #const t_max=8.
- t(0..t_max).
- #domain fluent(F).
- #domain t(T).
- #domain event(E).
- initiated(F,T) :-
- happens(E,T),
- initiates(E,F,T).
- terminates(E,F,T) :- happens (E,T).
- %once the event is initiated and happens(last two lines in program) the event
- %terminates(E,F,T) would cause the heat to terminate in the function below
- terminated(F,T) :-
- happens(E,T),
- terminates(E,F,T).
- holds(F,T+1) :-
- holds(F,T),
- not terminated(F,T).
- -holds(F,T+1) :-
- -holds(F,T),
- not initiated(F,T).
- holds(F,T+1) :-
- initiated(F,T).
- -holds(F,T+1) :-
- terminated(F,T).
- holds(F,0) :- initially(F).
- -holds(F,0) :- not initially(F).
- initially(hot).
- fluent(hot).
- event(airconditioning).
- happens(airconditioning,5).
- %Lparse arguements --true-negation
- %run it here : http://chapaai.adamsmith.as:8118/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement