I have two plans in a Jason agent running in JaCaMo 0.8 platform. For some reason the first plan is being considered not applicable, so the second plan is being chosen.
My question is: How do I know which part of the expression is turning the context false?
// get cached Fundamentals if earlier data are younger than 30 minutes
+!opinion(T)[source(Q)]
: .term2string(T,S) & fundamentals::preco(S,_)[seconds_of_day(SSS)] & .time(HH,MM,SS) & (SS+MM*60+HH*60*60 - SSS < 30*60)
& .date(YY,OO,DD) & lastDate(YYY,OOO,DDD) & YY == YYY & OO == OOO & DD == DDD
& fundamentals::lpa(S,_) & fundamentals::vpa(S,_)
<-
.print("Getting cached fundamentals from ",S);
!reply(S,Q);
.
// get Fundamentals again
+!opinion(T)[source(Q)] : .term2string(T,S) & .date(YY,OO,DD) <-
.print("Getting fundamentals from ",S);
getFundamentals(S);
-+lastDate(YY,OO,DD);
!reply(S,Q);
.
I have set the looging.properties file for FINE debug, part of the output for the refered agent is:
> [greenblatt] Start new reasoning cycle [greenblatt] Selected event > +!opinion(ALUP11)[source(myPA)] [greenblatt] Selected intention intention 118: > +!opinion(ALUP11)[source(myPA)] <- ... .print("Getting fundamentals from ",S); getFundamentals(S); -+lastDate(YY,OO,DD); > !reply(S,Q) / {YY=2019, OO=2, DD=23, Q=myPA, S="ALUP11", T=ALUP11} > [greenblatt] Getting fundamentals from ALUP11 [greenblatt] Start new > reasoning cycle
I am missing some information on this log, for instante ".term2string(T,S) & fundamentals::preco(S,_)[seconds_of_day(SSS)] & .time(HH,MM,SS) & (SS+MM*60+HH*60*60 - SSS < 30*60)" was considered true? How to find out such information?