Hello,
I never got a reply on that one.
In the meantime, after doing the change I described, I realized that my
rules don't all fire. A simple rule like
(defrule MAIN::dpa-unit-reload-on-add
(care-unit (initialLoad TRUE) (needLoadSermeds FALSE)
(needReloadPatients TRUE) (OBJECT ?ou))
(service-activity (available TRUE) (service "SAMU"))
=>
(printout t "(jess) Initial load for unit " (call ?ou getId) crlf)
(call ?ou reloadPatients))
doesn't fire for all care units. After Jess is done running, I wonder
why some care units have not been loaded. I re-enter the same rule
(copied from a ppdefrule of the rule itself in Jess) and the rule starts
firing. One time I even had to enter the rule twice in a row before
having all care units processed. And it is not just reloadPatient that
failed to change the flags. The text "(jess) Initial load for unit XXX"
does not appear on the standard output.
Removing (slot-specific TRUE) from all my templates fixed that.
Removing it from only care-unit did not.
Note that I no more use propertyChangeEvents to inform Jess of changes.
I now use updateObject on one or all slots as I described below. I
could have made a mistake somewhere but when I request the facts from
Jess, they look correct to me, so it is not an update problem.
I now deal with Jess problems this way. A rule that acts funny is
removed from Jess and some code is written to supplement it outside of Jess.
Regards,
Florian
Florian Fischer wrote:
Hello,
I was wondering what is the performance trade-off between
rete.updateObject(myObject);
and
rete.updateObject(myObject, slot);
When I update an object underlying a shadow fact, I record the list of
updated fields and call updateObject only at the end. If only one
field was updated I pass the slot name as parameter. If I updated
more than one, I make a global update.
But for instance, when updating 2 fields out of 91, would it make
sense to do two specific updateObject, one for each slot, instead of
one global update? If I do a global updateObject, it will have to
reread all 91 fields. If I do two specific updateObject, it might
reorganize the Rete network twice. So which is better?
Would it make sense to implement a updateObject(String[] slots) for
the case where you know which fields were updated?
Thanks in advance,
Florian Fischer
--
Florian Fischer
Service d'Informatique Médicale
Hôpitaux Universitaires de Genève
Tél: 022 37 28861
[EMAIL PROTECTED]
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------