3processSDFluent(Index, F=V, InitTime) :-
4 sdFPList(Index, F=V, RestrictedList, Extension), !,
5 retract(sdFPList(Index, F=V, _, _)),
6 amalgamatePeriods(Extension, RestrictedList, ExtendedPList),
7 setTheSceneSDFluent(ExtendedPList, InitTime, BrokenPeriod),
8 holdsForSDFluent(F=V, NewPeriods),
9 updatesdFPList(Index, F=V, NewPeriods, BrokenPeriod).
10
12processSDFluent(Index, F=V, _InitTime) :-
13 holdsForSDFluent(F=V, NewPeriods),
14 updatesdFPList(Index, F=V, NewPeriods, []).
15
16
18setTheSceneSDFluent(EPList, InitTime, BrokenPeriod) :-
19 20 member((Start,End), EPList),
21 gt(End,InitTime),
22 (
23 Start=<InitTime, nextTimePoint(InitTime,NewInitTime), BrokenPeriod=[(Start,NewInitTime)]
24 ;
25 BrokenPeriod=[]
26 ), !.
27
29setTheSceneSDFluent(_EPList, _InitTime, []).
30
31
32updatesdFPList(_Index, _U, [], []) :- !.
33
34updatesdFPList(Index, F=V, NewPeriods, BrokenPeriod) :-
35 assert(sdFPList(Index, F=V, NewPeriods, BrokenPeriod))