:-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/Happy40.e',65). :- call_pel_directive(translate(unskipped, '/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.pel')). :-include(library('ec_planner/ec_test_incl')). :-expects_dialect(ecalc). :- call_pel_directive(translate(begining, '/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.pel')). %; %; Copyright (c) 2005 IBM Corporation and others. %; All rights reserved. This program and the accompanying materials %; are made available under the terms of the Common Public License v1.0 %; which accompanies this distribution, and is available at %; http://www.eclipse.org/legal/cpl-v10.html %; %; Contributors: %; IBM - Initial implementation %; %; @article{MillerShanahan:1999, %; author = "Rob Miller and Murray Shanahan", %; year = "1999", %; title = "The event calculus in classical logic---\uppercase{A}lternative axiomatisations", %; journal = "Link{\"{o}}ping Electronic Articles in Computer and Information Science", %; volume = "4", %; number = "016", %; } %; %; @book{Mueller:2006, %; author = "Erik T. Mueller", %; year = "2006", %; title = "Commonsense Reasoning", %; address = "San Francisco", %; publisher = "Morgan Kaufmann/Elsevier", %; } %; :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',29). % option encoding 3 :- call_pel_directive(option(encoding, 3)). % option trajectory on :- call_pel_directive(option(trajectory, on)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',32). % load foundations/Root.e :- call_pel_directive(load('foundations/Root.e')). % load foundations/EC.e :- call_pel_directive(load('foundations/EC.e')). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',35). % sort balloon sort(balloon). % sort agent sort(agent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',37). % sort height: integer subsort(height,integer). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',39). % agent Nathan t(agent,nathan). % balloon Balloon t(balloon,balloon). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',42). % fluent HeaterOn(balloon) fluent(heaterOn(balloon)). % fluent Height(balloon,height) fluent(height(balloon,height)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',44). % noninertial Height :- call_pel_directive(noninertial(height)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',46). % event TurnOnHeater(agent,balloon) event(turnOnHeater(agent,balloon)). % event TurnOffHeater(agent,balloon) event(turnOffHeater(agent,balloon)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',49). %; Sigma % [agent,balloon,time] % Initiates(TurnOnHeater(agent,balloon),HeaterOn(balloon),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',51). initiates_at(turnOnHeater(Agent,Balloon), heaterOn(Balloon), Time). % [agent,balloon,time] % Terminates(TurnOffHeater(agent,balloon),HeaterOn(balloon),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',55). terminates_at(turnOffHeater(Agent,Balloon), heaterOn(Balloon), Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',57). %; Delta :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',59). % Delta: directive(delta). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',59). % Happens(TurnOnHeater(Nathan,Balloon),0). happens_at(turnOnHeater(nathan,balloon),0). % Delta: directive(delta). % Happens(TurnOffHeater(Nathan,Balloon),6). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',59). happens_at(turnOffHeater(nathan,balloon),6). %; Psi % [balloon,height1,height2,time] % HoldsAt(Height(balloon,height1),time) & % HoldsAt(Height(balloon,height2),time) -> % height1=height2. :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',64). holds_at(height(Balloon, Height1), Time), holds_at(height(Balloon, Height2), Time) -> Height1=Height2. %; Pi % [balloon,height1,height2,offset,time] % HoldsAt(Height(balloon,height1),time) & % height2 = (height1 + offset) -> % Trajectory(HeaterOn(balloon),time,Height(balloon,height2),offset). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',71). holds_at(height(Balloon, Height1), Time), Height2=Height1+Offset -> trajectory(heaterOn(Balloon), Time, height(Balloon, Height2), Offset). % [balloon,height1,height2,offset,time] % HoldsAt(Height(balloon,height1),time) & % height2 = (height1 - offset) -> % AntiTrajectory(HeaterOn(balloon),time,Height(balloon,height2),offset). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',77). holds_at(height(Balloon, Height1), Time), Height2=Height1-Offset -> antiTrajectory(heaterOn(Balloon), Time, height(Balloon, Height2), Offset). %; Gamma :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',83). % HoldsAt(Height(Balloon,0),0). holds_at(height(balloon,0),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',85). %; added: % !HoldsAt(HeaterOn(Balloon),0). holds_at(not(heaterOn(balloon)),0). % completion Delta Happens :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',87). :- call_pel_directive(completion(delta)). :- call_pel_directive(completion(happens_at)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',90). % range time 0 15 :- call_pel_directive(range(time, 0, 15)). % range height 0 6 :- call_pel_directive(range(height, 0, 6)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.e',92). % range offset 1 6 :- call_pel_directive(range(offset, 1, 6)). %; End of file. :- call_pel_directive(translate(ending, '/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon15.pel')).