:-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink_M5.e',101). :- call_pel_directive(translate(unskipped, '/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/Pendulum_Prediction.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/Pendulum_Prediction.pel')). % load foundations/Root.e :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/Pendulum_Prediction.e',1). :- 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/Pendulum_Prediction.e',4). % sort dir sort(dir). % dir Left, Right t(dir,left). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/Pendulum_Prediction.e',4). t(dir,right). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/Pendulum_Prediction.e',7). % fluent Oscillating() fluent(oscillating()). % fluent At(dir) fluent(at_loc(dir)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/Pendulum_Prediction.e',10). % event Hold() event(hold()). % event Swing() event(swing()). % range time 0 5 :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/Pendulum_Prediction.e',13). :- call_pel_directive(range(time, 0, 5)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/Pendulum_Prediction.e',15). % range offset 1 3 :- call_pel_directive(range(offset, 1, 3)). %; State Constraints: % [dir1, dir2, time] % (HoldsAt(At(dir1), time) & % HoldsAt(At(dir2), time) -> % dir1=dir2). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/Pendulum_Prediction.e',19). holds_at(at_loc(Dir1), Time), holds_at(at_loc(Dir2), Time) -> Dir1=Dir2. :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/Pendulum_Prediction.e',25). %; Effect Axioms: % [time] % (Initiates(Swing(), Oscillating(), time)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/Pendulum_Prediction.e',27). initiates_at(swing(),oscillating(),Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/Pendulum_Prediction.e',29). % [time, dir] % (Releases(Swing(), At(dir), time)). releases_at(swing(),at_loc(Dir),Time). % [time,dir] % (HoldsAt(At(dir), time) -> % Initiates(Hold(), At(dir), time)). holds_at(at_loc(Dir), Time) -> initiates_at(hold(), at_loc(Dir), Time). % [time] % (Terminates(Hold(), Oscillating(), time)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/Pendulum_Prediction.e',37). terminates_at(hold(),oscillating(),Time). % [time, offset] % (HoldsAt(At(Left), time) & (offset % 2!=0) -> % Trajectory(Oscillating(),time,At(Right),offset)). holds_at(at_loc(left), Time), Offset/2\=0 -> trajectory(oscillating(), Time, at_loc(right), Offset). % [time, offset] % (HoldsAt(At(Right), time) & (offset % 2!=0) -> % Trajectory(Oscillating(),time,At(Left),offset)). holds_at(at_loc(right), Time), Offset/2\=0 -> trajectory(oscillating(), Time, at_loc(left), Offset). % [time, offset] % (HoldsAt(At(Left), time) & (offset % 2=0) -> % Trajectory(Oscillating(),time,At(Left),offset)). holds_at(at_loc(left), Time), Offset/2=0 -> trajectory(oscillating(), Time, at_loc(left), Offset). % [time, offset] % (HoldsAt(At(Right), time) & (offset % 2=0) -> % Trajectory(Oscillating(),time,At(Right),offset)). holds_at(at_loc(right), Time), Offset/2=0 -> trajectory(oscillating(), Time, at_loc(right), Offset). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/Pendulum_Prediction.e',57). %; Observation % !HoldsAt(Oscillating(),0). holds_at(not(oscillating()),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/Pendulum_Prediction.e',59). % HoldsAt(At(Left),0). holds_at(at_loc(left),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/Pendulum_Prediction.e',61). %; Event Occurrence % Happens(Swing(), 0). happens_at(swing(),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/Pendulum_Prediction.e',63). % Happens(Hold(), 3). happens_at(hold(),3). % completion Happens :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/Pendulum_Prediction.e',67). :- call_pel_directive(completion(happens_at)). %; end of file :- call_pel_directive(translate(ending, '/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/Pendulum_Prediction.pel')).