:-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/CoinToss4-ea.e',38). % From E: % % :-call_pel_directive(translate(unskipped,'/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e.lps')). :- call_pel_directive(translate(unskipped, '/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e.lps')). :-include(library('ec_planner/ec_test_incl')). :-expects_dialect(lps). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/CoinToss4-ea.e',38). % From E: % % :-call_pel_directive(translate(begining,'/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e.lps')). :- call_pel_directive(translate(begining, '/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e.lps')). % Sat, 10 Oct 2020 15:31:51 GMT File: (0x559e4af69200)%;Commuter15-ea.e :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',3). % load foundations/Root.e % From E: % % :-call_pel_directive(load('foundations/Root.e')). :- call_pel_directive(load('foundations/Root.e')). % load foundations/EC.e :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',3). % From E: % % :-call_pel_directive(load('foundations/EC.e')). :- call_pel_directive(load('foundations/EC.e')). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',6). % sort place % From E: % % sort(place). sort(place). % place Work, Home :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',6). % From E: % % t(place,work). place(work). % From E: % % t(place,home). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',6). place(home). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',9). % sort station: place % From E: % % subsort(station,place). subsort(station,place). % station HerneHill, Victoria, SouthKen :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',9). % From E: % % t(station,herneHill). station(herneHill). % From E: % % t(station,victoria). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',9). station(victoria). % From E: % % t(station,southKen). station(southKen). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',12). % fluent At(place) % From E: % % fluent(at_loc(place)). mpred_prop(at_loc(place),fluent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',12). fluents([at_loc/1]). % fluent Train(station, station) % From E: % % fluent(train(station,station)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',12). mpred_prop(train(station,station),fluent). fluents([train/2]). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',14). % event WalkTo(place) % From E: % % event(walkTo(place)). mpred_prop(walkTo(place),event). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',14). events([walkTo/1]). % event TrainTo(station) % From E: % % event(trainTo(station)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',14). mpred_prop(trainTo(station),event). events([trainTo/1]). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',16). % event GoToWork() % From E: % % event(goToWork()). events([goToWork/0]). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',18). % [place, time] % (Initiates(WalkTo(place), At(place), time)). % From E: % % initiates_at( % walkTo(Place), % at_loc(Place), % Time). % [Time]. walkTo(Place)initiates at_loc(Place). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',18). /* initiated(happens(walkTo(Place),Time_From,Time_Until), at_loc(Place), []). */ % "% =================================". % [place1, place2, time] % ( place1!=place2 & HoldsAt(At(place1),time) -> % Terminates(WalkTo(place2), At(place1), time) ). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',22). % From E: % % '->'( % (Place1\=Place2 , % holds_at(at_loc(Place1),Time)), % terminates_at( % walkTo(Place2), % at_loc(Place1), % Time)). % [Time]. Place1\=Place2, at_loc(Place1) -> terminates(walkTo(Place2), at_loc(Place1)). % [station1, station2, time] % ( HoldsAt(Train(station1, station2), time) & % HoldsAt(At(station1), time) -> % Initiates(TrainTo(station2), At(station2), time) ). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',26). % From E: % % '->'( % (holds_at(train(Station1,Station2),Time) , % holds_at(at_loc(Station1),Time)), % initiates_at( % trainTo(Station2), % at_loc(Station2), % Time)). % [Time]. trainTo(Station2)initiates at_loc(Station2)if train(Station1, Station2), at_loc(Station1). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',26). /* initiated(happens(trainTo(Station2), Time_From, Time_Until), at_loc(Station2), [ train(Station1,Station2), holds(at_loc(Station1),Time_From) ]). */ % "% =================================". % [station1, station2, time] % ( HoldsAt(Train(station1, station2), time) & % HoldsAt(At(station1), time) -> % Terminates(TrainTo(station2), At(station1), time) ). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',31). % From E: % % '->'( % (holds_at(train(Station1,Station2),Time) , % holds_at(at_loc(Station1),Time)), % terminates_at( % trainTo(Station2), % at_loc(Station1), % Time)). % [Time]. trainTo(Station2)terminates at_loc(Station1)if train(Station1, Station2), at_loc(Station1). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',31). /* terminated(happens(trainTo(Station2), Time_From, Time_Until), at_loc(Station1), [ train(Station1,Station2), holds(at_loc(Station1),Time_From) ]). */ % "% =================================". % [time] % (Initiates(GoToWork(), At(Work), time)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',34). % From E: % % initiates_at( % goToWork(), % at_loc(work), % Time). % [Time]. goToWork initiates at_loc(work). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',34). /* initiated(happens(goToWork,Time_From,Time_Until), at_loc(work), []). */ % "% =================================". % [place1, time] % (HoldsAt(At(place1),time) & place1!=Work % -> % Terminates(GoToWork(), At(place1), time)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',38). % From E: % % '->'( % (holds_at(at_loc(Place1),Time) , % Place1\=work), % terminates_at( % goToWork(), % at_loc(Place1), % Time)). % [Time]. :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',38). at_loc(Place1), Place1\=work -> terminates(goToWork, at_loc(Place1)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',43). % [time1, time2, time3, time4] % ( Happens3(WalkTo(HerneHill), time1, time1) & % Happens3(TrainTo(Victoria), time2, time2) & % Happens3(TrainTo(SouthKen), time3, time3) & % Happens3(WalkTo(Work), time4, time4) & % time1 % Happens3(GoToWork(), time1, time4) % ). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',43). % From E: % % '->'( % (happens3(walkTo(herneHill),Time1,Time1) , % happens3(trainTo(victoria),Time2,Time2) , % happens3(trainTo(southKen),Time3,Time3) , % happens3(walkTo(work),Time4,Time4) , % Time1 place1=place2). % From E: % % '->'( % (holds_at(at_loc(Place1),Time) , % holds_at(at_loc(Place2),Time)), % Place1=Place2). % [Time]. false not equals(Place1, Place2), at_loc(Place1), at_loc(Place2). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',68). /* d_pre([ not(equals(Place1,Place2)), holds(at_loc(Place1),Time_At), holds(at_loc(Place2),Time_At) ]). */ % "% =================================". % [station1, station2, time] % (HoldsAt(Train(station1, station2), time) -> station1!=station2). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',73). % From E: % % '->'( % holds_at(train(Station1,Station2),Time), % Station1\=Station2). % [Time]. :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',73). train(Station1, Station2) -> Station1\=Station2. % [station1, station2, time] % (station1!=HerneHill & station1!=Victoria % -> !HoldsAt(Train(station1,station2),time)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',77). % From E: % % '->'( % (Station1\=herneHill , % Station1\=victoria), % holds_at(not(train(Station1,Station2)),Time)). % [Time]. Station1\=herneHill, Station1\=victoria -> not(train(Station1, Station2)). % [station1, station2, time] % (station2!=Victoria & station2!=SouthKen % -> !HoldsAt(Train(station1,station2),time)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',81). % From E: % % '->'( % (Station2\=victoria , % Station2\=southKen), % holds_at(not(train(Station1,Station2)),Time)). % [Time]. Station2\=victoria, Station2\=southKen -> not(train(Station1, Station2)). % [station1, station2, time] % (HoldsAt(Train(station1, station2),time) & % station1=HerneHill % -> station2!=SouthKen). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',85). % From E: % % '->'( % (holds_at(train(Station1,Station2),Time) , % Station1=herneHill), % Station2\=southKen). % [Time]. :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',85). train(Station1, Station2), Station1=herneHill -> Station2\=southKen. :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',90). % HoldsAt(At(Home),0). % From E: % % holds_at(at_loc(home),0). initially at_loc(home). % initial_state([at_loc(home)]). % "% =================================". % Happens3(WalkTo(HerneHill), 1, 1). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',90). % From E: % % happens3(walkTo(herneHill),1,1). happens3(walkTo(herneHill),1,1). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',92). % Happens3(TrainTo(Victoria), 6, 6). % From E: % % happens3(trainTo(victoria),6,6). happens3(trainTo(victoria),6,6). % Happens3(TrainTo(SouthKen), 10, 10). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',92). % From E: % % happens3(trainTo(southKen),10,10). happens3(trainTo(southKen),10,10). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',94). % Happens3(WalkTo(Work), 12, 12). % From E: % % happens3(walkTo(work),12,12). happens3(walkTo(work),12,12). % completion Happens :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',96). % From E: % % :-call_pel_directive(completion(happens_at)). :- call_pel_directive(completion(happens_at)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',99). % range time 0 15 % From E: % % :-call_pel_directive(range(time,0,15)). :- call_pel_directive(range(time, 0, 15)). % range offset 1 1 :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',99). % From E: % % :-call_pel_directive(range(offset,1,1)). :- call_pel_directive(range(offset, 1, 1)). %; End of File :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e',102). % From E: % % :-call_pel_directive(translate(ending,'/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e.lps')). :- call_pel_directive(translate(ending, '/pack/logicmoo_ec/ext/ec_sources/examples/ecasp/Commuter15-ea.e.lps')).