Hello Ernest,
  
I
have simplified my program so that I could send you in email. The more
I think about it the more I believe that you are right I didn’t choose the 
right solution.
My program has 5 templates:
-         fact that are either imported or read from the user;
-         question used for getting some value “facts” from the user;
-         determinafact, an ordered fact template that is the trigger for 
questioning user;
-         possibility, the possible cases that depend on the “facts”;
-         situation, final cases that depends on the “possibilities” and, also 
on the “facts”.
  
When I run the program I was thinking that the rule would fire in the following 
order:
- rule possible_1 because the fact (fact(symbol IND1)(name IND1)(value high)) 
was added by me. This rule adds in the working memory the fact
 (possibility(symbol Case_A)); 
- rule situation_1 because of the fact added by the first rule and, also 
because of the fact (fact(symbol IND3)(name IND3)(value high)) added by me and 
the fact (fact(symbol IND2)(name IND2)(value high)) that was added after 
questioning the user; 
- rule situation_2, because of the facts (fact(symbol IND1)(name IND1)(value 
high)) added by me and (situation(symbol Case_A)) added by firing the second 
rule. But this rule situation_2 won’t fire because of the trigger mechanism.
If all the facts were added by questioning the user the program run fine. But 
in my case some facts are imported. 
I think I have to remove the trigger module from my application and use only 
forward chaining rules. What do you think? 
 
I am looking forward for your answer,
Ana Tanasescu


Attachment: simplified.clp
Description: Binary data

Reply via email to