|
HI all,
I' m writing some rules for an expert system
to make diagnose of problems in electrical systems.
In some of those rules I have to compare the
actual voltage of a generator with his higher limit an if it is over it for
more than 15 seconds I have to fire the rule where I check some
more conditions that may result in a diagnostic.
Is there a way to do this in Jess? I�ve suceed in
fire this rule without temporization now I want to add the time
delay.
(defrule sobretensao-a
(avaliar ilha-a) (object (is-a gerador)(nome "tg-5601")(tensao-real ?v)(tensao-alta ?vh)(tensao-baixa ?vl) (nome ?n)(barra-ge ?barra)) (test (> ?v ?vh)) => (if (or (> (slot-get ?barra tensao-real)(slot-get ?barra tensao-alta))(eq (?avrmax TRUE))) then (printout t "Falha controle de tensao " ?n " Ver LISTA 1.1" crlf))) I don�t know if it make difference but I�m using
Jess Tab functions because the ontology definition and object instantiation of
electrical system was done using Protege.
Thanks in advance.
Clovis de Almeida Jr.
|
